Field card

File: patersons-worm.html Pattern: the busy-beaver move on a triangular grid — a blind worm with one fixed local rule, reading only the edges it has already eaten, weaving a bounded figure and then walling itself in. Emergence in time, coloured by lifetime, in Michael Beeler's exact 1973 encoding (MIT AI Memo 290). Kin: langtons-ant.html / langtons-ant-rules.html — the square-grid, cell-flipping turmite; this is its edge-eating, triangular-grid cousin. Same "dumb local rule → global structure" vein as collatz.html, busy-beaver.html.

The brief that produced it

A postcard from wandering the neighbourhood: Paterson's worms (Paterson & Conway, 1971; encoding by Beeler, 1973). A worm lives on a triangular grid where six edges meet at each vertex. It arrives, looks at which of the surrounding edges it has already eaten (relative to the way it came), turns by a fixed rule, and eats the next edge — never retracing, dying when it is boxed in. Different rules die fast, weave dense figures, or run forever. Watch one crawl and strangle itself, in the Byrne palette, widget-studio style — and make it the real canonically-numbered worms, not an approximation.

Source of truth

  • The grid & the walk. Six unit directions on the triangular lattice, 60° apart. At each node the worm's heading fixes a frame; it leaves along an uneaten edge, never the one it came on, dying the first time none is free. Edges are tracked by their two endpoints, so "already eaten" is exact.

  • Beeler's rule, exactly. The rule is his octal code decoded into seven fields (4000 virgin gentle/sharp turn · 3000/600/140/30 the four "encounters-its-path" distributions · 6 first origin-return · 1 second return; the rest forced), matched by rotation — recovered directly from the memo's rule-diagram plates. Presets are his own codes: 4000 (the 7-node figure), 0423 (his worked example, 33 steps), 410 (the self-strangling thicket, 5,715 steps), 2416 (22,847 steps).

  • Colour is lifetime. The trail is split into six equal arcs of its life and drawn, in order, through the canonical Byrne palette (--chart-1..6: blue, red, yellow, warm-black, teal, terracotta); the black head marks the vertex where it dies.

Honesty check (why the notation is now canonical, and where a seam remains)

The whole reason to chase the memo: so the worms here are Beeler's actual numbered worms, provably.

  • The engine reproduces Beeler's entire published table. Across all 34 finite worms in his length/nodes tables it matches both the step count and the node count exactly — from 4000 → 9/7 up to 2227 → 220,142 / 77,257 — and all 16 of his documented infinite worms run past 300,000 steps without dying. That is a 50-worm out-of-sample check the geometry and field tables could not pass by accident. Our earlier hero, shipped as "13243", is exactly Beeler rule 410 (5,715 / 2,145).

  • The seam, stated plainly. Most fields (4000, 6, 30, 600, 3000, the geometry) were read from the memo's diagrams and are independently correct. Two were not: field 140 came through with a transcription slip, and field 1 (the second-return rule) wasn't legible — so those ~19 cells were fitted by requiring consistency with Beeler's table rather than read. With 34 finite + 16 infinite worms constraining ~19 binary/ternary cells, the fit is over-determined many times over (a wrong structure has no consistent solution), so this is reconstruction-by-verification, not curve-fitting — but it is the one place a diagram was inferred, not seen.

  • Not the 3.5-billion worm. MathWorld's famous 2014142 → 3,563,608,205 steps is Rokicki's later, different notation, beyond Beeler's 4-digit octal and far beyond feasible simulation (~50 GB of eaten edges). Beeler's own longest finite trace is 2227 → 220,142, which this engine runs to completion and matches to the digit.

Design choices worth keeping

  • The dig was the point. Recovering a 1973 hand-drawn encoding and proving it against the original's own table is exactly the studio's ethos — the notation is true because it was verified against the source, not asserted.

  • Colour-as-notation, not decoration (principle #2): the palette encodes elapsed lifetime, monotonically, so the eye reads when each strand was laid and sees the worm tightening.

  • The death is the climax. The black head lands exactly where the worm boxes itself in.

  • Crawl, don't dump. The trail draws in real time (staggered stroke-dash) — emergence has to be witnessed.

  • Thread-back. "how the rule is encoded" hands Beeler's octal field system to the conversation.

What it teaches the studio

That "one dumb local rule → global structure" has an edge-eating, triangular-grid member sitting next to Langton's ant — and that a 52-year-old encoding buried in a typewritten AI memo can be recovered and made to run again, verified worm-for-worm against its author's own table. The studio's conscience, in one study: chase the primary source, then prove it.