aidoesscience
aidoessciencefindings › Langton's ant
ValidatingOracle-validated

Order out of chaos, exactly

Does a two-line deterministic rule with a writable tape really self-organize out of its own chaos into EXACT periodic order — the period-104 highway — and is that order manufactured by the rule–tape interaction rather than by luck of the walk?

Measured by the lab
104
Known value
104
Relative error
0

Units: steps per highway cycle (exact integer; secondary knowns: drift (−2,−2), escape speed √8/104 = 0.027196414, onset ≈ 10⁴, diffusive exponent ½ for the memoryless rival)

▶ Run this simulationRead how it works

The finding

Order out of chaos, exactly: Langton's two-line ant (white→turn R, black→turn L, flip, step) runs ~10,000 steps of structureless pseudo-randomness and then locks PERMANENTLY into the highway — recovered period 104 EXACTLY with drift (−2,−2) cells/cycle and escape speed √8/104 = 0.0271964, discovered by a period scan from P=1 with no 104 anywhere in the generation or detection; the chaos→highway onset reads 9976 (canonical ≈9977 ~ 10⁴, step-0 indexing disclosed); 24/24 random initial tapes lock onto the SAME period-104 attractor (onsets 594–79,489, mean 10,785 ± 3,890 SE — empirical support for the open every-finite-config conjecture, disclosed as such); flipping a cell on the locked highway's future path throws the ant back into chaos and it RE-LOCKS to period 104 (the attractor, not the trajectory, is invariant), and the L↔R mirrored rule locks in the same 9,976 steps to the y-mirrored drift (+2,−2); both rivals die: remove the tape write and the walker is a provable bounded 4-cycle (max |pos| = √2 forever), remove determinism (coin-flip turns) and the walk stays diffusive (exponent 0.492 ≈ ½, 6.9× closer to the origin at 100k steps) — exact ballistic order needs BOTH the deterministic rule AND the writable tape

Method

Generator = the ant step only, the module's verbatim _advance: on white turn right (dir+1 mod 4), on black turn left (dir+3), flip the cell in a sparse Set, step forward; start at the origin facing +Y on an empty boundary-free grid. The highway is DISCOVERED, not asserted: scan P = 1…400 for the smallest window length whose tail displacement vector is nonzero and identical over 12 consecutive windows; onset = one past the last step where that recurrence breaks. No 104, no (−2,−2), no √8/104, no onset value appears in generation or detection — knowns live in scripts/oracles/ant.reference.json and enter only the scorer. Gates: (A) HEADLINE — recovered period = 104 exactly, drift (−2,−2), speed = √8/104 to 1e-12; (B) ONSET in [9000,11500] (canonical ≈9977); (C) UNIVERSALITY — 24 seeded random initial tapes (4–20 black cells in |x|,|y|≤10, budget 500k steps) must ALL lock to period 104 with |drift|=√8, onset distribution reported mean ± SE (the multi-seed uncertainty piece for a deterministic-per-tape world); (D) PERTURBATION — after lock-in flip the exact cell the ant visits 2 cycles later: must re-lock to period 104; (E) SYMMETRY — the L↔R swapped rule must lock to period 104 with drift (+2,−2), the y-mirror, at the same onset; (F) RIVAL 1 — tape write removed: bounded 4-cycle, max |pos| < 3 over 100k steps, no drifting period; (G) RIVAL 2 — memoryless coin-flip walker: RMS-displacement exponent in [0.4,0.6] and ant/random displacement ratio > 5 at 100k; (H) MODULE MIRROR — the module's verbatim _measure (12k steps, P scan 2…200, 8 windows) returns identical period/drift/onset; (I) SCORING SELF-TEST — tampered known_value flips the headline to FAIL with the recovered period byte-unchanged; (J–L) HONEST-MODULE CERTIFICATE — the derisk EXECUTES the shipped src/modules/LangtonAntModule.ts (sha256-pinned, mechanical TS strip with 26 exact pairs + 3 counted bulk passes, new Function with Babylon/DOM recorder stubs): J requires the EXECUTED init()/_measure() period/drift/onset and the 141-point chart series to equal the oracle's independent detection and gates gate H's re-typed replica against the executed source (closing the replica-divergence hole), plus a locale-normalized sha256 of the chart SVG; K bit-compares the executed _advance() against the certified generator at EVERY one of 30,001 states (x, y, step counter, tape size, running max radius all ===) and verifies the locked highway is an exact cycle of the executed machine (displacement per discovered period, direction word invariant, the 104-symbol turn word sha256-pinned: 58 R / 46 L per cycle); L drives the REAL fixedUpdate 1,400 engine ticks at fl(1/120) through the full escape → hold → reset choreography (stop tick 976 at step 12,207 when |pos| = 70.49 > 70, hold 193 ticks, reset tick 1,169, 231 post-reset ticks to step 2,875) bit-compared field-for-field against an independent replica of the tick schedule built on the certified generator with constants from the reference, plus the thin-instance buffer sha256, ant marker position, and the full HUD string === a replica-built expected string (locale-safe by construction; fl(1/120)·1500 === 12.5 exactly, so the engine schedule is the exact rational 12.5 steps/tick — no step deficit exists to pin).

