Jump to content

Langton's ant

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Dakoder (talk | contribs) at 01:37, 23 September 2016. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Langton's ant after 11,000 steps. A red pixel shows the ant's location.

Langton's ant is a two-dimensional Turing machine with a very simple set of rules but complex emergent behavior. It was invented by Chris Langton in 1986 and runs on a square lattice of black and white cells.[1] The universality of Langton's ant was proven in 2000.[2] The idea has been generalized in several different ways, such as turmites which add more colors and more states.

Rules

Animation of first 200 steps of Langton's ant

Squares on a plane are colored variously either black or white. We arbitrarily identify one square as the "ant". The ant can travel in any of the four cardinal directions at each step it takes. The ant moves according to the rules below:

  • At a white square, turn 90° right, flip the color of the square, move forward one unit
  • At a black square, turn 90° left, 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 colors assigned to encode the combination of black/white state and the current direction of motion of the ant.[2]

Modes of behavior

These simple rules lead to complex behavior. Three distinct modes of behavior are apparent,[3] when starting on a completely white grid.

  1. Simplicity. During the first few hundred moves it creates very simple patterns which are often symmetric.
  2. Chaos. After a few hundred moves, a big, irregular pattern of black and white squares appears. The ant traces a pseudo-random path until around 10,000 steps.
  3. Emergent order. Finally the ant starts building a recurrent "highway" pattern of 104 steps that repeats indefinitely.

All finite initial configurations tested eventually converge to the same repetitive pattern, suggesting that the "highway" is an attractor of Langton's ant, but no one has been able to prove that this is true for all such initial configurations. It is only known that the ant's trajectory is always unbounded regardless of the initial configuration[4] – this is known as the Cohen–Kong theorem.[5]

Wave equation

Mapping the ant world to a one dimensional flat torus using Eulers identity,

This can now be recast using partial fractions into the form.

With variables.

  • this represents the orthogonal changes in direction (Electric / Magnetic field lines).
  • and be the complex conjugates of and
  • and where the length of one side of the lattice.
  • and is the basis vector for the z axis, the same principle applies to the other two axis.

We create the complex oscillator (which gives rise to the discrete rotations) where.

and.

Now we create the rotate equation, using the sum over all paths integral, see Feynman chessboard since the ant visits all of the squares over time.

Noting that

And since the continuum is elliptical we need two of these functions

Now we make the Quantum rotor equations

These rotors (torsion based spinor's) when combined expand to form,

This then becomes a superposition of both rotors where in the limit as t tends to infinity we get an equal spread of both functions. At the start of the iteration process, after four iterations of we get which represents a step change in direction of phase, after another four iterations of we get back to , these 8 steps are represented by a simple sum,

Thus in it's native state as a 2x2 SU2 Special Unitary Matrix, we have

and

The Langtons ant Binary matrix becomes an oscillating spinor (a model for a single subatomic particle), with the matrix increased in size we start to see a complex chaotic system which now models an ensemble of particles (a model for the Higgs field interaction).

Universality

In 2000, Gajardo et al. showed a construction that calculates any boolean circuit using the trajectory of a single instance of Langton's ant.[2] Thus, it would be possible to simulate a Turing machine using the ant's trajectory for computation. This means that the ant is capable of universal computation.

Extension to multiple colors

Greg Turk and Jim Propp considered a simple extension to Langton's ant where instead of just two colors, more colors are used.[6] The colors are modified in a cyclic fashion. A simple naming scheme is used: for each of the successive colors, a letter "L" or "R" is used to indicate whether a left or right turn should be taken. Langton's ant has the name "RL" in this naming scheme.

Some of these extended Langton's ants produce patterns that become symmetric over and over again. One of the simplest examples is the ant "RLLR". One sufficient condition for this to happen is that the ant's name, seen as a cyclic list, consists of consecutive pairs of identical letters "LL" or "RR" (the term "cyclic list" indicates that the last letter may pair with the first one.) The proof involves Truchet tiles.

Extension to multiple states

A further extension of Langton's ants is to consider multiple states of the Turing machine – as if the ant itself has a color that can change. These ants are called turmites, a contraction of "Turing machine termites". Common behaviours include the production of highways, chaotic growth and spiral growth.[7]

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. There is no need for conflict resolution, as every ant sitting on the same square wants to make the same change to the tape. There is a YouTube video showing these multiple ant interactions.

Multiple turmites can co-exist on the 2D plane as long as there is a rule for what happens when they meet. Ed Pegg, Jr. considered ants that can turn for example both left and right, splitting in two and annihilating each other when they meet.[8]

See also

References

  1. ^ Langton, Chris G. (1986). "Studying artificial life with cellular automata". Physica D: Nonlinear Phenomena. 22 (1–3): 120–149. doi:10.1016/0167-2789(86)90237-X. hdl:2027.42/26022.
  2. ^ a b c Gajardo, A.; Moreira, A.; Goles, E. (15 March 2002). "Complexity of Langton's ant" (PDF). Discrete Applied Mathematics. 117 (1–3): 41–50. doi:10.1016/S0166-218X(00)00334-6.
  3. ^ Pratchett, Terry (1999). The Science Of Discworld.
  4. ^ Bunimovich, Leonid A.; Troubetzkoy, Serge E. (1992). "Recurrence properties of Lorentz lattice gas cellular automata". Journal of Statistical Physics. 67 (1–2): 289–302. doi:10.1007/BF01049035.
  5. ^ Stewart, I. (1994). "The Ultimate in Anty-Particles" (PDF). Sci. Amer. 271: 104–107.
  6. ^ Gale, D.; Propp, J.; Sutherland, S.; Troubetzkoy, S. (1995). "Further Travels with My Ant". Mathematical Entertainments column, Mathematical Intelligencer. 17: 48–56.
  7. ^ Pegg, Jr., Ed. "Turmite" (Document). From MathWorld--A Wolfram Web Resource, created by Eric W. Weisstein. Retrieved 15 October 2009. {{cite document}}: Unknown parameter |accessdate= ignored (help); Unknown parameter |url= ignored (help).
  8. ^ Pegg, Jr., Ed. "Math Puzzle". Retrieved 15 October 2009..