Alpha Beta Pruning
Alpha Beta Pruning
Alpha-Beta Pruning
K. Sai Prasad
Assistant Professor
Department of CSE
MLR Institute of Technology
Alpha-Beta Pruning
• Alpha-beta pruning is a modified version of the minimax
algorithm.
• It is an optimization technique for the minimax algorithm.
• As we have seen in the minimax search algorithm that the
number of game states it has to examine are exponential in
depth of the tree. Since we cannot eliminate the exponent,
but we can cut it to half.
• Hence there is a technique by which without checking each
node of the game tree we can compute the correct minimax
decision, and this technique is called pruning.
• This involves two threshold parameter Alpha and Beta for
future expansion, so it is called alpha-beta pruning.
• It is also called as Alpha-Beta Algorithm.
Alpha-Beta Pruning (contd..)
• Alpha-beta pruning can be applied at any depth of a tree, and
sometimes it not only prune the tree leaves but also entire sub-
tree.
The two-parameter can be defined as:
• Alpha: The best (highest-value) choice we have found so far at
any point along the path of Maximizer. The initial value of
alpha is -∞.
• Beta: The best (lowest-value) choice we have found so far at
any point along the path of Minimizer. The initial value of beta
is +∞.
• The Alpha-beta pruning to a standard minimax algorithm
returns the same move as the standard algorithm does, but it
removes all the nodes which are not really affecting the final
decision but making algorithm slow.
• Hence by pruning these nodes, it makes the algorithm fast.
Condition for Alpha-beta pruning: