Langton's ant

What you see here

This is a simulation of Langton's ant, a cellular automaton invented by Christopher Langton in 1986. The field consists of cells that are either black or white. The ant stands on one cell and faces one of four directions. The whole logic fits into two rules, but the behavior is more complex than it looks.

Rules

Who came up with it

The ant was invented by the American scientist Christopher Langton, one of the founders of artificial life research. In 1986 he proposed this simple cellular automaton, which is still a standard example in the field.

Why it is interesting

At first the ant draws a chaotic pattern that is hard to predict. After about 10,000 steps its behavior changes: the ant starts building a repeating diagonal highway along which it keeps moving. This shift from chaos to order makes the ant a convenient model for studying self-organization, cellular automata and computation. Start the simulation, change the grid size or speed, and compare how the ant behaves on different fields.