Rules (normal play)
- A position is a 4x4 board of filled/empty squares.
- On each move, remove one filled square, or two filled orthogonal neighbours.
- The player who makes the last move wins.
This demo computes and explores Grundy values for all 65,536 positions of a finite impartial game on a 4x4 board.
Both players have exactly the same legal moves from every position. There is no hidden information and no chance moves. So this is an impartial combinatorial game under normal play.
The nimber of a position is the mex of the nimbers of all legal options. Nimber 0 means a losing position for the player to move; non-zero means winning with correct play.
Historical context: this is a 2D finite variant of the classic Kayles move pattern (remove one or two adjacent tokens). The Sprague-Grundy framework (Sprague and Grundy, 1930s) gives a complete value-theoretic classification for finite impartial normal-play games, though computing nimbers can still be difficult in practice.
Computing Grundy table for all 2^16 positions...
Nimber: 0
Bit string order is row-major from top-left to bottom-right.
| Move | Result state | Result bits | Nimber(result) |
|---|
Click any listed position to load it into the main board.