Adversarial search with Game Playing
-
Upload
aman-patel -
Category
Technology
-
view
1.067 -
download
2
description
Transcript of Adversarial search with Game Playing
![Page 1: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/1.jpg)
Adversarial Search
By: Aman Patel
Nileshwari Desai
![Page 2: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/2.jpg)
Topics Covered
• What is Adversarial Search ?
• Optimal decisions in Games
• Multiplayer Games
• Min-Max Algorithm
• α-β Pruning
• State of the Art Game Programs
![Page 3: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/3.jpg)
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”
![Page 4: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/4.jpg)
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.
![Page 5: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/5.jpg)
Example
![Page 6: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/6.jpg)
![Page 7: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/7.jpg)
![Page 8: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/8.jpg)
![Page 9: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/9.jpg)
![Page 10: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/10.jpg)
![Page 11: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/11.jpg)
![Page 12: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/12.jpg)
![Page 13: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/13.jpg)
![Page 14: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/14.jpg)
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
![Page 15: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/15.jpg)
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
![Page 16: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/16.jpg)
- 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
![Page 17: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/17.jpg)
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
![Page 18: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/18.jpg)
Example
![Page 19: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/19.jpg)
![Page 20: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/20.jpg)
![Page 21: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/21.jpg)
![Page 22: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/22.jpg)
![Page 23: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/23.jpg)
![Page 24: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/24.jpg)
![Page 25: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/25.jpg)
![Page 26: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/26.jpg)
![Page 27: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/27.jpg)
![Page 28: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/28.jpg)
![Page 29: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/29.jpg)
![Page 30: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/30.jpg)
![Page 31: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/31.jpg)
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.
![Page 32: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/32.jpg)
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.
![Page 33: Adversarial search with Game Playing](https://reader034.fdocuments.us/reader034/viewer/2022051323/547a97a1b4af9fb3658b477f/html5/thumbnails/33.jpg)
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.