OCA:Langton's ant

From LifeWiki
(Redirected from OCA:Langton's Ant simulator)
Jump to navigation Jump to search
x = 1, y = 1, rule = Langtons-Ant B! #C [[ THUMBSIZE 2 THEME 6 GRID GRIDMAJOR 0 SUPPRESS THUMBLAUNCH ]] #C [[ THUMBSIZE 2 AUTOSTART GPS 3 LOOP 201 ICONS ]]
The first 200 generations of the ant
(click above to open LifeViewer)

Langton's ant is a two-dimensional Turing machine invented by Chris Langton in 1986 with a very simple set of rules but complex emergent behavior:

  • At a white square, turn 90° clockwise, flip the color of the square, move forward one unit
  • At a black square, turn 90° counter-clockwise, 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 eight different states assigned to encode the combination of black/white state and the current direction of the ant.

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 large, 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.
x = 9, y = 9, rule = Langtons-Ant 3.2A$2.4A$.A.2A.A$2A.2A.2A$.A.A2.E2A$2.A.5A$3.2A2.A$4.3A$5.A! #C [[ THUMBSIZE 2 THEME 6 GRID GRIDMAJOR 0 SUPPRESS THUMBLAUNCH ]] #C [[ THUMBSIZE 2 ]]
The highway, which can be thought of as a wickstretcher moving at 2c/104 diagonally
(click above to open LifeViewer)

Computational Properties

In 2000, Gajardo et al. showed a construction that calculates any boolean circuit using the trajectory of a single instance of Langton's ant.

Extension to multiple ants

Multiple Langton's ants can co-exist on the 2D plane, and their interactions give rise to complex, higher-order automata that collectively build a wide variety of organized structures.

An oscillator that uses multiple ants is called a colony.

x = 54, y = 51, rule = Langtons-Ant 20.3A7.A.3A.I.A6.I.5A$22.A7.A.A.A.C3G5.C2G4AG$20.3A.3A2.A2.3A.A.AGA4. A.5AGA$20.A3.A3.A3.A.A2.2AEG5.6AEG$20.3A.3A.A3.3A2$36.G$36.GA$36.EG2$ 16.3A7.A.2A2.3A$18.A7.A2.A4.A.2B7.B7.B$16.3A.3A2.A3.A2.3A.2B6.GB5.HAB $16.A3.A3.A4.A2.A11.G6.HA$16.3A.3A.A3.3A.3A2$16.3A7.A.3A.A.A$18.A7.A3. A.A.A.ADF$16.3A.3A2.A2.3A.3A.2B$16.A3.A3.A3.A5.A$16.3A.3A.A3.3A3.A2$16. 3A7.A.3A.3A$18.A7.A.A.A.A$16.3A.3A2.A2.3A.3A.A$16.A3.A3.A5.A.A.A.BA$16. 3A.3A.A3.3A.3A$36.A$36.BA4$8.3A7.A.2A2.3A.A.A3.A2.2A$10.A7.A2.A2.A.A. A.A3.A.A.4A$8.3A.3A2.A3.A2.A.A.3A.3A.A3.A$8.A3.A3.A4.A2.A.A3.A.A.A3.C A$8.3A.3A.A3.3A.3A3.A.3A$37.A9$.A.3A3.3A.A8.A.2A2.3A.3A$A4.A3.A4.A7.A 2.A2.A.A3.A2.A$A2.3A3.3A2.A.3A2.A3.A2.A.A.3A.2A.DA$A4.A.A3.A2.A.A3.A4. A2.A.A.A3.A2.AH$.A.3A.A.3A.A2.3A.A3.3A.3A.3A! #C [[ THUMBSIZE 2 THEME 6 GRID GRIDMAJOR 0 SUPPRESS THUMBLAUNCH ]] #C [[ THUMBSIZE 2 ]]
A collection of moving patterns using multiple ants
(click above to open LifeViewer)

Variations

Langton's Ant is one of many "turmite" rules.

Emulation by other rules

The R-pentomino traces the path of dots left by a single langton's ant in the isotropic non-totalistic rule B3-cjkq4knqy5cnr7/S02-cn3-ak4eiq5kq6e7e.