The Langton’s Ant

By Anupum Pant

Think of a cell sized ant sitting on a huge grid of such white cells. The thing to note about this ant is that it follows a certain sets of simple rules. The main rule is that when the ant exits a cell, it inverts the colour of the cell it just left. Besides that:

  1. If the ant enters a white square, it turns left.
  2. If it enters a black square, it turns right.

Here’s what happens if the ant starts out in the middle and moves to the cell on the right, as a starting step (this can be on any side).

First step, it goes to the right.
First step, it goes to the right.
Enters a white cell and rule 1 kicks in. The exited cell is inverted in colour and it turns left.
Enters a white cell and rule 1 kicks in. The exited cell is inverted in colour and it turns left.
Enters a white cell and rule 1 kicks in. The exited cell is inverted in colour and it turns left. (Again)
Enters a white cell and rule 1 kicks in. The exited cell is inverted in colour and it turns left. (Again)
Enters a white cell and rule 1 kicks in. The exited cell is inverted in colour and it turns left. (Again)
Enters a white cell and rule 1 kicks in. The exited cell is inverted in colour and it turns left. (Again)
Enters a black cell and rule 2 kicks in. The exited cell is inverted in colour and it turns right.
Enters a black cell and rule 2 kicks in. The exited cell is inverted in colour and it turns right.
Rule 1 again and so on...
Rule 1 again and so on…

Now as this continues, a seemingly random figure starts taking shape. The black cells are in total chaos, there seems to be no specific order to how they appear on the canvas. (of course the pattern is always the same chaos, considering the ant starts on a blank array of cells).

And yet, after about 10,000 steps are completed by the turing ant, it starts creating a very orderly highway kind of figure on the canvas. It enters an endless loop consisting of 104 steps which keeps repeating for ever and creates a long highway kind of structure.

Suppose, initially you take a configuration of black spots on a canvas (not a blank white canvas). Take an array of cells with randomly arranged black spots, for instance. If given enough time, the ant ultimately always ends up making the looped highway. However, before it starts doing it, it might take a significant amount of steps less, or more, than the ~10,000 steps it took to reach the loop in a blank array of cells.

No exception has ever been found. A computer scientist Chris Langton discovered this in the year 1986.

Appreciating Ants and Their Counting Skills

By Anupum Pant

Success = Ants

Ants are arguably the most successful multi-cellular organisms to have ever existed on earth. The first ants on earth started appearing long before humans, even before dinosaurs – about 120 million years from now. Since then, they have even survived a mass extinction event (Cretaceous-Paleogene extinction event) which wiped off all the dinosaurs from the face of our planet.

Sheer Number

Except Antarctica, the Arctic, and some other remote islands, ants have spread into almost every other part of the land. In fact, today, there are so many ants in the world that for each human being on the planet, at any point of time, there are about 1.5 billion living ants – about 10 thousand trillion ants in total! Of these 8000 kinds of ants that exist, only 10% of the species have been studied.

Collective intelligence

Ants, individually aren’t very bright. But they live in vast colonies that can include upto 50 million individuals in a single colony. Each one of them can contribute their own intelligence to the group, to form a huge brain – a “collective intelligence” of a super-organism. Just like each of our neurons in our brains work individually to form an intelligent brain.

For example, it is known that each of the fire ant’s exoskeleton is made up of a material that repels water. Together, these ants can take advantage of this blessing to survive floods. It has been seen that several hundreds of ants can, within seconds, assemble into a raft that floats on water for a long time. They don’t need your boat Dexter.

Their homes

Ants are able to build massive underground cities. Some scientists have tried pouring molten aluminum or concrete, and digging into their underground cities to study their structure. The results were incredible. A colossal network of well ventilated highways and side-roads was found connecting their colonies. It seemed as if the whole structure was designed by a single master-mind. [Video]

And they can also count

In the arid deserts where the winds are powerful enough to blow away the chemical trails marked by ants, they use their in-built pedometers (step counting machines) to find their way back home. [Video]