Fair expectimax reference (D3/D4)
Completedevidence: ledger-recordedThe reference search itself — four moves of look-ahead, honest averaging over chance, and a hand-tuned board evaluator at the bottom.
The strongest dependable public-information policy in this repository. It is the comparator every new candidate must beat, and the teacher behind most label-generation experiments.
The idea
At each move, fair expectimax builds a tree that alternates between player choices (take the best) and chance events (take the average):
"Fair" means the chance nodes average over what can actually happen — every legal next disc, and the possible gray-disc reveals — instead of hoping for the best reveal or fearing the worst. Depth 4 (D4) completes four full max/chance layers; the leaf is a hand-tuned public evaluator.
Why averaging matters
A hidden gray disc can become anything from a 1 to a 7. An optimistic search assumes the reveal you want; a pessimistic one assumes the reveal you fear. Both mis-rank moves, and the ledger confirms it: fair chance handling beats optimistic, worst-case, and tiny reused reveal samples. The price is work — the tree grows by roughly an order of magnitude per ply.
What the evidence showed
| Configuration | Games | Mean score | Mean moves | Note |
|---|---|---|---|---|
| Fair D3 | 8 | 235,071 | 71.0 | comparison policy |
| Fair D4 | 8 | 400,675 | 116.4 | won 7 of 8 paired games |
| Fair D4 (broad cohort) | 64 | 308,296 | 90.0 | the reference mean |
- Deeper is not automatically better: selective D5, full D5, and cycle-boundary variants all failed their gates (see the sibling approaches).
- One D4 game scored 1,246,684 points — an anecdote, not an average. The million-point target requires the mean to exceed one million.
- D4 is a strong tactical fallback and teacher, but its average is far below the target. Every serious candidate keeps an exact D4 fallback.
Sources
fair-only-horizon.cpp— the fair-only depth-3 evaluator.fair-only-depth4.cpp— the depth-4 reference build (make nativeproducesbuild/fair-depth4).- The TypeScript counterpart used by the benchmark registry is
evaluateMovesinsrc/core/typescript/solver.tswith the combined leaf.
Source files
README.mdxfair-only-depth4.cppfair-only-horizon.cpp