Q3 — Games: Alpha-Beta Pruning Puzzle

The mirror-image puzzle: low values go first, both cuts are alpha-type, and the subtree still resolves to exactly 2.

The Question

A subtree reached from the root's path, entered with window α=1\alpha = 1, β=3\beta = 3; leaves take unique values from {1,2,3,4}\{1,2,3,4\}. Structure: MIN subtree-root over two MAX squares? — the FN sheet flips the polarities of the AN variant; the keyed data pins the reading:

#QuestionOfficial answer
3.1Optimal eval assignments (A,B,C,D)1,3,2,4 / 1,4,2,3 / 2,3,1,4 / 2,4,1,3
3.2Minimax value of the subtree2
3.3Cut types (alpha-type, beta-type)2,0
3.4Leaves prunedB,D / D,B

Deep-dive: browse the CONcepts section for Alpha-Beta.

Deriving the assignment family

Both keyed cut counts and pruned leaves say: two alpha-type cutoffs, killing B and D. Alpha-cuts fire at MIN nodes whose running value drops to ≤α\le \alpha. That forces:

  • Left square (MIN): first leaf A≤αin=1⇒A=1A \le \alpha_{\text{in}} = 1 \Rightarrow A = 1... more generally A≤1A \le 1 triggers instantly; with the entering window's α=1\alpha = 1: A=1A = 1, B never read.
  • After the left child returns its capped value, the parent MAX raises the passing bound so the right square's window opens at α′≥2\alpha' \ge 2:
  • Right square (MIN): first leaf C≤α′⇒C=2C \le \alpha' \Rightarrow C = 2 kills D before it is read.

Partition constraint over unique values:

{A}={1}-slot,{C}={2}-slot,{B,D}={3,4} (either order)\{A\} = \{1\}\text{-slot},\quad \{C\} = \{2\}\text{-slot},\quad \{B, D\} = \{3, 4\}\ \text{(either order)}

giving exactly four assignments:

‘ 1,3,2,4 ′,‘1,4,2,3 ′,‘2,3,1,4 ′,‘2,4,1,3 ′`\,1,3,2,4\,',\quad `1,4,2,3\,',\quad `2,3,1,4\,',\quad `2,4,1,3\,'

Any placement with a big value in A's slot reads both left leaves; any small value in C's slot leaves D alive. Two cuts is again the ceiling — first leaves are indispensable.

3.2 — Minimax value → 2

Representative (A,B,C,D)=(1,3,2,4)(A,B,C,D) = (1,3,2,4):

Left=min⁡(1,3)=1Right=min⁡(2,4)=2Root(MAX)=max⁡(1,2)=2\text{Left} = \min(1,3) = 1 \qquad \text{Right} = \min(2,4) = 2 \qquad \text{Root(MAX)} = \max(1,2) = \mathbf{2}

All four assignments yield Root = 2 ✓.

3.3 → 2,0 · 3.4 → B, D

Both cutoffs fired on the α\alpha side (MIN nodes hitting the lower bound), none on β\beta — hence 2,0; the unread second leaves are B and D.

Interactive trace

1 / 4
Assignment (A,B,C,D)=(1,3,2,4). Window entering: alpha=1, beta=3.
evaluatingprunedvalue returned

Tricks & Tips

Answers: 3.1 1,3,2,4 / 1,4,2,3 / 2,3,1,4 / 2,4,1,3 · 3.2 2 · 3.3 2,0 · 3.4 B,D