/building · August 2026

Drop7 Research

game theory · expectimax · iterative deepening

My first public GitHub project in 2010 was a Java simulation of the iPhone game Drop7, in which I made an amateur attempt at picking the statistically optimal move. Sixteen years later, I rebuilt it as an agentic research project, with an expectimax solver that runs directly in your web browser.

Drop7 is a puzzle game played on a 7x7 board where you drop numbered discs. A disc explodes when the number of adjacent discs in either its row or its column equals the number on the disc. You lose if the board fills up with discs, and every five discs adds a new row of "hidden discs" which only reveal a number once you've created two adjacent explosions.

Everything falls by gravity, so when a disc explodes, it can set off a chain reaction of subsequent explosions. This is also the key to achieving a high score: a disc cleared in chain wave d earns 7 × d2.5 points, so later waves are worth much more without being exponential.

It's a remarkably simple input for a complex game: "click on a column, drop a disc".

play the game

play

you choose every column

score0

level1

rise
drop6
tap a column
c1
c2
c3
c4
c5
c6
c7
solid · 2 hitscracked · 1 hitmatch contiguous row or column
game 0xd7072010
Drop a numbered disc into any column. Gray discs crack after one adjacent explosion and reveal their number after the second; every fifth move pushes up a new gray row.

What a strong board looks like#

Adam Saltsman describes keeping covered discs high and preserving a “fertile” topology that can keep exposing new numbers. Another detailed player guide named "Drop7 Stratergy [sic]" emphasizes delayed chain patterns and the danger of low-number clogs such as adjacent 1s or long runs of 2s. In other words, the best-looking move often scores nothing now: it stores a trigger that can release several discs after a future drop or row rise.

David Walton's Sequence-mode solver scored 5,205,955 by searching windows of 14 known discs, committing only the quiet setup before the best chain trigger, and replanning at that trigger. That event-boundary idea is useful, but the result is not comparable to this game: his solver knew hundreds of future discs and the values hidden in incoming rows, and used roughly 465 trillion simulated drops. I also found an earlier Q-learning experiment, but no public-state Hardcore solver that demonstrated sustained high-level play. Work on n-tuple value functions for 2048 and Stockfish's NNUE evaluator is more architecturally relevant, since the underlying idea is to represent local board patterns with a compact evaluator that is cheap enough to call at every search leaf.

Search the decisions and the chance#

My primary focus is a leaf evaluator based on two types of nodes: a decision node over every legal column, and a chance node over the seven possible next discs. The strata policy defines how I evaluate the numbers that could be hiding under a newly opened gray - 7 strata does a quick search of all seven possibilities, while lower strata attempt to reduce computation time by sampling possibilities.

evaluate · you make the move

evaluate

search recommends; you decide

score0

level1

rise
drop6
tap a column
c1
c2
c3
c4
c5
c6
c7
solid · 2 hitscracked · 1 hitmatch contiguous row or column
game 0xd7072010
The highlighted column has the highest expected value at the last fully completed depth. Change the depth, wait for the recommendation, or deliberately disagree with it.

You can read more at Drop7 Research to see all the most recent areas of exploration into an automated strategy that can score a million points.

auto · watch the policy

auto

search chooses and plays

score0

level1

rise
drop6
tap a column
c1
c2
c3
c4
c5
c6
c7
solid · 2 hitscracked · 1 hitmatch contiguous row or column
game 0xd7072010
Auto mode evaluates, shows its choice, plays it, and starts again. Pause at any point to inspect the position.

The original solver#

The code I wrote in 2010 captured the core game mechanics, but the code quality left something to be desired. I did not properly handle the five-move row rise, and the normal-play path cracked gray discs without replacing a fully revealed gray with a random number.

The rebuilt engine treats a move as a pure state transition. Explosions in the same wave happen simultaneously, gravity waits until the wave is over, and every random reveal can be replayed exactly in a test.

The original program averaged randomly generated future discs and most importantly, random future column choices after the opening choice. That is, there was no pruning of moves that were clearly suboptimal, so it simply measured how an opening move fared under random subsequent play (not how it fared if every later move was also chosen well).

The original solver was intended to inspect roughly 79 possible combinations of the opening column plus four future discs and columns. The checked-in version never completed that enumeration: it omitted the final permutation and its zero/one-based column mismatch throws on the first column. There is therefore no trustworthy numerical 2010 baseline to compare with the complete-game results above.

A rendered Drop7 board beside console output scoring each of the seven columns
Eclipse showing the Java source for the board simulator and the permutation generator

The horizon effect on the original solver meant that it would not stack up discs into complex chain reactions.

For me, Drop7 was a gateway into chess engine development where there is a lot more established research.

cd /building