Langton's loops
A small ring in a cellular automaton, with its genome running around inside it like a train. Every 151 steps it builds a copy of itself next door.
Christopher Langton, 1984 · Turing complete: no · ●●○ moderate
The idea
John von Neumann asked, in the 1940s and 50s, what the simplest machine is that can build a copy of itself. His answer was a cellular automaton with 29 states and a huge universal constructor: a machine that can build anything from a description, including itself if you hand it its own description. Edgar Codd later cut it to 8 states, but the machines stayed enormous.
Read the story
Christopher Langton (1984) asked a smaller question: forget building anything; what is the simplest pattern that builds itself? He took one piece of Codd's machine, a loop of signal carrying wire, and made it copy itself. The result has 8 states, about 86 cells, and reproduces in 151 steps.
There is no program in the usual sense. The "program" is the initial pattern: a square loop of sheathed wire with a short arm, and a sequence of signals circulating inside it. That signal sequence is the loop's genome.
The machine
A square grid, 8 cell states, and the von Neumann neighbourhood: each cell sees itself and its four orthogonal neighbours. A fixed table of transition rules (a couple of hundred entries, the same under rotation) says what each cell becomes.
The loop works like this:
| Part | Role |
|---|---|
| Sheath | A wall of one state on both sides of the wire, so signals stay inside |
| Core | The wire the signals travel on, round and round |
| Genome | Signals encoded as pairs of states: "extend straight" and "turn left" |
| Arm | Where the loop meets the outside; signals that reach its tip act |
As the genome circulates, every signal is copied into the arm and also acted on at its tip. "Extend" makes the arm one cell longer; "turn" turns it left. After the arm has made three left turns it meets itself and closes into a new square. The connection breaks, and now there are two loops, each with its own copy of the genome. The genome is read six times in all, and it only works because the loop has fourfold symmetry: one side's worth of instructions builds every side.
Example
No runnable example; the rule table is too long to list.
No runnable example; the rule table is too long to list. A sketch of the cycle (illustrative):
step 0: one loop, genome circulating, arm pointing right
the arm grows as "extend" signals reach its tip
a "turn" signal bends it left, three times
step 151: the arm has closed into a second loop; the bridge dissolves
both loops now send out arms in new directions
Left alone, the loops fill the plane like coral. A loop that is boxed in by neighbours can no longer grow its arm and goes inactive, so the colony has a thin living layer around a dead core.
Later variants made the loop smaller: Byl's loop (1989, 12 cells), and the Chou–Reggia loop (1993, 5 cells). Hiroki Sayama first made loops that can dissolve (1998), and then the Evoloop (1999), in which loops collide, die and vary, and loops of different sizes compete and evolve.
Patterns it teaches
- Self-replication: the textbook example in cellular automata.
- Quine: the genome is used twice, once copied as data and once executed as instructions, which is how every quine works.
- Cellular automata: everything happens through one local rule table.
- Artificial life: Langton went on to coin the name "artificial life" and organise its first conference in 1987.
Try this
- The loop reads its genome six times. Explain why four sides need six passes, not four.
- Why does a boxed-in loop stop?
- Hard: find a Langton's loops simulator (Golly includes one) and change one genome signal. What breaks?
Further
- Christopher G. Langton, "Self-reproduction in cellular automata", Physica D 10 (1984).
- Wikipedia: Langton's loops
- Hiroki Sayama, "A new structurally dissolvable self-reproducing loop evolving in a simple cellular automata space", Artificial Life 5 (1999), the Evoloop.