SlideShare una empresa de Scribd logo
1 de 33
Adversarial Search
By: Aman Patel
Nileshwari Desai
Topics Covered
•
•
•
•
•
•

What is Adversarial Search ?
Optimal decisions in Games
Multiplayer Games
Min-Max Algorithm
α-β Pruning
State of the Art Game Programs
What is Adversarial Search ?
• In computer science, a search algorithm is an algorithm for finding an item
with specified properties among a collection of items. The items may be
stored individually as records in a database; or may be elements of a search
space defined by a mathematical formula or procedure.

• Adversarial search in Game playing :
“ In which we examine the problems that arise when we try to plan ahead
in a world where other agents are planning against us”
MIN-MAX Algorithm
• MIN-MAX algorithm uses the optimal strategy to get to the desired goal state.
• Assuming that the opponent is rational and always optimizes its behaviour (opposite to us)
we consider the best opponent’s response.

• MAX's strategy is affected by MIN's play. So MAX needs a strategy which is the best
possible payoff, assuming optimal play on MIN's part.

• Then the MIN-MAX algorithm determines the best move.
• It is the perfect play for deterministic games.
Example
Why Minimax algorithm is bad ?
• The problem with minimax is that it is inefficient
•
•
•
•

Search to depth d in the game tree
Suppose each node has at most b children

Calculate the exact score at every node
In worst case we search bd nodes – exponential

• However, many nodes are useless
• There are some nodes where we don’t need to know exact score because we will never
take path in the future
Is there a good Min-Max ?
• Yes ! We just need to prune branches that are not required in searching

• Idea:
• Start propagating scores as soon as leaf nodes are generated
• Do not explore nodes which cannot affect the choice of move
• The method for pruning the search tree generated by minimax is called
Alpha-Beta
- values
• Computing alpha-beta values
•

value is a lower-bound on the actual value of a Max node, maximum across
seen children

•

value is an upper-bound on actual value of a Min node, minimum across seen
children

• Propagation
• Update , values by propagating upwards values of terminal nodes
• Update , values down to allow pruning
The - pruning
• Two key points:
•

value can never decrease

•

value can never increase

• Search can be discontinued at a node if:
o It is a Max node and
•

≥

, it is beta cutoff

o It is a Min node and
•

≤

, it is alpha cutoff
Example
State-of-the-art Game Programs
• Designing game-playing programs has a dual purpose: both to better
understand how to choose actions in complex domains with uncertain
outcomes and to develop high-performance systems for the particular game
studied.

• In this section, we examine progress toward the latter goal.
Deterministic games in practice
• Checkers:
Chinook ended 40-year-reign of human world champion Marion Tinsley in 1994.
Used a precomputed endgame database defining perfect play for all positions involving 8

or fewer pieces on the board, a total of 444 billion positions.

• Chess:
Deep Blue defeated human world champion Garry Kasparov in a sixgame match in 1997.
Deep Blue searches 200 million positions per second, uses very sophisticated evaluation,
and undisclosed methods for extending some lines of search up to 40 ply.
Deterministic games in practice
• Othello:
Human champions refuse to compete against computers, who are too good.

• Go:
Human champions refuse to compete against computers, who are too bad.
In go, b > 300, so most programs use pattern knowledge bases to suggest
plausible moves.

Más contenido relacionado

La actualidad más candente

Propositional logic
Propositional logicPropositional logic
Propositional logic
Rushdi Shams
 
Artificial intelligence- Logic Agents
Artificial intelligence- Logic AgentsArtificial intelligence- Logic Agents
Artificial intelligence- Logic Agents
Nuruzzaman Milon
 

La actualidad más candente (20)

Ai notes
Ai notesAi notes
Ai notes
 
I. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AII. Mini-Max Algorithm in AI
I. Mini-Max Algorithm in AI
 
Alpha beta pruning in ai
Alpha beta pruning in aiAlpha beta pruning in ai
Alpha beta pruning in ai
 
AI: Planning and AI
AI: Planning and AIAI: Planning and AI
AI: Planning and AI
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agents
 
Hill climbing
Hill climbingHill climbing
Hill climbing
 
Artificial intelligence- Logic Agents
Artificial intelligence- Logic AgentsArtificial intelligence- Logic Agents
Artificial intelligence- Logic Agents
 
Informed search
Informed searchInformed search
Informed search
 
Alpha-beta pruning (Artificial Intelligence)
Alpha-beta pruning (Artificial Intelligence)Alpha-beta pruning (Artificial Intelligence)
Alpha-beta pruning (Artificial Intelligence)
 
I. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithmI. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithm
 
AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)
 
AI Lecture 4 (informed search and exploration)
AI Lecture 4 (informed search and exploration)AI Lecture 4 (informed search and exploration)
AI Lecture 4 (informed search and exploration)
 
Heuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligenceHeuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligence
 
Planning
Planning Planning
Planning
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction Problem
 
Adversarial search
Adversarial search Adversarial search
Adversarial search
 
Lecture 05 problem solving through ai
Lecture 05 problem solving through aiLecture 05 problem solving through ai
Lecture 05 problem solving through ai
 
Control Strategies in AI
Control Strategies in AI Control Strategies in AI
Control Strategies in AI
 
Problems, Problem spaces and Search
Problems, Problem spaces and SearchProblems, Problem spaces and Search
Problems, Problem spaces and Search
 

Similar a Adversarial search with Game Playing

Adversarial search
Adversarial searchAdversarial search
Adversarial search
Nilu Desai
 

Similar a Adversarial search with Game Playing (20)

Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
Games
GamesGames
Games
 
cai
caicai
cai
 
484-7.ppt
484-7.ppt484-7.ppt
484-7.ppt
 
