BBC Home

Explore the BBC

Front Page

Life | The Universe | Everything | Advanced Search
Front PageReadTalkContributeHelp!FeedbackWho is Online

Click here to complete your registration.

3. Everything / Maths, Science & Technology / Mathematics

Langton's Ant

An ant on a web in space.

Imagine a universe in which we know everything there is to know. To make it easier, we might start with a universe that is an infinite white plane. There is no up or down in this universe, just forwards and backwards, left and right. Divide the plane into a grid of small squares and place a tiny robot – an 'ant' - on one of the squares. The ant knows all the rules of the universe.

Rule One states that if the ant is on a white square it is to turn to the left and move one square forward, after which the square it has just left will turn black.

Watch the ant carefully. The ant is on a white square, it moves to the square on its left: the ant is now on a new white square. It steps to the left again and does that twice more; the squares left behind by the ant turn black in its wake. Now the ant is back on the square where it started and that square has become a black square. It is time for Rule Two.

Rule Two states that if the ant is on a black square it should turn to the right and move one square forward. The square it leaves behind will turn white.

The ant moves to the right and then, of course, to the left following Rule One (because it has moved onto a white square) and so on. We can carry on imagining this in our heads but it is easier to use a computer program to help us out1.

At first, we might think we can predict the path of the ant because such simple rules must surely result in a simple shape: a square, perhaps, or a figure eight? The ant keeps moving and the pattern becomes more complex. It will be a flower-shape, maybe, or a Fibonacci spiral. Could it be the plan view of a castle with round towers? The ant keeps going.

After a few hundred steps, order starts to break down and chaos ensues. Putting aside our early thoughts of geometrical patterns, we turn, with some relief, to the concept of entropy. Increasing disorder is the way of our universe. Perhaps this is the way of all universes, even simple ones.

We keep watching because temporary short-range patterns hold our attention. The ant repeats a series of steps creating a pattern very similar to the one on that wallpaper border we bought last year and then goes off to the other side of the growing patch of black and white squares to perform the latest dance craze with some enthusiasm. The ant has now completed just over ten thousand muddled steps.

And then, without warning or preamble, the ant breaks free of its chaotic morass of footprints. The ant suddenly starts to repeat a set of 104 steps with uncanny determination creating a broad, straight, ribbon-like trail, usually referred to as a 'highway', heading out as far as we can follow it. The ant has displayed what is known as emergent behaviour and it came as a surprise. What does this teach us?

Langton's Ant and Science

The thought experiment known as Langton’s Ant2 teaches us valuable lessons about the aims of science. It also reminds us not to be cocky.

One of the Holy Grails of science is Grand Unification Theory (GUT) — a theory of life, the universe and everything, if you will. Langton's Ant tells us something about the consequences of setting out on such a quest.

After centuries in which the ideas and vocabulary of science expanded almost without check, there arose, in the late 19th and early 20th Centuries, a view that less was more. It was felt that instead of accepting that gravity, electrostatic forces, magnetism and the weak and strong nuclear forces were independent ideas, there should be a search for just one underlying theory. Science has pursued GUT to this day.

The first lesson Langton's Ant doles out is that even if we eventually succeed in knowing everything there is to know about the rules underpinning our universe, we still will not know everything about the universe. This is good news. It means that if we achieve GUT, there will still be more to learn. Science will continue to exist and scientists will still have jobs; they will not disappear up their own fundaments in a puff of smoke.

Langton's Ant also serves as a user-friendly introduction to the mathematics of emergent behaviour and, hence, complexity theory. This branch of mathematics has many applications in science and applied science: it can be used for everything from weather forecasting to explaining the growth pattern of the Romanesco cauliflower.

Lastly, no-one — however clever they think they are — ever predicts the emergent behaviour when meeting Langton's Ant for the first time. Even when they have seen the basic version of the ant, experienced mathematicians cannot predict the results of similar systems. The fact that such a simple creature can outwit humankind is somewhat comforting.

1 There are many computer demonstrations of Langton's Ant available on the Web at any one time but they do tend to disappear as people finish their studies and therefore lose their university computer accounts. A search will produce many results, some of which will work.
2 Dr Christopher Langton, a leading authority in artificial intelligence, designed the ant named after him. It is also known as the Virtual Ant or Vant. Langton's Ant is one of the simplest forms of a class of dynamical systems known as cellular automata. It is a simple form of artificial life and is a two-dimensional Turing machine.

Discuss this Entry  People have been talking about this Guide Entry. Here are the most recent Conversations:

Update would be nice
(Last Posting: May 24, 2011)

Ooh, pretty
(Last Posting: Feb 21, 2008)

Add your Opinion!

There are tens of thousands of h2g2 Guide Entries, written by our Researchers. If you want to be able to add your own opinions to the Guide, simply become a member as an h2g2 Researcher. Tell me More!

Entry Data
Entry ID: A3994293 (Edited)

Written and Researched by:
Amy the Ant - High Manzanilla of the Church of the Stuffed Olive

Edited by:

Date: 21   September   2005

Text only
Like this page?
Send it to a friend

Referenced Guide Entries
Artificial Intelligence
Alan Turing - Computer Scientist
Fibonacci Series
Entropy versus Information
Bigger and Bigger Infinities
The Standard Model of Particle Physics
A Guide to Buying Flowers
Castle Glossary
Theories on the Existence and Origin of the Universe

Related BBC Pages
BBC Science

Referenced Sites
A computer demonstration of Langton's Ant

Please note that the BBC is not responsible for the content of any external sites listed.

Most of the content on this site is created by h2g2's Researchers, who are members of the public. The views expressed are theirs and unless specifically stated are not those of the BBC. The BBC is not responsible for the content of any external sites referenced. In the event that you consider anything on this page to be in breach of the site's House Rules, please click here to alert our Moderation Team. For any other comments, please start a Conversation below.

Front PageReadTalkContributeHelp!FeedbackWho is Online

Most of the content on h2g2 is created by h2g2's Researchers, who are members of the public. The views expressed are theirs and unless specifically stated are not those of the BBC. The BBC is not responsible for the content of any external sites referenced. In the event that you consider anything on this page to be in breach of the site's House Rules, please click here. For any other comments, please start a Conversation above.

About the BBC | Help | Terms of Use | Privacy & Cookies Policy