Lecture 06.2: Minimax and Alpha-Beta Pruning
Understanding sequential games, the Minimax algorithm for zero-sum games, and optimizing search trees with Alpha-Beta Pruning.
While single-move games rely on simultaneous choices, many real-world strategic games (like Chess, Go, or Tic-Tac-Toe) are Sequential Games. Players move alternately in turns, with full knowledge of the history of previous choices.
[!NOTE] Sequential Games vs. Simultaneous Equilibrium: In simultaneous games, we evaluate Nash Equilibria over static payoff matrices. However, standard Nash equilibrium in sequential games can allow non-credible off-equilibrium threats. Minimax (via backward induction) resolves this by enforcing optimal play at every subtree.
Optimal Decisions: The Minimax Algorithm
In a two-player, zero-sum game, we define the players as MAX and MIN.
- MAX prefers to move to a state of maximum utility value.
- MIN prefers to move to a state of minimum utility value.
The Minimax Value of a node is the utility of being in that state, assuming that both players play optimally from that node to the end of the game.
Visualizing Minimax State Expansion
Below is a simplified game tree. MAX moves first, followed by MIN.
- At the bottom, we evaluate the terminal utility values.
- The MIN nodes (B, C, D) choose the smallest value from their children:
- chooses .
- chooses .
- chooses .
- The root MAX node () chooses the largest value from its children:
- chooses .
Thus, MAX's optimal first move is to move to node .
Alpha-Beta Pruning
The primary limitation of pure Minimax is that the number of game states it must examine grows exponentially with the tree depth: , where is the branching factor and is the maximum depth.
Alpha-Beta Pruning computes the exact same optimal minimax decision without examining every node in the game tree. It prunes branches that are guaranteed not to influence the final decision.
Key Parameters
- (Alpha): The value of the best (highest) choice found so far along the path for MAX. (Initialized to ).
- (Beta): The value of the best (lowest) choice found so far along the path for MIN. (Initialized to ).
[!IMPORTANT] The Pruning Criterion: Stop exploring a child branch as soon as .
Visualizing Alpha-Beta Pruning
- The algorithm explores node 's children and determines 's value is .
- It returns to root . can guarantee a score of at least , updating .
- The algorithm moves to node and evaluates its first child, finding value .
- Because is a MIN node, 's value will be .
- Since root already has , will never choose path (because ).
- Pruning: The algorithm immediately stops exploring 's remaining children ( and ) because .
Complete 6-Stage Alpha-Beta Pruning Walkthrough

Stage-by-Stage Breakdown:
- Stage (a): Search begins at root with . Moving down to MIN node , we evaluate its first leaf with utility . Node updates its upper bound to , giving bounds .
- Stage (b): Node evaluates its second leaf with utility . Since , 's upper bound remains .
- Stage (c): Node evaluates its third leaf (). 's final minimax value is . The algorithm returns to root . Since is a MAX node, updates , setting 's bounds to .
Key Inference: In stage (c), we can infer that the value of the root is at least 3.
- Stage (d): Search moves to MIN node inheriting bounds . evaluates its first leaf with utility , updating 's upper bound to (bounds ).
Pruning Triggered: Root already guarantees a payoff of at least (), while node guarantees a payoff of at most (). Since , there is no point in looking at the other successor states of . The remaining branches of are pruned!
- Stage (e): Search moves to MIN node with inherited bounds . evaluates its first leaf (), setting its upper bound to (). Root updates bounds to .
- Stage (f): Node evaluates its remaining leaves ( and ), computing . Node 's value returns to root . Root computes . The final minimax value for root is 3 (choosing path ).
Step-by-Step Slide Execution Trace
Below is another step-by-step trace showing and updates and branch pruning from the lecture slides:
Step 1: Initializing and Evaluating

Step 2: Pruning at ()

Step 3: Evaluation at and Pruning Subtree

With perfect move ordering, Alpha-Beta pruning reduces time complexity to , effectively doubling the searchable depth in the same time frame.
Multiplayer Games & Alliances
While two-player zero-sum games utilize a single scalar Minimax value, multiplayer games ( players) evaluate states using utility vectors , where component represents the payoff for player .
Alliances in Multiplayer Search
Multiplayer strategic games (such as Risk, Catan, or 3-player Chess) fundamentally introduce alliances—both formal and informal agreements between competing agents:
- Dynamic Alliance Formation: Alliances are made, maintained, and broken dynamically as the game state evolves over time.
- The Counter-Dominance Principle:
- Suppose players and are in relatively weak positions, while player is in a dominant, leading position.
- It is optimal for both and to form an alliance to jointly attack player rather than fighting each other, preventing from destroying each of them individually.
- Dissolution and Betrayal:
- As soon as player is sufficiently weakened under joint attacks, the alliance loses its value.
- At that threshold, either or will violate the agreement and attack the former ally to claim sole victory.
[!WARNING] Evaluation Vectors in Multiplayer Games: In multiplayer Minimax ( algorithm), each player at turn node chooses the move that maximizes their own component in the payoff vector. Unlike 2-player zero-sum games, explicit collusion or betrayal strategies must be modeled to prevent sub-optimal play.
Lecture 06.1: Game Theory and Nash Equilibrium
Introduction to Adversarial Search, Game Theory, Payoff Matrices, Dominant Strategies, Pareto Optimality, and Nash Equilibrium.
Lecture 06.3: Monte Carlo Tree Search (MCTS)
Scaling adversarial search to massive state spaces using randomness and the UCB1 algorithm in Monte Carlo Tree Search.