Log inStart free
LESSON 13.05 · 5 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW

Minimax and alpha-beta pruning

Watch minimax score a game tree, then watch alpha-beta skip whole branches.


Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 2 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 13.05 · SEARCH BAY9 LEAVES · DEPTH 2
01
Stage 1 of 5 · Game tree
The game tree lists every play: MAX moves, then MIN. Each of the 9 leaves holds a score for MAX.
Explain it simply

You see a game tree, a map of every way the game can go. Each player has 3 moves at every turn. MAX, at the top, wants a high score, and MIN wants a low one. The 9 squares at the bottom hold the final scores.

A game tree. MAX moves, then MIN, 3 moves each turn. 9 leaf squares hold scores for MAX.

leaf scoresbacked-up valuesα and βcutoffs
MAXMINscoresA3128B246C1452the game tree9 leaves = 3²MAXMINscoresA3128B246C1452the game tree9 leaves = 3²
Toy: 3 moves per turn, 2 or 3 turns deep
STAGE 1 / 5
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
N=bd\sy{N}{data}{N} = \sy{b}{param}{b}^{\sy{d}{param}{d}}
N=32=9N = 3^{2} = 9

b moves per turn for d turns give b to the d leaves.

Common mix-ups

MYTHPruning can change the move that MAX picks.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01If the search looks at the best moves first, does the root value change?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
  • 4 more stages and 2 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.