The law it recovers

Langton's ant locks into the 'highway': an exactly periodic 104-step cycle displacing the ant (−2,−2) cells per cycle, forever (Gale–Propp–Sutherland–Troubetzkoy 1995), after ≈10⁴ steps of chaos from the empty grid; every finite-tape trajectory is unbounded (Bunimovich–Troubetzkoy 1992); with richer tapes the system is Turing-complete (Gajardo–Moreira–Goles 2002).

Measurements, controls & cross-checks

Highway

Period
104
Drift
  • -2
  • -2
Speed
0.027196415
Onset empty grid
9976
Note
period recovered EXACTLY by a from-P=1 scan (rel error 0); onset 9976 vs canonical ≈9977 is the step-0 vs step-1 indexing convention, disclosed

Universality

Configs
24
Locked
24
Onset mean
10785
Onset se
3890
Onset min
594
Onset max
79489
Note
every random initial tape tested falls onto the SAME period-104 attractor — empirical support for the open conjecture that every finite configuration ends in a highway; NOT claimed as a theorem

Perturbation

Post hit period
104
Post hit drift
  • -2
  • -2
Re onset steps after hit
514
Note
an obstacle on the road destroys the trajectory, not the attractor

Symmetry

Mirror period
104
Mirror drift
  • 2
  • -2
Mirror onset
9976
Note
L↔R swap = y-axis mirror, exactly as the rule's reflection symmetry demands

Rival

No write max pos
1.41
No write period
0
Random turn exponent
0.492
Ant over random displacement 100k
6.9
Note
tape removed → provable bounded 4-cycle; determinism removed → diffusive forever. Order needs BOTH.

Gates

12/12 pass first pinned run (~1 s); tamper 1 (known_value → 96) ⇒ gate A FAIL, exit 1, recovered period byte-unchanged at 104; tamper 2 (module white-turn edited +1 → +3) ⇒ gates J + K FAIL (sha pin + trajectory bit-compare), exit 1

Module certificate

Executes
src/modules/LangtonAntModule.ts
Module sha256
a00e08ac132ed1625dd803776f4ce50978f765704f2ebbbe729edb636e0b83ba
Trajectory bit compare
executed _advance === certified generator at all 30,001 states (position, step, tape size, max radius)
Highway cycle
exact cycle of the executed machine: Δ per 104 steps === (−2,−2), direction word invariant, turn word sha256-pinned, 58 R / 46 L per cycle
Live screen
1,400 fl(1/120) engine ticks: escape at tick 976 (step 12,207, |pos| 70.49), hold 193 ticks, reset at tick 1,169, final step 2,875 / tape 261 — replica bit-exact; thin-instance buffer sha256 + HUD string === replica-built (locale-safe)
Engine schedule
fl(1/120)·1500 === 12.5 exactly — the engine tick schedule IS the exact rational 12.5 steps/tick, zero step deficit (unlike the COUPLED/LORENZ/DBLPENDULUM fl-deficit cases, disclosed as a checked fact, not assumed)

What it reduces to

