Adversarial Search
Adversarial Search
1
Games vs. search problems
2
Game search
• Problem formulation
– Initial state: initial board position + whose move it is
– Operators: legal moves a player can make
– Goal (terminal test): game over?
– Utility (payoff) function: measures the outcome of the game and
its desirability
• Search objective:
– Find the sequence of player’s decisions (moves)
maximizing its utility (payoff)
– Consider the opponent’s moves and their utility
4
Game tree (2-player, deterministic, turns)
5
O-MAX
X-MIN
6
Minimax
•
•
•
7
Minimax. Example
8
Complexity of the minimax algorithm
9
Solution to the complexity problem
10
Alpha Beta Pruning
11
Properties of α-β
12
Key points in Alpha-beta Pruning
1.Alpha: Alpha is the best choice or the highest value that we
have found at any instance along the path of Maximizer. The
initial value for alpha is – ∞.
2.Beta: Beta is the best choice or the lowest value that we
have found at any instance along the path of Minimizer. The
initial value for alpha is + ∞.
3.The condition for Alpha-beta Pruning is that α >= β.
4.Each node has to keep track of its alpha and beta values.
Alpha can be updated only when it’s MAX’s turn and, similarly,
beta can be updated only when it’s MIN’s chance.
5.MAX will update only alpha values and MIN player will update
only beta values.
6.The node values will be passed to upper nodes instead of
values of alpha and beta during go into reverse of tree.
7.Alpha and Beta values only be passed to child nodes.
13
14
15
16
17
18
19