1 Langton's AntThe following information is freely taken from the English Wikipedia entry on "Langton's Ant".
Langton's ant is a two-dimensional Turing machine with a very simple set of rules but complicated emergent behavior. It was invented by Chris Langton in 1986 and runs on a square lattice of black and white cells. The universality of Langton's ant was proven in 2000. The idea has been generalized in several different ways, such as turmites which add more colors and more states.
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:
Langton's ant can also be described as a cellular automaton, where the grid is colored black or white, 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 How to walk the ant
This application consists of two windows (exluding this one of course):
In the control window, you can set the parameters controlling the Ant's behaviour. You can specify the number of colors and the size of one squares, adjust the "walking" speed and choose which colors are "left turning" and which are "right turning" ones by adding them to or removing them from the respective list.
New colors are initially added to the left list, the colors affiliated with the numbers shown are randomly chosen on each run. For 10+ colors this saves the trouble of manually choosing them while making sure they're all different from each other.
Then again, this randomness can (and certainly will at times) lead to totally sickening combinations of colors or ones which are hardly distinguishable from one another. In this case, just run it again or enjoy the nausea.
In the main window, click anywhere to start the Ant from that location, click again to stop it.
A few interesting right/left combinations to try (i.e. LRL would mean 1 and 3 in the left list, 2 in the right list):
That's it!