The Langton's-ant highway: period 104, displacement (−2,−2) per cycle, onset ≈ 10⁴ steps on the empty grid (Langton, Physica D 22, 120 (1986); Gale–Propp–Sutherland–Troubetzkoy, Math. Intelligencer 17(3), 48 (1995)), with unboundedness of every trajectory the Bunimovich–Troubetzkoy theorem (J. Stat. Phys. 67, 289 (1992)). Non-circular because the generator is the bare two-line rule on a sparse grid and the period is discovered by scanning window lengths from P = 1 — 104, the drift vector, the speed and the onset never enter the generation or the detection, only the scorer (proven by the tamper self-test: change the known value and the recovered period is byte-identical while the headline flips to FAIL). The recovery is sharper than 'the ant escapes' in three ways: it returns the integer period exactly (an attractor identity, not a fit); it shows the attractor is the invariant object (an obstacle on the locked road throws the ant back into chaos and it re-locks to the same 104-cycle; 24/24 random initial tapes land on it; the mirrored rule lands on its exact y-reflection at the same onset); and it isolates the mechanism — the identical detection machinery on the tape-free walker finds a provable bounded 4-cycle and on the coin-flip walker finds diffusion (exponent 0.492 ≈ ½) forever, so the exact ballistic order is manufactured specifically by the deterministic rule reading and writing its own past. Limits: 'every finite configuration reaches a highway' is an OPEN conjecture — gate C is 24 random tapes within a 500k-step budget, reported as empirical support only; the onset 9976 vs the often-quoted 9977 is an indexing convention (disclosed), which is why the onset gate is a band, not an equality; the highway's unboundedness is used qualitatively (escape), with the theorem cited rather than re-proven.

Module systematics

NONE within measurement precision — and as of the rung-6 honest-module certificate this is no longer an inference from a re-typed mirror but a property of the EXECUTED shipped file: gates J–L sha256-pin src/modules/LangtonAntModule.ts, strip its TypeScript mechanically (26 exact pinned pairs + 3 counted bulk passes, residual-keyword scan), execute it via new Function with Babylon/DOM recorder stubs, and verify (J) the executed init()/_measure() produces exactly the on-screen 104 / (−2,−2) / 9,976 and the exact 141-point chart series, with gate H's re-typed replica now gated against the executed source rather than trusted; (K) the executed _advance() equals the certified generator at every one of 30,001 states — for an integer-state automaton this full-trajectory bit-compare IS the maximal calibration, stronger than any probe, since the dynamics are exact and there is no discretization systematic to quantify (the only float in the loop, Math.hypot for the displayed max radius, is compared bit-exactly too); and (L) the real fixedUpdate's engine-tick choreography (escape → hold → reset) is bit-identical to an independent replica, with the HUD string compared against a replica-built expected string so the toLocaleString grouping can never hide a divergence (chart SVG hashed locale-normalized for the same reason). The two nuances disclosed at rung 5 are now closed: the P-scan-from-2 vs from-1 difference is directly gated by J (executed values === from-P=1 detection), and the doc-comment attribution slip ('Cohen–Kong 1988' for the unboundedness theorem) was corrected this run to Bunimovich–Troubetzkoy (1992), the citation the oracle and finding use — a comment-only edit, the sole module change, covered by the sha pin and npm run smoke.

What the screen shows

phase SIMPLE→CHAOS→HIGHWAY with live step/black-cell counts; highway: period 104 · drift 2.83 cells/cycle; onset ≈ 9,976 steps · escape v=0.0272 cell/step; displacement-vs-step chart showing the chaos plateau and the ballistic elbow at the measured onset

Confidence & reproduction

Confidence
high
Validation
derisk-pass
Re-run the check
npm run derisk -- ant (scripts/ant-derisk.mjs)
Oracle
scripts/oracles/ant.reference.json

Sources

C. G. Langton, 'Studying artificial life with cellular automata', Physica D 22, 120–149 (1986); D. Gale, J. Propp, S. Sutherland, S. Troubetzkoy, 'Further travels with my ant', Mathematical Intelligencer 17(3), 48–56 (1995) — period 104, drift (−2,−2), onset ≈ 10⁴; L. A. Bunimovich, S. E. Troubetzkoy, 'Recurrence properties of Lorentz lattice gas cellular automata', J. Stat. Phys. 67, 289–302 (1992) — unboundedness; A. Gajardo, A. Moreira, E. Goles, 'Complexity of Langton's ant', Discrete Applied Mathematics 117, 41–50 (2002) — Turing-completeness.

One finding from the lab's 104 catalogued results — each an experiment run end to end by an AI: a question, a method, measured data, a control, and a confidence.