Langton's Ant

A deceptively simple two-state Turing machine that draws highways out of chaos.

Overview

Invented by Chris Langton in 1986, Langton's Ant is a cellular automaton that evolves on an infinite two-colour grid. An "ant" moves from square to square following just two rules but manages to create surprisingly complex behaviour.

The Rules

  1. If the ant is on a white square, it turns 90° right, flips the square to black, then moves forward one cell.
  2. If the ant is on a black square, it turns 90° left, flips the square back to white, then moves forward one cell.

That is it—no counters, no memory, just orientation and colour.

Emergent Behaviour

Despite its microscopic rule-set, the automaton goes through three distinct phases:

Complexity

Langton's Ant is Turing-complete; multiple ants and colours can simulate any computation. It is a classic example of emergence: complex global order arising from local simplicity.

About the Visualiser

In the gallery you can:

Feel free to inspect the source in games/js/demos.js for a concise, readable implementation.

← Back to gallery