Langton's Ant

Simple Rules, Emergent Complexity, and the Highway to Infinity

Classic RL
Multi-Rule
Multi-Ant
Heat Map

About Langton's Ant

Discovered by Christopher Langton in 1986, this simple cellular automaton demonstrates how complexity emerges from simple rules:

  • Rule: At a white cell, turn 90° right (R), flip color, move forward. At a black cell, turn 90° left (L), flip color, move forward.
  • Initial Chaos: The ant creates seemingly random patterns for the first ~10,000 steps
  • Highway Emergence: After chaos, the ant builds a repeating "highway" that extends forever
  • Turing Complete: Can be used to perform universal computation
  • No Proven Limit: It's unproven whether the ant always builds a highway from any starting condition
0
Steps
0
Cells Flipped
0
Grid Size
0%
Cells Visited

Multi-Color Rules

Extend Langton's Ant to multiple colors and rules. Each letter in the rule string represents a turn direction:

  • L = Turn 90° left
  • R = Turn 90° right
  • Rule Length: Determines number of colors (RLR = 3 colors, LLRR = 4 colors)
  • Famous Rules: RLR creates symmetric patterns, LLRR makes triangular structures, RLLR builds highways
0
Steps
RLR
Current Rule
3
Colors
0%
Cells Visited

Multiple Ants Simultaneously

Watch multiple ants with different rules and colors interact on the same grid. Each ant follows its own rule, but they all affect the same cells, creating emergent interference patterns.

Ant Configuration

0
Steps
2
Active Ants
0
Collisions
0%
Cells Visited

Cell Visit Frequency Heat Map

Visualize how many times each cell has been visited. Colors represent visit frequency:

  • Black: Never visited
  • Blue/Cyan: Rarely visited (1-10 times)
  • Green/Yellow: Moderately visited (11-50 times)
  • Red/White: Heavily visited (50+ times)
Low Visits
High Visits
0
Steps
0
Max Visits
0.0
Avg Visits
0%
Cells Visited