IN-FEED-AD

Alpha-Beta Pruning in Artificial Intelligence


Alpha-Beta Pruning

  • Alpha-beta pruning is a modified version of the minimax algorithm. 
  • It is an optimization technique for the minimax algorithm. 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 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:

The main condition which required for alpha-beta pruning is:                 α>=β  

Key points about alpha-beta pruning:

  • The Max player will only update the value of alpha.
  • The Min player will only update the value of beta.
  • While backtracking the tree, the node values will be passed to upper nodes instead of values of alpha and beta.
  • We will only pass the alpha, beta values to the child nodes.

Working of Alpha-Beta Pruning:

Step:-1 

Step-2 

Step-3 


Step-4 

Step-5 

Step-6 

Step-7 


Ask question #Pywix

Please Like, Comment, Share and Subscribe THANK YOU!



Post a Comment

0 Comments