Alpha-Beta Pruning is an optimization technique for the Minimax algorithm used in two-player adversarial games (like Chess or Tic-Tac-Toe). It reduces the number of nodes evaluated in the search tree without affecting the final result.
💡 Goal: Skip unnecessary branches that cannot influence the final decision.
| Term | Meaning |
|---|---|
| Alpha (α) | Best value that the maximizer (AI) can guarantee so far |
| Beta (β) | Best value that the minimizer (opponent) can guarantee so far |
| Prune | Stop exploring a branch because it can't influence the outcome |
Traverse the tree depth-first, just like in Minimax.
At each Max node:
At each Min node:
🧠 Pruning condition: If a move is worse than what we've already seen, don’t explore it further.
MAX
/ \
MIN MIN
/ \ / \
3 5 2 9
Time Complexity (best case): O(b^(d/2))
This means it can double the depth that can be explored compared to basic Minimax.
| Concept | Description |
|---|---|
| Alpha-Beta Pruning | Optimizes Minimax by eliminating branches that won’t affect the final decision |
| Alpha (α) | Best option so far for the maximizer |
| Beta (β) | Best option so far for the minimizer |
| Effect | Same result as Minimax, but faster |
| Best Case | Doubles depth of search vs. plain Minimax |
Open this section to load past papers