FAI - Unit 3 - Search Using Games
FAI - Unit 3 - Search Using Games
by
Dr. Abdul Ahad
Content
2.1 Introduction
2.2 Game Trees
2.3 Minmax Evaluation
2.4 Minmax with Alpha-Beta Pruning
2.5 Variations to Minmax
2.6 Improvements to Minmax
2.7 Games of Chance
2.8 The Expect Minmax Algorithm
➢ In this algorithm two players play the game, one is called Maximizer
(MAX) and other is called Minimizer(MIN). The maximizer tries to
get the highest score possible while the minimizer tries to do the
opposite and get the lowest score possible.
➢ In a given state if the maximizer has upper hand then, the score of the
board will tend to be some positive value. If the minimizer has the
upper hand in that board state then it will tend to be some negative
value. The values of the board are calculated by some heuristics which
are unique for every type of game.
Dr. Abdul Ahad, Department of AI 11
Example: Following are the main steps involved in solving the two-player
game tree:
Step-1: In the first step, the algorithm generates the entire game-tree and
apply the utility function to get the utility values for the terminal states. In the
below tree diagram, let's take A is the initial state of the tree. Suppose
maximizer takes first turn which has worst-case initial value = -infinity, and
minimizer will take next turn which has worst-case initial value = +infinity.
In the next step, algorithm traverse the next successor of Node B which is
node E, and the values of α= -∞, and β= 3 will also be passed.
Dr. Abdul Ahad, Department of AI 19
Step 4: At node E, Max will take its turn, and the value of alpha will change.
The current value of alpha will be compared with 5, so max (-∞, 5) = 5, hence
at node E α= 5 and β= 3, where α>=β, so the right successor of E will be
pruned, and algorithm will not traverse it, and the value at node E will be 5.