Langton’s ant is a two-dimensional Turing machine with a very simple set of rules but complicated emergent behavior. It was invented by Chris Langton in 1986 and runs on a square lattice of black and white cells. The universality of Langton’s ant was proven in 2000. The idea has been generalized in several different ways, such as turmites which add more color and more state.


Squares on a plane are colored variously either boac or white. We arbitrarily identify one square as the ‘ant’. The ant can travel in any of the four cardinal directions at each step it takes. The ant moves according to the rules:

  1. At a white square, turn 90 degrees right, flip the color of the square, move forward one unit.
  2. At a black square, turn 90 degrees left, flip the color of the square, move forward one unit.

Langton’s ant can also be described as a cellular automaton, where the grid is colored black or white and the ‘ant’ square has one of the eight different color assigned to encode the combination of black/white state and the current direction of motion of the ant.

Modes of behavior

These simple rules lead to complex behavior. Three distinct modes of behavior are apparent, when starting on a completely white grid.

  • Simplicity. During the first few hundred moves it creates very simple patterns which are often symmetric.
  • Chaos. After a few hundred moves, a big, irregular pattern of black and white squares appears. The ant traces a pseudo-random path until around 10,000 steps.
  • Emergent order. Finally the ant starts building a recurrent ‘highway’ pattern of 104 steps that repeats indefinitely.

All finite initial configurations tested eventually converge to the same repetitive pattern, suggesting that the ‘highway’ is an attractor of Langton’s ant, but no one has been able to prove that this rule is true for all such initial configuration. It is only known that the ant’s trajectory i always unbounded regardless of initial configuration - this is knows as the Cohen-Kung theorem.