Langton's ant
en.wikipedia.org
en.wikipedia.org
Rather than working on 90 degree turns, this does 45 degree angles, and it has a bit more complexity in the command set.
The rules are: + and - turn right and left 45 degrees, * and / turn right and left 90 degrees, ! reverses direction, . does nothing.
You can come up with some really interesting patterns, e.g. http://pyvascript.appspot.com/Langton45?command=*.%2B
Edit: Huh, I guess I never released any of that. I should port it to a modern Pyvascript and throw it up somewhere, as the version this is built against is probably going on 3 years old.
I used Pyvascript heavily for one product and it's fairly battle-hardened at this point, but since I don't really do anything web-wise anymore I haven't done much with it lately.
http://demonstrations.wolfram.com/CellularAutomatonExplorer/
(Cellular Automata is the name for these constructs, langon's ant, the game of life, and so on.)
http://www.kurzweilai.net/reflections-on-stephen-wolfram-s-a...
I remember there are some number sequences generated by some rules, which seems random at first and then some sub-sequence repeates. Now this looks similar to me, except it seems to more mysterious because someone described it as "ant doing something". ;-)
group theory is dealing with even simpler rules and it was able to reach the state of "math theory", though far from completed. Anything more complicated than that - tiny islands of understanded surronded by narrow seas of "playing with numbers" in the vast oceans of unknown.
>It looks far-fetched to me to describe it with the terms like "simple rules can result to complex emergent behaviour," etc...
>Now this looks similar to me
any proof of "far-fetchedness" or similarity would put you right into the head of the line for the Fields :)
EDIT: Found it: (pseudocode, not Python)
while x > 1
case ((x mod 2) == 0):
x = x / 2
case ((x mod 3) == 0):
x = x + 1
default:
x = x * 3
The number of iterations it takes to leave the loop is chaotic.