2. Minimax and Alpha beta
Reduction
• Writing a machine player for a game, we need detraining
the best possible to move.
• Games such as Chess, tic-tac-toe etc. are interesting
because they offer a pure abstraction of the competition
between two armies.
• Minimax is the recursive algorithm.
7. Alpha-beta pruning
• If we apply alpha-beta pruning to a standard minimax algorithm, it
returns the same move as the standard one, but it removes (prunes)
all the nodes that are possibly not affecting the final decision.
• Alpha: It is the best choice so far for the player MAX. We want to
get the highest possible value here.
• Beta: It is the best choice so far for MIN, and it has to be the lowest
possible value.
8. Conclusion
• Games are getting exciting. Game playing is to AI
• Given a good implementation minimax algorithm can
tough together.
9. Water Jug Problem
• Consider the following problem:
A Water Jug Problem: You are given two jugs, a 4-gallon
one and a 3-gallon one, a pump which has unlimited water
which you can use to fill the jug, and the ground on which
water may be poured. Neither jug has any measuring markings
on it. How can you get exactly 2 gallons of water in the 4-
gallon jug?
• State Representation and Initial State –
We will represent a state of the problem as a tuple (x, y)
where x represents the amount of water in the 4-gallon jug and
y represents the amount of water in the 3-gallon jug. Goal state
as (2,y).