The MINIMAX GAME STRATEGY for the MAX (MIN) player is to select the move that leads to the successor node with the highest (lowest) score. The scores are computed starting from the leaves of the tree and backing up their scores to their predecessor in accordance with the Minimax strategy. The problem with this strategy is that it explores each node in the tree.
function MINIMAX(N) is
begin
if N is a leaf then
return the estimated score of this leaf
else
Let N1, N2, .., Nm be the successors of N;
if N is a Min node then
return min{MINIMAX(N1), .., MINIMAX(Nm)}
else
return max{MINIMAX(N1), .., MINIMAX(Nm)}
end MINIMAX;
ALPHA-BETA cutoff is a method for reducing the number of nodes explored in the Minimax strategy. For the nodes it explores it computes, in addition to the score, an alpha value and a beta value.
function MINIMAX-AB(N, A, B) is
begin
Set Alpha value of N to A and Beta value of N to B;
if N is a leaf then
return the estimated score of this leaf
else
if N is a Min node then
For each successor Ni of N loop
Let Val be MINIMAX-AB(Ni, Alpha of N, Beta of N);
Set Beta value of N to Min{Beta value of N, Val};
When Beta value of N <= Alpha value of N then exit loop;
Return Beta value of N;
else
For each successor Ni of N loop
Let Val be MINIMAX-AB(Ni, Alpha of N, Beta of N);
Set Alpha value of N to Max{Alpha value of N, Val};
When Alpha value of N >= Beta value of N then exit loop;
Return Alpha value of N;
end MINIMAX-AB;
The MINIMAX-AB function is called with as parameters the root of the game tree, -infinity as alpha value, and +infinity as beta value.
Here is an example of Alpha Beta Cutoff.
Nillson,N.J.: Principles of Artificial Intelligence
Tioga Publishing Co. 1980 Pages 112-125
Rich,E.,Knight,K.: Artificial Intelligence
McGraw-Hill, 1991 Pages 307-319
Luger,G.F.,Stubblefield,W.A.: Artificial Intelligence: Structures
and strategies for complex problem solving, Second Edition
The Benjamin/Cummings Publishing Co. 1993 Pages 137-145
Norvig,P.: Paradigms of Artificial Intelligence Programming
Morgan-Kaufmann, 1992 Pages 596-626
Pearl,J.: Heuristics
Addison-Wesley, 1984 Pages 332-360
ingargiola@cis.temple.edu