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
✨ Featured experiment
Find the first safe prune
Core question: When do alpha and beta prove that a sibling cannot matter?
Run and watch: Apply the first-prune scenario, step until α ≥ β, and identify the nodes not evaluated.
🎯 Try these scenarios first
Pick a scenario, predict what should happen, then apply it and compare the result with your prediction.
Scenario 1: Back up a simple tree
Core question: How do alternating MIN and MAX choices determine the root value?
Run and watch: Use the simple backup tree with minimax and reveal the trace one step at a time.
Predict first: Predict each MIN value, then the move MAX will choose.
Explain afterward: Explain why the largest visible leaf alone does not determine the root move.
Scenario 2: A greedy leaf can be a trap
Core question: Why can a branch containing the largest leaf still be the worse move?
Run and watch: Apply the greedy-trap tree and compare the best visible leaf with the value MIN can force.
Predict first: Predict whether MAX chooses branch A or B.
Explain afterward: Explain why a player chooses a strategy against an opponent, not a single leaf.
Scenario 3: Find the first safe prune
Core question: When do alpha and beta prove that a sibling cannot matter?
Run and watch: Apply the first-prune scenario, step until α ≥ β, and identify the nodes not evaluated.
Predict first: Predict which sibling will be skipped and what root value remains.
Explain afterward: Explain why the skipped node cannot change the ancestor choice.
Scenario 4: Move order changes work, not the answer
Core question: How can the same tree require fewer evaluated leaves?
Run and watch: Use alpha-beta on the good-ordering tree, save the run, then reverse the sibling order.
Predict first: Predict which order exposes useful bounds earlier.
Explain afterward: Explain why both orders must return the same minimax value.
Scenario 5: Some trees offer no useful cutoff
Core question: Why does alpha-beta sometimes visit every leaf?
Run and watch: Apply the no-prune scenario and reveal the full alpha-beta trace.
Predict first: Predict whether any bound becomes strong enough to skip a sibling.
Explain afterward: Explain why alpha-beta’s best-case speedup is not guaranteed.
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.