The robot’s landing rule

Why the robot lands on only one color

A Hilbert curve is made from smaller copies of itself, each turned or flipped. A square’s color tells you the direction in which the path would cross that tiny copy: right, up, down, or left. The robot keeps only the blue, right-facing kind. White rings show one possible set of robot landings.

Every square has an address

Imagine zooming into the big square again and again. At each zoom level, one of four address digits tells you which smaller square to enter. The colored address strip in the inspector records those choices.

Order:

How a square gets its color

Start with the whole Hilbert square facing right. Read a cell’s base-4 address from left to right. Each digit chooses one quarter of the current square; the Hilbert rule turns or flips the path inside that quarter. After the final digit, the path’s entry-to-exit direction sets the color. There is no score or guess involved: the same address always produces the same color.

What to try. Hover over the grid to see a square’s path number and address. Click one blue square, then another blue square. The panel compares them and checks the binary fingerprint used by the proof. White rings mark the robot’s chosen blue stops. Following the Hilbert path, there are always only 4–28 ordinary squares between one ring and the next.

Technical detail, if you want it: for two squares with the same color, the first binary scale at which their floor positions differ exactly matches the power of two in the difference between their path numbers. The proof writes this as V(H(n)−H(m)) = ν₂(n−m). That matching fingerprint is what ultimately prevents three robot landings from lining up.