Domineering Stop-Gate
Take turns placing dominoes on the grid: V lays them vertically, H horizontally. Whoever cannot place a domino on their turn loses. The computer plays perfectly, and with hints on every move you could make carries a dot: green keeps a won game won, red hands the win to the other side.
this position
who wins the empty m × n board
How the perfect player works
The solver answers one question exactly: does the side to move win? It is a plain depth-first search — a position is won if some move leads to a position that is lost for the opponent — with three additions. The board is stored twice, as bitmasks of rows and of columns, so a horizontal move is two adjacent free bits in a row and a vertical one is two adjacent free bits in a column, and both players run the same code with the two arrays swapped. Positions are remembered in a transposition table keyed by the smallest of the board's four mirror images. And before searching, every position is tested with the safe-move bound.
A safe move is a free pair of cells the opponent can never touch: for V, two stacked cells whose left and right neighbours are both filled (or off the board). Nothing the opponent does can take it away. So if the side to move has more safe moves than the opponent could ever make in total (each run of k free cells in the opponent's direction holds at most ⌊k/2⌋ dominoes), it wins without search; if the opponent's safe moves can answer every move the side to move could still make, it loses. The panel on the right shows both numbers for the current position.
The chart
Whoever moves first, H moving first on an m × n board is the same game as V moving first on the transposed n × m board. So the whole chart needs only one search per board shape: "does V win moving first on m × n?" for every m × n with at most 52 cells, run natively under Node with a node budget. Each cell combines two of those runs into V (vertical wins whoever starts), H, 1 (first player wins) or 2 (second player wins). The same symmetry has to hold in Nathan Bullock's published chart, and it does — the tests check all 121 pairs, then check every solved cell here against his value.