Skip to the games

The Lab · Five playable systems

Arcade

Five games, each built around an algorithm I wanted to implement properly rather than approximate. Every one ships its solver alongside it, with live telemetry so you can watch the search work — and each is honest about whether its AI can actually promise you a win.

On guarantees

“Can the AI always win?” has a different answer for each of these, and the difference is the interesting part. Randomness and hidden information are what break a guarantee — not the quality of the search.
Game Guarantee Why
Snake always wins Deterministic and fully observable. The cycle invariant makes a fatal move unreachable.
Sudoku always solves A finite exact-cover search. If a solution exists, Algorithm X finds it.
Connect Four perfect at the horizon Solved in theory, but proving it from an empty board is expensive. Inside its search horizon the result is exact.
Minesweeper no Hidden information. Some boards reduce to a genuine coin flip; the solver reports the odds instead of bluffing.
2048 no Tiles spawn at random, so for any policy some spawn sequence beats it. Only a measured rate is honest.

Measured 2048 strength

scripts/benchmark-2048.mjs

Games sampled
Reached 2048
Reached 1024
Median score
Mean moves per game

Run npm run test:2048 to reproduce these numbers locally. The benchmark drives the same engine module the page loads, over seeded games, so a run is reproducible.