Where does the values of alpha-beta search get updated?
2022
Where does the values of alpha-beta search get updated?
- A.
Along the path of search.
- B.
Initial state itself.
- C.
At the end.
- D.
None of these.
Attempted by 76 students.
Show answer & explanation
Correct answer: A
Key idea: alpha and beta are updated during the search as nodes are evaluated; these updates drive pruning decisions.
Initialize alpha and beta at the start of the search (commonly alpha = -infinity, beta = +infinity).
When visiting a maximizing node, after evaluating a child with value v, update alpha = max(alpha, v).
When visiting a minimizing node, after evaluating a child with value v, update beta = min(beta, v).
After each update, check the pruning condition: if alpha >= beta then stop exploring remaining children of the current node (prune).
Worked summary:
Updates happen while traversing the tree (along the search path), not only at initialization or at the end.
These live updates allow the algorithm to prune branches early and avoid unnecessary evaluations.
A video solution is available for this question — log in and enroll to watch it.