|Perl Monk, Perl Meditation|
Cellular Automata :: Langton's Antby Elgon (Curate)
|on Aug 19, 2004 at 16:36 UTC||Need Help??|
One of the things that has always amazed me is the ability of systems with extremely simple rules to exhibit "intelligent" or "chaotically ordered" behaviour. One such example is Langton's Ant, which follows such extremely simple rules and initially appears to behave chaotically, however after a certain number of steps a recurring pattern emerges.
The rules are as follows; An ant sits on a bit of graph paper where all the squares are initially empty. It moves into a neighbouring square and does one of two things, based on the colour of the square;
...and so on, ad infinitum. The interesting thing about this is that after a fixed number of steps, the ant builds a highway and hotfoots it into infinity. There are, in fact, any number of "ants" with different rules, however it has been proven that all of them which do not actually reverse their direction in a single move build highways and do not return to their starting position.
I got bored and wrote a program which models this behaviour. Feel free to play, although you'll probably need to build a bigger board to see the highway form. Trivial but very fun!
Update: This won't work on Win32 (yet.)
Update^2: This should work on Win32 now. Could someone test it please to check? Thx...
"Stercus! Dixit Pooh. Eeyore, missilis lux navigii heffalumporum iaculas. Piglet, mecum ad cellae migratae secundae concurras."