Why a Drop7 strategy has to average over luck instead of hoping for it, what "depth" means, and why the strongest policy here is called fair D4.
Every Drop7 turn is two things glued together. First a choice: you pick one
of seven columns. Then chance: the game deals the next disc (any of 1โ7,
equally likely) and, if your move opened a gray disc, shows you a hidden number
you could not have known. A strategy that asks only "which column scores the
most right now?" ignores half the game.
The examples build the idea of looking ahead one piece at a time on a real
position, using numbers computed by the repository's rules engine. The only
"evaluation" used here is points scored, so you can check every figure by hand.
A real position
Every board and score is engine output for this exact position. The yellow number is the largest immediate score. The four ways of judging the position disagree, making the tradeoff visible.
Column 6 looks wonderful: the 1 lands on the stack, clears, the 4 underneath
finds itself in a column of exactly four and clears too, and the 2 falls beside
the 3 and clears as a second wave. The move earns 53 points. A player who only looks
at the present takes it immediately. We will call that player greedy.
The disc you do not know yet
Now suppose you are a little more patient. You know the current disc is a 1.
You do not know what comes after. But you know the odds exactly: seven
possibilities, each one in seven. So for each column you could ask: after I
play here, what is the best I can do with each possible next disc, and what is
that worth on average?
That question is a chance node, and the average is its expected value.
Here it is for the greedy move:
After taking the 53-point chain, the board is almost empty. Whatever disc comes next, the best follow-up is small: the average of the seven best replies is only 14.6 points. The move's fair value is 53 + 14.6 = 67.6.
And here it is for a quieter move, dropping the 1 in column 1 where it simply
clears on its own for 7 points and leaves the chain structure standing:
The board is unchanged except for 7 points banked. Every possible next disc has a strong follow-up. A 2, for example, starts a 155-point three-wave chain. The average reply is worth 69.1, so the move's fair value is 7 + 69.1 = 76.1. That beats the 53-point chain.
That is the whole idea of expectimax in one comparison. The greedy move banks
more now; the patient move is worth more on average, because it keeps the
future open. Neither number required a clever trick. They came from enumerating
what chance can do.
Four ways to handle the same uncertainty
Averaging is not the only option. You could assume the best disc will come
(optimistic), or the worst (pessimistic), or ignore the future altogether
(greedy). On this position, these four attitudes pick three different
columns:
table view
column
Greedy
Optimistic
Fair (expectimax)
Pessimistic
1
7
162
76.1
53
2
7
162
76.1
53
3
7
162
76.1
53
4
14
169
55.3
21
5
7
162
70.6
53
6
53
99
67.6
60
7
14
169
55.3
21
The same seven columns valued four ways. Greedy and pessimistic both take the 53-point chain for different reasons: one ignores the future, while the other distrusts it. The optimist plays column 4 and hopes for a 3 next, a one-in-seven chance worth 155 points. The fair player chooses column 1. Columns 1, 2, and 3 are identical here, so the leftmost tied column wins.
Across the research ledger, the repository's
status summary lists "fair chance handling matters" as its first durable
conclusion: optimistic, worst-case, and tiny reused reveal samples
ranked moves incorrectly in measured games. The optimist chases jackpots
that usually do not arrive; the pessimist refuses to build anything; averaging
is the attitude that survives contact with a random disc stream.
Looking further ahead: depth
Everything above looks one move ahead and then stops. Nothing prevents you
from continuing: after each possible next disc, consider each column again,
then each disc after that, and so on. How many moves ahead you go is the
search's depth. A depth-4 search, written "D4", plays out four of its own
choices interleaved with four rounds of chance before it evaluates what it sees.
The price is steep:
Positions at the bottom of a full-width tree: 7 columns ร 7 possible next discs per ply
Seven columns times seven next discs means every extra move ahead multiplies the tree by 49. Gray-disc reveals multiply it again. A literal depth-4 tree has millions of leaves; the measured work of the repository's depth-4 search is about 1.5 million evaluations per decision, because identical positions reached by different routes are recognised and shared (a transposition table).
Because the tree explodes, two tricks are universal:
Evaluate, don't finish. At the bottom of the tree the game is not over, so
the search needs an opinion about how good each leaf board is. That opinion is
the leaf evaluator: a hand-written scoring function in the reference
policy, a learned model in many experiments. The concept page on
evaluating a board is about how hard that
opinion is to get right.
Sample the chance. When enumerating every disc and every hidden reveal is
too expensive, the search looks at a fixed handful of representative outcomes
per chance node. The repository calls these samples strata, usually five or seven.
Fewer strata is faster and noisier.
A live tree you can search yourself
Everything above was drawn from one recorded position. The explorer below
builds the same kind of tree live, in your browser, for any seeded game:
the position is the MAX node, each legal column is a choice whose number is
the exact average over every chance outcome of that drop, and the outcomes
under the expanded column are real boards the engine produced, each with its
probability and the leaf's opinion of it. Click a column to expand it, click
an outcome to watch the engine play that transition and carry on from the
board it leaves behind. Set "below each outcome" to one or two plies to see
the values move as the search looks further.
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.
building the treeโฆ
building the tree in the browserโฆ
MAX node the position; the search picks the column with the highest expected value.chance branches every exact outcome of a drop โ the next disc, and what any cracked gray disc turns out to be โ weighted by its probability.leaf the opinion of the board scorer where the look-ahead stops. Click a column to expand it; click an outcome to play that transition and continue from it.Columns are numbered 1โ7 from the left. Values come from the browser solver and are a demonstration, never research evidence; seed 0x5eed1001 is the same game as /play.
A live expectimax tree on a seeded game, built by the browser solver. A fair search plays the column with the highest expected value. The chance branches carry exact probabilities: one in seven for each next disc, then one in seven for each gray disc the move cracks.
Walk the tree yourself
Pick a column, then a next disc, then see every reply ranked. This is exactly
the tree a depth-2 search walks, and you can verify any of the numbers above by
following the same path.
the position ยท next disc is a 1
7
2
3
4
1 ยท choose a column for the 1
Every board and number here was computed in advance by the rules engine with a points-only evaluator; the explorer only lets you walk the tree.
Interactive version of the figures above. A real search does this for every column, every disc, and every reply, several levels deep, millions of times per decision.
What "fair D4" means
The repository's reference policy, fair
D4, is a depth-4 search that takes the best column at every choice node, averages
over chance at every chance node (no optimism, no pessimism), samples five or
seven strata per chance node, and scores leaves with a hand-tuned evaluator.
"Fair" also means it uses only what a real player can see. It never reads hidden
gray values or the random seed.
Fair D4 is a careful, patient, slightly short-sighted player. On
its broad reference cohort it averaged about 308,000 points per game over 64
games, compared with a target of one million. It is the yardstick every other
idea in this repository is measured against.
Why deeper is not automatically better
The natural next question (so go to depth 5, 6, 7?) has been asked and
tested. The status summary records that selective depth 5, full depth 5, and
cycle-boundary variants "often spent much more work, sampled chance outcomes
too noisily, or overrode good D4 actions on unstable estimates." Deeper trees
need more chance samples to stay fair, and a deep search with noisy chance can
talk itself out of a good move. Depth interacts with chance sampling, with the
quality of the leaf evaluator, and with the work budget; it is a dial, not a
ladder. The concept page on
whether more computation is the answer
goes through the evidence.