This morning I downloaded a piece of software called breve which is a development environment for writing and running simulations, and which is (apparently) pretty good for running 'artificial life' simulations. This stuff is pretty cool.
Right now I've been running a simulation called "Walker" on my computer since this morning some time. It's running a genetic algorithm that tries to evolve a set of parameters for the legs of the creature pictured above so that the creature can walk. What it does is start with four randomly chosen sets of parameters -- the genome of the walker -- and then use these parameters to try and walk the creature across a flat surface. The two that make it the farthest survive to the next generation, and the bottom two are replaced by a combination of the winning two plus some random 'mutation'. After watching this thing on and off all day, I'll be damned if this thing isn't working out how to walk.
It started off looking pretty pathetic. It would just lay there and flail it's legs around looking like an injured, flipped-over turtle or something, making some modest progress across land. But now -- after a half day of evolving -- these things are getting much better. They still look like injured turtles, but no longer flipped-over. And they look like they're less injured, non-flipped-over turtles with a purpose. That purpose, of course, is moving across this artificial surface as fast as they can.
One interesting thing about this is how transfixing it is to watch. This reminds me of a drinking party I went to some years ago at a friends house. He had just got an aquarium, and we sat around all evening drinking beer and watching the fish. The fish were interesting to watch because they were alive and therefore acting predictably, but with some randomness. When I watch these little virtual creatures crawing across the surface I wonder what makes them so transfixing. Part of it is that they look injured, and you feel sorry for them. You almost want to help them to get wherever they are going. I suspect, though, that the real reason that they attract our attention is because injured things are easy to catch and eat.