Alpha-beta search is an algorithm used to prune branches in the search tree that cannot possibly change the result of a two-player game. It uses two values, alpha and beta, to track the best values for the maximizing and minimizing players at each node. If alpha is greater than or equal to beta at any node, that subtree can be pruned without affecting the optimal outcome. This pruning technique allows alpha-beta search to evaluate positions more deeply than standard minimax search in the same amount of time.
2. Introduction
Alpha-beta search is a way of finding the optimal mini-max solution
while avoiding search sub-trees of moved which won’t be selected.
In the search tree for a two player game, there are a two kind of nodes,
nodes representing your move and nodes representing your opponent’s
moves.
-Alpha-beta Searching gets its name from two parameters.
They describe bond on the values that appear any where along the path
under the consideration:
= the value of the best (i.e. highest value) choice found so far along
the path for MAX.
= the value of the best (i.e. lowest value ) choice found so far along
the path for MIN.
3. Rule for Alpha-beta Search
For MIN node
- if ≤ of max ancestor, Search
For MAX node
- if ≥ of min ancestor, Search
Values of and can not move upward the tree.
Values of and can not move downward the tree.
Firstly find the value of , and then find the value of node.
Traverse the game tree from right to left.
4. Working of Alpha-beta search
Initialize the Alpha = -Infinite and Beta = infinite
(i.e. = - and = ) as they worst possible cases. The
condition to prune a node is when alpha is becomes grater
than or equal to beta.
Start with assigning the initial values of alpha and beta to root
and science alpha is less then beta we don’t prune it.
Carry these values of alpha and beta to the child node on the
left. And now from the utility value of the terminal state, we
will update the values of the alpha and beta.
Repeat the step and whenever the condition (= ) is
satisfied search that branch.
5. Initial Assumption for Alpha and Beta
At the start of the problem, you see only the current state (that is the
current pieces on the game board ). As for the upper and lower
bounds all you know is that it’s a number less then infinity and
grater than negative infinity
9. Advantages Over Native Min-Max
The benefit of alpha-beta search lies in the fact that branches
of the search tree can be eliminated .
The optimization reduces the effective depth to slightly more
than half that of simple min-max.
Alpha-beta pruning can search a tree twice in the same time
that min-max take to search only once.
With perfect ordering, we attain time complexity
O(b d/2) = O (b d).
If b = 40(as in chess), and the search depth is 12 plies, ratio
between optional and sorting is a factor of nearly 406 or
about 4 billion times.
10. Uses / Application of Alpha-Beta search
It is an adversarial search algorithm used commonly for
machine playing of two-player games (Chess Go, etc ).
It is used when a faster searching technique is required.
Efficiency is to be increased.
Time of efficiency is to be decreased.
11. Conclusion
Tow value are created during the search : Alpha value
(associated with Max node)
and Beta value (associated with Min node) pruning does
not affect final result and entire sub-tree can be pruned,
Not just leaves with perfect ordering, we attain time
complexity O(b d/2) = O (b d) Alpha-Beta pruning can
look twice as deep as mini-max in the same amount of
time