GamePlaying.ppt
GamePlaying.pptGamePlaying.ppt
GamePlaying.ppt
 
AI3391 Artificial intelligence Session 15 Min Max Algorithm.pptx
AI3391 Artificial intelligence Session 15  Min Max Algorithm.pptxAI3391 Artificial intelligence Session 15  Min Max Algorithm.pptx
AI3391 Artificial intelligence Session 15 Min Max Algorithm.pptx
 
M6 game
M6 gameM6 game
M6 game
 
Game playing (tic tac-toe), andor graph
Game playing (tic tac-toe), andor graphGame playing (tic tac-toe), andor graph
Game playing (tic tac-toe), andor graph
 
games, infosec, privacy, adversaries .ppt
games, infosec, privacy, adversaries .pptgames, infosec, privacy, adversaries .ppt
games, infosec, privacy, adversaries .ppt
 
AI3391 Artificial Intelligence UNIT III Notes_merged.pdf
AI3391 Artificial Intelligence UNIT III Notes_merged.pdfAI3391 Artificial Intelligence UNIT III Notes_merged.pdf
AI3391 Artificial Intelligence UNIT III Notes_merged.pdf
 
adversial search.pptx
adversial search.pptxadversial search.pptx
adversial search.pptx
 
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
21CSC206T_UNIT3.pptx.pdf ARITIFICIAL INTELLIGENCE
 
Two player games
Two player gamesTwo player games
Two player games
 
Devoxx 2017 - AI Self-learning Game Playing
Devoxx 2017 - AI Self-learning Game PlayingDevoxx 2017 - AI Self-learning Game Playing
Devoxx 2017 - AI Self-learning Game Playing
 
Game playing.ppt
Game playing.pptGame playing.ppt
Game playing.ppt
 
It is an artificial document, please. regarding Ai topics
It is an artificial document, please. regarding Ai topicsIt is an artificial document, please. regarding Ai topics
It is an artificial document, please. regarding Ai topics
 
AI3391 Artificial Intelligence Session 18 Monto carlo search tree.pptx
AI3391 Artificial Intelligence Session 18 Monto carlo search tree.pptxAI3391 Artificial Intelligence Session 18 Monto carlo search tree.pptx
AI3391 Artificial Intelligence Session 18 Monto carlo search tree.pptx
 
Topic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).pptTopic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).ppt
 
Module_3_1.pptx
Module_3_1.pptxModule_3_1.pptx
Module_3_1.pptx
 
Understanding and improving games through machine learning - Natasha Latysheva
Understanding and improving games through machine learning - Natasha LatyshevaUnderstanding and improving games through machine learning - Natasha Latysheva
Understanding and improving games through machine learning - Natasha Latysheva
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Adversarial search with Game Playing

  • 1. Adversarial Search By: Aman Patel Nileshwari Desai
  • 2. Topics Covered • • • • • • What is Adversarial Search ? Optimal decisions in Games Multiplayer Games Min-Max Algorithm α-β Pruning State of the Art Game Programs
  • 3. What is Adversarial Search ? • In computer science, a search algorithm is an algorithm for finding an item with specified properties among a collection of items. The items may be stored individually as records in a database; or may be elements of a search space defined by a mathematical formula or procedure. • Adversarial search in Game playing : “ In which we examine the problems that arise when we try to plan ahead in a world where other agents are planning against us”
  • 4. MIN-MAX Algorithm • MIN-MAX algorithm uses the optimal strategy to get to the desired goal state. • Assuming that the opponent is rational and always optimizes its behaviour (opposite to us) we consider the best opponent’s response. • MAX's strategy is affected by MIN's play. So MAX needs a strategy which is the best possible payoff, assuming optimal play on MIN's part. • Then the MIN-MAX algorithm determines the best move. • It is the perfect play for deterministic games.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. Why Minimax algorithm is bad ? • The problem with minimax is that it is inefficient • • • • Search to depth d in the game tree Suppose each node has at most b children Calculate the exact score at every node In worst case we search bd nodes – exponential • However, many nodes are useless • There are some nodes where we don’t need to know exact score because we will never take path in the future
  • 15. Is there a good Min-Max ? • Yes ! We just need to prune branches that are not required in searching • Idea: • Start propagating scores as soon as leaf nodes are generated • Do not explore nodes which cannot affect the choice of move • The method for pruning the search tree generated by minimax is called Alpha-Beta
  • 16. - values • Computing alpha-beta values • value is a lower-bound on the actual value of a Max node, maximum across seen children • value is an upper-bound on actual value of a Min node, minimum across seen children • Propagation • Update , values by propagating upwards values of terminal nodes • Update , values down to allow pruning
  • 17. The - pruning • Two key points: • value can never decrease • value can never increase • Search can be discontinued at a node if: o It is a Max node and • ≥ , it is beta cutoff o It is a Min node and • ≤ , it is alpha cutoff
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31. State-of-the-art Game Programs • Designing game-playing programs has a dual purpose: both to better understand how to choose actions in complex domains with uncertain outcomes and to develop high-performance systems for the particular game studied. • In this section, we examine progress toward the latter goal.
  • 32. Deterministic games in practice • Checkers: Chinook ended 40-year-reign of human world champion Marion Tinsley in 1994. Used a precomputed endgame database defining perfect play for all positions involving 8 or fewer pieces on the board, a total of 444 billion positions. • Chess: Deep Blue defeated human world champion Garry Kasparov in a sixgame match in 1997. Deep Blue searches 200 million positions per second, uses very sophisticated evaluation, and undisclosed methods for extending some lines of search up to 40 ply.
  • 33. Deterministic games in practice • Othello: Human champions refuse to compete against computers, who are too good. • Go: Human champions refuse to compete against computers, who are too bad. In go, b > 300, so most programs use pattern knowledge bases to suggest plausible moves.