Skip to applet controls
AI Playgroundsv1.9.5
AI Playgrounds · v1.9.5

Game Trees: Minimax and Alpha-Beta Pruning

Back terminal utilities up through alternating MAX and MIN turns. Then switch on alpha-beta pruning to see which subtrees can be skipped without changing the exact root decision.

Model boundary: finite deterministic two-player zero-sum perfect-information trees. Pruned nodes remain visible as part of the problem definition but are labeled not evaluated by the algorithm.

Root valuehidden
Selected movehidden
Optimal sethidden
Visited0
Leaves evaluated0
Pruned nodes0
Trace not started

The tree and terminal utilities are visible, but no search event has been revealed.

Text equivalent of current state


    
Quick Assign · QA-MINIMAX-01 · 10–15 min

Same answer, less search

Use the pruning or move-order Guided Challenge. Predict first, reveal the trace, then justify why skipped work cannot change the exact minimax answer.

Use the existing Guided Challenge for the run/reveal step. Responses stay in this browser unless you deliberately copy or print them.

State snapshot appears here.

Before you read

Minimax assumes both players choose optimally: MAX keeps the largest backed-up value and MIN keeps the smallest. Alpha-beta returns the same answer while skipping branches that current bounds prove cannot matter.

Terms used in this explanation

Game tree
Possible moves arranged as parent and child positions.
Terminal utility
The score assigned to a finished position.
MAX node
A turn that keeps the largest child value.
MIN node
A turn that keeps the smallest child value.
Minimax value
The result backed up under optimal choices by both players.
Alpha (α)
The best value MAX can already guarantee on the current path.
Beta (β)
The best value MIN can already guarantee on the current path.
Cutoff
A proof that remaining siblings cannot change the ancestor decision.

1. Define the game before searching

A game tree lists legal continuations. Terminal utilities are part of the problem definition, not values invented by minimax.

This lab assumes a finite, deterministic, two-player, zero-sum, perfect-information game and optimal play by both sides.

2. Back values from leaves to the root

At a MAX node, keep the largest returned child value. At a MIN node, keep the smallest. Repeating that rule gives the root minimax value and an optimal move.

A high leaf is not enough: the opposing player chooses among the leaves available on their turn.

3. Carry alpha and beta bounds

Alpha is the best value MAX can already guarantee along the current path. Beta is the best value MIN can already guarantee.

Once alpha is at least beta, remaining siblings cannot improve the decision for the player whose ancestor already has the stronger option.

4. Pruning preserves the exact answer

A pruned node still exists in the game tree. The algorithm merely avoids evaluating it because the current bounds prove it cannot affect the root choice.

Move ordering changes when strong bounds appear. It can reduce work dramatically, but it cannot change the exact minimax result on the same fixed tree.

What this model leaves out

Large games require depth limits, heuristic evaluation, transposition tables, iterative deepening, and other search engineering.

Games with chance, hidden information, simultaneous moves, more than two players, or non-zero-sum payoffs need different models.

For teachers

Curriculum: Game trees, terminal utility, alternating MAX/MIN backup, optimal play, alpha and beta bounds, safe cutoffs, and move ordering.

Pre-exploration prompts

  • Who chooses the next node at a MIN turn?
  • Can the largest leaf determine MAX’s move by itself?
  • What would make it safe not to inspect a branch?

Post-exploration prompts

  • Back up the simple tree without running the applet.
  • Find the exact event where the first cutoff becomes safe.
  • Reverse move order and compare evaluated leaves.
  • Explain why pruned means not evaluated, not removed from the game.

Misconceptions to test: MAX always chooses the largest visible leaf; pruning changes the answer; pruned nodes do not exist; alpha-beta always prunes; move ordering changes the game value.

♿ Text and keyboard support

Text and keyboard support

Use Tab and Shift+Tab to move through controls. Use Enter or Space on buttons and arrow keys on sliders or select controls.

Read the current model state in the applet’s text-state panel.

Important results are available as text and do not depend only on color or motion. This does not replace a full human assistive-technology audit.

↑ Back to the applet controls

Guided Challenge

Predict first, lock the prediction, then reveal the deterministic mechanism.