Back to Index

Langton's Ant

Langton's ant is not a cellular automaton, but it's possible to encode it as one (although it gets more and more complex the more states you add). The classical case has a grid with two states. On top of this grid is an ant (a cute name for an entity that moves on top of the grid and changes grid states) that moves forward, toggles its underlying cell's state, and turns a direction based on the current cell's state.

The movement of the ant looks somewhat similar to how an ant moves, hence the name. With many of the configurations, a single ant will end up falling into a repeating pattern after a certain number of states. For a single ant on using an RL sequence, it will end up building a pattern in a diagonal line.

Supported values in the sequence are "R" (turn right), "L" (turn left), "U" (U turn), and "N" (no turn).

x




Link to this automaton

Suggested settings:

#w=200&h=200&scale=2&ants=1&sequence=RL&setup_type=E&color=HSV #w=400&h=400&scale=1&ants=30&sequence=LLRR&color=Grayscale #w=400&h=400&scale=1&ants=500&sequence=NNNNL&color=Blue_Lightness #w=200&h=200&scale=2&ants=1&sequence=RRLLLRLLLRRR&setup_type=E&color=Grayscale #w=200&h=200&scale=2&ants=1&sequence=LRRRRRLLR&setup_type=E&color=HSV #w=200&h=200&scale=2&ants=1&sequence=RLR&setup_type=E&color=HSV