Langton's Ant 3D

Every visit raises a tower; a Blender ant walks the board. Same model as the 2D page

Presets

Playback

Rule and board

Speed

Camera

Layers

Quality

Model check

The science

The rule

The ant sits on a cell of a grid and faces one of four directions. At every step it reads the colour c of its cell, turns by the angle assigned to c in the rule string (L = 90° left, R = 90° right, N = straight, U = U-turn), advances the cell colour c → (c + 1) mod k, then steps one cell forward. The classic rule is RL with two colours: on a pale cell turn right, on a dark cell turn left.

Three regimes of the classic ant

  • Simple for the first few hundred steps (small symmetric patterns).
  • Chaotic from roughly step 500 to step ~9977, an irregular blob.
  • Highway: afterwards the ant repeats a 104-step cycle that moves it 2 cells diagonally and adds 12 coloured cells per cycle, building a diagonal road to infinity. That every start leads to a highway is observed, not proved: it is an open problem. Highways were found by Gale, Propp, Sutherland and Troubetzkoy (1995); the ant is also known to be Turing complete in the sense of being able to simulate logic gates (Gajardo, Moreira and Goles, 2002).

Reversibility

Given the cell the ant just left (the cell behind it), its colour and the turn applied there are determined, so every step has a unique inverse: colour ← colour - 1 (mod k), heading ← heading minus the turn. The page's Run backwards button uses exactly that inverse; running forward then back returns the plane to blank. Check 2 confirms it. With several ants this is lost because two ants may meet on one cell, and the page only offers reversal for one ant.

Quantities shown

Cells off background counts cells whose colour is not 0; for RL the colour of a cell equals the parity of the number of visits, which check 3 verifies. The distance is measured from the start in unwrapped coordinates, so the torus wrap-around does not reset it. The highway detector compares the ant's displacement over the last three 104-step windows.

Honest simplifications

The plane is a finite torus (up to 320 x 320). The real ant lives on an infinite plane, so when a highway travels around the torus it collides with its own earlier trail and the pattern changes again. That is a property of the torus, not of the rule. Multi-ant runs update the ants in a fixed order within a step, one of several possible conventions.

Loading model...
Loading Blender model...
Cells off background vs step
Distance travelled vs step
Colour shares
Highway drift per 104 steps
Made with 🟠 Blender · Three.js