Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Langton's ant
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Two-dimensional Turing machine with emergent behavior}} {{Use dmy dates|date=April 2018}} <div id="LangtonsAnt" style="float:right;"><!--Don't remove this! It will be filled with a widget that illustrates Langton's ant for those users with the corresponding gadget activated!--></div> [[File:LangtonsAnt.svg|right|frame|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 [[Emergence|emergent]] behavior. It was invented by [[Chris Langton]] in 1986 and runs on a [[Square tiling|square lattice]] of black and white cells.<ref>{{cite journal | doi = 10.1016/0167-2789(86)90237-X | last = Langton | first = Chris G. | title = Studying artificial life with cellular automata | year = 1986 | journal = Physica D: Nonlinear Phenomena | volume = 22 | pages = 120β149 | hdl = 2027.42/26022 | issue = 1β3| bibcode = 1986PhyD...22..120L | url = https://deepblue.lib.umich.edu/bitstream/2027.42/26022/1/0000093.pdf | hdl-access = free }}</ref> The idea has been generalized in several different ways, such as [[turmite]]s which add more colors and more states. ==Rules== [[File:LangtonsAntAnimated.gif|500px|right|thumb|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Β° 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 colors assigned to encode the combination of black/white state and the current direction of motion of the ant.<ref name="Gajardo2000" /> ==Modes of behavior== These simple rules lead to complex behavior. Three distinct modes of behavior are apparent,<ref>{{cite book |last=Pratchett |first=Terry |title=The Science Of Discworld |title-link=The Science of Discworld |last2=Stewart |first2=Ian |last3=Cohen |first3=Jack |publisher=[[Ebury Press]] |year=1999 |isbn=978-0091865153}}</ref> when starting on a completely white grid. #Simplicity. During the first few hundred moves it creates very simple patterns which are often [[Symmetry|symmetric]]. #Chaos. After a few hundred moves, a large, irregular pattern of black and white squares appears. The ant traces a [[Pseudorandomness|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. All [[Finite-state machine|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<ref>{{cite journal |last1=Bunimovich |first=Leonid A. |last2=Troubetzkoy |first2=Serge E. |title=Recurrence properties of Lorentz lattice gas cellular automata |journal=Journal of Statistical Physics |volume=67 |issue=1β2 |pages=289β302 |year=1992 |doi=10.1007/BF01049035|bibcode=1992JSP....67..289B |s2cid=121346477 }}</ref> β this result was incorrectly attributed and is known as the [[E.G.D. Cohen|Cohen]]-Kong theorem.<ref>{{cite journal |last=Stewart |first=I. |title=The Ultimate in Anty-Particles |journal=Sci. Am. |volume=271 |pages=104β107 |year=1994 |issue=1 |doi=10.1038/scientificamerican0794-104 |bibcode=1994SciAm.271a.104S |url=http://dev.whydomath.org/Reading_Room_Material/ian_stewart/AntyParticles.pdf |access-date=6 May 2013 |archive-url=https://web.archive.org/web/20160303211426/http://dev.whydomath.org/Reading_Room_Material/ian_stewart/AntyParticles.pdf |archive-date=3 March 2016 |url-status=dead }}</ref> ==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.<ref name="Gajardo2000">{{cite journal |last1=Gajardo |first1=A. |last2=Moreira |first2=A. |last3=Goles |first3=E. |title=Complexity of Langton's ant |journal=Discrete Applied Mathematics |volume=117 |issue=1β3 |pages=41β50 |date=15 March 2002 |doi=10.1016/S0166-218X(00)00334-6 |arxiv=nlin/0306022 |s2cid=1107883 |url=http://www.dim.uchile.cl/~anmoreir/oficial/langton_dam.pdf}}</ref> ==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.<ref>{{cite journal |last1=Gale |first1=D. |last2=Propp |first2=J. |last3=Sutherland |first3=S. |last4=Troubetzkoy |first4=S. |title=Further Travels with My Ant|journal=Mathematical Entertainments Column, Mathematical Intelligencer |year=1995 |volume=17|pages=48β56 |doi=10.1007/BF03024370 |arxiv=math/9501233 |s2cid=123800756 }}</ref> 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 proof involves [[Truchet tiles]]. <gallery caption="Some example patterns in the multiple-color extension of Langton's ants:"> Image:LangtonsAnt-nColor_RLR_13937.png|RLR: Grows chaotically. It is not known whether this ant ever produces a highway. Image:LangtonsAnt-nColor_LLRR_123157.png|LLRR: Grows symmetrically. Image:LangtonsAnt-nColor_LRRRRRLLR_70273.png|LRRRRRLLR: Fills space in a square around itself. Image:LangtonsAnt-nColor_LLRRRLRLRLLR_36437.png|LLRRRLRLRLLR: Creates a convoluted highway. Image:LangtonsAnt-nColor_RRLLLRLLLRRR_32734.png|RRLLLRLLLRRR: Creates a filled triangle shape that grows and moves after 15900~ iterations. Image:CA3061-81k7.png|L<sub>2</sub>NNL<sub>1</sub>L<sub>2</sub>L<sub>1</sub>: Hexagonal grid, grows circularly. Image:CA174906.png|L<sub>1</sub>L<sub>2</sub>NUL<sub>2</sub>L<sub>1</sub>R<sub>2</sub>: Hexagonal grid, spiral growth. Image:CA50338 animation.gif|R<sub>1</sub>R<sub>2</sub>NUR<sub>2</sub>R<sub>1</sub>L<sub>2</sub>: Animation. </gallery> The hexagonal grid permits up to six different rotations, which are notated here as N (no change), R<sub>1</sub> (60Β° clockwise), R<sub>2</sub> (120Β° clockwise), U (180Β°), L<sub>2</sub> (120Β° counter-clockwise), L<sub>1</sub> (60Β° counter-clockwise). ==Extension to multiple states== {{Main|Turmite}} 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 [[turmite]]s, a contraction of "Turing machine [[termite]]s". Common behaviours include the production of highways, chaotic growth and spiral growth.<ref>{{Cite web | last = Pegg, Jr. | first = Ed | title = Turmite | publisher = From MathWorld--A Wolfram Web Resource, created by [[Eric W. Weisstein]] | url=http://mathworld.wolfram.com/Turmite.html | access-date = 15 October 2009 }}.</ref> <gallery caption="Some example turmites:"> File:Turmite-111180121010-12536.svg|Spiral growth. File:Turmite-120121010011-8342.svg|Semi-chaotic growth. File:Turmite-121021110111-27731.svg|Production of a highway after a period of chaotic growth. File:Turmite-121181121020-65932.svg|Chaotic growth with a distinctive texture. File:Turmite-180121020081-223577.svg|Growth with a distinctive texture inside an expanding frame. File:Turmite-181181121010-10211.svg|Constructing a [[Fibonacci spiral]]. File:Turmite creating a growing diamond.png|Constructing a growing diamond </gallery> ==Extension to multiple ants== [[File:Langton's_Ant_colony.gif|402px|right|thumb|A colony (as an absolute oscillator) builds a triangle]] 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 are different ways of modelling their interaction and the results of the simulation may strongly depend on the choices made.<ref>{{cite journal | last1=Belgacem |first1=S. |last2=FatΓ¨s |first2=N. | title=Robustness of Multi-agent Models: The Example of Collaboration between Turmites with Synchronous and Asynchronous Updating |journal=Complex Systems |date=2012 |volume=21 |issue=3 |pages=165β182 |doi=10.25088/ComplexSystems.21.3.165|url=https://hal.inria.fr/inria-00462438/file/AsynchRobustnessTurmites.pdf }}</ref> Multiple turmites can co-exist on the 2D plane as long as there is a rule that defines 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.<ref>{{Cite web | last = Pegg, Jr. | first = Ed | title = Math Puzzle | url=http://www.mathpuzzle.com/26Mar03.html | access-date = 15 October 2009 }}.</ref> ==See also== * {{annotated link|Conway's Game of Life}} * {{annotated link|Langton's loops}} * {{annotated link|Paterson's worms}} ==References== <references/> ==External links== {{Commons category multi |Langton's ant|Turmite}} * {{MathWorld | urlname=LangtonsAnt | title=Langton's ant}} * [https://www.youtube.com/watch?v=w6XQQhCgq5c Chris Langton demonstrating multiple ants interacting in a "colony"] * [https://web.archive.org/web/20160303211426/http://dev.whydomath.org/Reading_Room_Material/ian_stewart/AntyParticles.pdf Mathematical Recreations column] by [[Ian Stewart (mathematician)|Ian Stewart]] using Langton's ant as a metaphor for a [[theory of everything]]. Contains the proof that Langton's ant is unbounded. * [https://gollygang.github.io/ruletablerepository/downloads/Langtons-Ant-nColor.zip Golly script for generating rules in the multiple color extension of Langton's ant] * [http://datagenetics.com/blog/september22015/index.html DataGenetics, Langton's Ant (and Life)] [[Category:Artificial life]] [[Category:Cellular automaton rules]] [[Category:Turing machine]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Annotated link
(
edit
)
Template:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite web
(
edit
)
Template:Commons category multi
(
edit
)
Template:Main
(
edit
)
Template:MathWorld
(
edit
)
Template:SfnRef
(
edit
)
Template:Short description
(
edit
)
Template:Use dmy dates
(
edit
)