21 NAND Docs 中文

NAND plays Squared

A netlist of 386 NAND gates plays the 11×11 Squared mini game in your browser. The netlist picks its own moves to reach the target square.

How to play: click "▶ Play". The netlist controls the white square. Each step it picks up, down, left, right, or stay, trying to reach the green target square. Reaching it scores 1 point. Leaving the board, or not reaching it within 33 steps, loses 1 point.

How it actually does: we played out all 14,520 positions on the 11×11 board (own square × target square) one by one. Every one reaches the target, every step gets closer, 7.3 steps on average. From the page's starting square (the center), all 120 targets are reached too, in 5.5 steps on average. For comparison, picking a random move each step reaches the target only about 11% of the time. Command: python3 grid_policies.py --page …/assets/squared/en.html (the script is in our code repository and is not public yet).

The demo lives on this site as one file. It loads no outside scripts, fonts, or images.

What this player is

ItemValue
Gates386 NAND gates, 0 latches
Input14 bits: your square and the target square, a 7-bit number each, low bit first (number = row × 11 + column)
Output3 bits: move 0–4 (stay, down, up, left, right)
SourceThe full truth table of the rule "first reach the target's row, then its column" (all 121 × 121 inputs listed), reduced to NAND gates with yosys / abc; checked exhaustively on every input
Written on chain2026-09-15, block 121982629, circuit #287 on processor 0x6Fb4…5B38

How the page checks it

The on-chain button