Draw lines on the hexagon field, in any order, a piece at a time. The inside of every closed loop fills, and so does the smaller side of every line drawn from edge to edge. Walls shape the field: a wall joined to the edge is outside, and a wall island is just an obstacle. Each cell runs one rule on itself and its six neighbours, and nothing is shown filled until the whole board has agreed on the picture. Play: Spectacle as a CA · Trained NCA · Strand NCA · Source on GitHub
Every cell holds 22 integer channels. Each step, every cell reads all of them at itself and its six neighbours and computes its new values with one update, the same everywhere. The update never asks which neighbour is which, so the field may be any shape. You write two channels: paint (off, line or wall) and stamp, the number of the step that takes in your edit. state is what is drawn. The rest settle, layer by layer, to the one answer the picture has.
| Channels | What they settle to | Values |
|---|---|---|
field id gpar area | Set once by the host: which slots are cells, a shuffled id per cell, the parent's id in a fixed tree towards the centre cell (the root), and a size weight of 1. | constants |
epoch | The newest stamp in reach. A cell that sees a newer one starts over and ignores every neighbour still on an older epoch, so stale values never have to be undone. | step number |
rim redge | A wall joined to the edge through walls; an open region that touches the edge or the rim. | bit |
leader dist rpar | Each open region names itself by its largest id, with each cell's distance to that cell and a parent one step closer: a tree per region. | id; 0…N+1; id |
cdone sub rsize | The tree counts its cells up to the leader, and the region's size travels back down. | bit; 0…N+1 |
gmax M qt run commit | Up the fixed tree: the largest edge region's size, and whether everything below has stopped changing. Once the root has seen K + 1 quiet steps in a row the picture is certified: commit and the maximum M travel back down. | gate |
want state | A region fills if it touches no edge, or is smaller than M; a tie fills nothing. state takes want only where commit is the cell's own epoch, so a fill is never shown for a picture that was not certified. | bit; off, line, filled, wall |
After the last edit it takes a number of steps proportional to the field's width, not its area. Nothing fills while anything is still being drawn: every edit restarts the count. “Scramble” puts garbage in every computed channel; the rule does not refute garbage on its own, so press “Bump”, which re-stamps the root with the same picture, and watch it recover. Pick a channel under “Show” to watch it settle. The readout checks the settled state against a fill worked out over the whole board.