AdversialSearch-Max-MinGameAlphaBeta-Pruning-
AdversialSearch-Max-MinGameAlphaBeta-Pruning-
Chapter 5.1-5.3
Dr. Puspanjali Mohapatra
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
Minimax Algorithm
6
Minimax
•
•
•
7
Minimax. Example
8
9
Complexity of the minimax algorithm
10
Solution to the complexity problem
11
Alpha Beta Pruning
12
Alpha beta pruning. Example
13
Minimax with alpha-beta pruning: The
algorithm
• Maxv: function called for max nodes
– Might update alpha, the best max can do far
• Minv: function called for min nodes
– Might update beta, the best min can do so far
14
Algorithm example: alphas/betas shown
15
Properties of α-β
16
17
Design of evaluation functions
18
Further extensions to real games
19