Adversarial search is an algorithm used in game playing to plan ahead when other agents are planning against you. The minimax algorithm determines the optimal strategy by assuming the opponent will make the best counter-move. It searches the game tree to find the move with the highest minimum payoff. α-β pruning improves on minimax by pruning branches that cannot affect the choice of move. State-of-the-art game programs use techniques like precomputed databases, deep search trees, and pattern knowledge bases to defeat human champions at games like checkers, chess, and Othello.
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.
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
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.