A single ant follows two rules on a grid of black and white cells: turn right on a white cell and flip it to black; turn left on a black cell and flip it to white. From this trivial ruleset, extraordinary complexity emerges.
Langton's Ant is a two-dimensional Turing machine that demonstrates emergent complexity: after ≈10 000 steps of apparent chaos the ant spontaneously builds an infinitely repeating diagonal 'highway'. No blueprint exists — order arises purely from local rules.
Press Play to watch the ant roam. Try Multi-Ant mode to see several ants interact, and explore Turmite rules that encode more complex behaviour. Speed slider controls the steps per frame.
Chris Langton introduced the ant in 1986. Despite decades of study, it is still undecidable in general whether any multi-colour ant ever builds a highway — a tiny taste of computational irreducibility.
Langton's Ant is a two-dimensional Turing machine in which a single ant moves across a grid of black and white cells following just two rules: on a white cell it turns right, flips the cell to black and moves forward; on a black cell it turns left, flips the cell to white and moves forward. From this trivial pair of rules astonishingly complex behaviour emerges, and this version also supports multiple ants and custom Turmite rule sets.
Discovered by Christopher Langton in 1986, the ant is a classic example of emergence: after roughly 10,000 steps of seemingly chaotic motion it spontaneously begins building a repeating diagonal 'highway' that continues forever. It demonstrates how universal computation and unpredictable complexity can arise from minimal deterministic rules, and Turmites like it are studied in artificial life, complexity science and the theory of computation.
What are the rules of Langton's Ant?
On a white cell the ant turns 90 degrees right, flips that cell to black and steps forward one cell. On a black cell it turns 90 degrees left, flips that cell to white and steps forward. Those two rules, applied repeatedly, are the entire system.
What is the 'highway' pattern?
After about 10,000 steps of apparently chaotic behaviour, the ant settles into a repeating cycle of 104 moves that translates it steadily across the grid, leaving a diagonal 'highway' of cells. This emergent order appears from completely deterministic rules.
Is Langton's Ant deterministic or random?
It is fully deterministic. There is no randomness anywhere; given the same starting grid the ant always produces exactly the same sequence of moves. The apparent chaos is an illusion of complexity, not actual unpredictability.
Starting from an all-white grid it always eventually builds the highway, a result strongly observed but tied to deep open questions. Starting from grids with pre-placed black cells, the path differs but the highway still tends to emerge.
A Turmite is a generalisation of Langton's Ant: a 2D Turing machine on a grid that can use more cell colours and richer turn rules. Custom Turmite rules produce a huge variety of patterns, from symmetric growths to fresh chaotic behaviours.
It is a striking, minimal demonstration that simple local rules can generate complex, structured global behaviour, and that such systems can be computationally universal. This makes it a teaching staple in complexity science and artificial life.
With several ants on one grid, their trails interact: one ant can flip cells that another later encounters, creating interference patterns. Behaviour can become highly intricate and the clean single-ant highway may never form.
Yes. By arranging cells appropriately, Langton's Ant can be made to perform arbitrary computation, so it is Turing complete. This places a deceptively simple toy among universal models of computation.
In general, no. Whether and when a given configuration produces a highway is not known to be answerable except by running the simulation, reflecting the broader undecidability of long-term behaviour in such systems.
In the classic two-state version, white means the cell has not been flipped an odd number of times and black means it has. Each visit toggles the colour, so the pattern records the cumulative history of the ant's path.