Home▸Algorithms & AI▸Langton's Ant — 2D Cellular Automaton Highway Simulator (2D)

🐜 Langton's Ant — 2D Cellular Automaton Highway Simulator (2D)

A pure Canvas2D build of Langton's Ant: the classic turn-right-on-white / turn-left-on-black cellular-automaton ant that wanders chaotically for ~10,000 steps, then spontaneously builds a periodic diagonal 'highway'. Adjustable speed, generalised turmite rule strings, and an optional second ant sharing the same grid.

Algorithms & AI2DEasy60 FPS📱 Mobile-adapted⇄ 3D version
2d-langton-ant ↗ Open standalone
⚙ Under the hood

A pure Canvas2D build of Langton's Ant, the classic cellular automaton ant: on a white cell it turns right, flips the cell black, and moves forward; on a black cell it turns left, flips the cell white, and moves forward. It wanders chaotically for about 10,000 steps before spontaneously building a periodic diagonal highway pattern. Adjust the step speed, try generalised turmite rule strings, and switch on a second ant sharing the same grid.

cellular-automatonalgorithmsemergencecanvas2dturing-completeturmite

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)