Field card
File: langtons-ant-rules.html
Pattern: the rule as the thing you edit. The classic ant is just the string RL; the study
makes that string (and the colour count, and the step) a control, so one dumb local move visibly
builds a highway, a symmetric bloom, or chaos depending on the rule. Colour is state: a cell's colour
drives its next turn, and the four cell-colours are the four honest Byrne hues.
Companions: langtons-ant.html (fixes the rule to RL, explores the field);
the emergence quartet busy-beaver.html · collatz.html.
The brief that produced it
A second Langton's Ant where you can redefine the rules in simple ways — change the turns, add a colour, "jump 2". Show the rule as a tiny editable grid; let presets demonstrate the range; keep the four-colour discipline; and don't claim a behaviour you haven't run.
The generalised rule
Cells take colours 0..K-1. On colour c the ant turns per the rule's c-th letter (R/L),
recolours the cell to (c+1) mod K, and steps forward jump cells. K is the rule's length. RL
with K=2 is exactly classic Langton's Ant. Editable: flip any colour's turn, set K from 2 to 4,
set jump from 1 to 3. Colours map to paper / ink / blue / red; the ant is yellow.
Source of truth
Simulated live. Every preset behaviour was confirmed by simulation before being named:
RL→ highway (period 104, drift (2, 2)) — verified;RLR→ chaos: no highway within 60k steps, no mirror symmetry, cells keep growing — verified;LLRR→ symmetric: reflection-match = 1.00 across the best axis, sampled over many steps — verified.
A rule you edit carries no behaviour claim — the readout says "a rule of your own — run it and see." (
jump > 1and arbitrary strings are explorable but deliberately unlabelled.)
Honesty check (the framing this study earned)
This is a clean case of verify before you frame, and the check changed the shipped widget twice:
A first cut labelled
LLRR"symmetric" from memory; a quick vertical-axis test at one step gave only 0.35 match and nearly mislabelled it. Searching all four axis families over many steps found the true symmetry (1.00) — the pattern is symmetric, just not about the axis I first guessed.A crude highway-detector false-matched at tiny periods (it "found" period-2 highways everywhere); replaced with a sustained check (≥4 consecutive equal period-displacements), which correctly isolates
RL's period-104 highway and clears the others.RRLLwas dropped as a preset once verification showed it's justLLRR's mirror (also 1.00 symmetric) — a redundant fourth button, not a new behaviour.
Design choices worth keeping
The rule is a Byrne grid you can touch. Each colour is a swatch with its turn letter; click to flip
R/L, step the colour count and jump with±. The "program" is the figure (cf. the Busy Beaver rule table).Four colours, honestly. Colours 0–3 = paper / ink / blue / red, ant yellow — the generalisation stays inside the studio palette by capping at four colours.
Presets carry only verified notes; edited rules carry none. The variety (road / symmetry / chaos) is shown by running them, not asserted.
Camera fits then follows; accessible by construction (
sr-onlyrules, keyboard play/step/reset).Thread-back: "why does one rule make a highway and another pure chaos?" opens the Turmite story — unbounded-trajectory results, Turing-completeness of some rules, and the general undecidability of whether a given rule ever highways.
What it teaches the studio
Where the sibling study fixes the rule and varies the world it runs on, this fixes the world and varies the rule — and shows that the gap between "highway", "symmetry", and "chaos" is a couple of letters. It also makes the studio's honesty habit the visible subject: the presets are exactly the claims that survived simulation, and the wrong first guesses are recorded above rather than quietly shipped.