Friday, October 3, 2008

Evolving Virtual Creatures

I have come across the coolest software application. As the guy who wrote the code describes it:
With this program you can watch a process of simulated Darwinian evolution unfold before your eyes.... The user is given control of many of the parameters of the evolution such as the size of the creature population, the mutation rate, the ability for which the creatures will be evolved, and many other settings.
The basic idea is that the software randomly sets initial conditions that define a set of creatures made of connected blocks. You define (from a limited set of options) how fitness is measured (e.g., speed, jumping ability). The creatures start to reproduce, with mutations, recombination, etc., and those creatures that are more "fit" as you've defined fitness are disproportionately favored with "offspring." As you run the application, the creatures "evolve" before your eyes.

On his website, he has a zoo of creatures that have evolved using his software. Here are a couple of them, just for fun:








He even has a bunch of videos on YouTube that show some of the creatures in action, like the following: http://www.youtube.com/watch?v=wRzA8_zoYmo

I haven't had the opportunity to work enough with the software to validate this, and I am not sure enough about what goes on behind the scenes to ever be really sure, but it strikes me as possible that the author is selling himself short when he says the application "simulates" evolution. Remember how Darwin explains evolution in the Origin:
If during the long course of ages and under varying conditions of life, organic beings vary at all in the several parts of their organisation, and I think this cannot be disputed; if there be, owing to the high geometrical powers of increase of each species, at some age, season, or year, a severe struggle for life, and this certainly cannot be disputed; then, considering the infinite complexity of the relations of all organic beings to each other and to their conditions of existence, causing an infinite diversity in structure, constitution, and habits, to be advantageous to them, I think it would be a most extraordinary fact if no variation ever had occurred useful to each being's own welfare.... But if variations useful to any organic being do occur, assuredly individuals thus characterised will have the best chance of being preserved in the struggle for life; and from the strong principle of inheritance they will tend to produce offspring similarly characterised. This principle of preservation, I have called, for the sake of brevity, Natural Selection. (127-128)

If we assume for the sake of argument that he was right, in order for evolution by natural selection to happen, you need (1) creatures that have offspring that inherit important attributes from their parents, (2) some mutation or other variation from perfect replication, (3) occasional cases where the variation is either more fit or less so to the environment and (4) a struggle for existence where some creatures die earlier (or, put more directly, where some creatures have more offspring than others). I would venture to suggest that all four of these attributes are present in the software. I'm not sure that it would not be accurate to say that the application does not "simulate" evolution but in fact instantiates it--that is that the software performs evolution, though not the same by any means as biological evolution. I'd be curious whether others agree that this is possible, or think I'm daft.

The author's name, by the way, is Lee Graham. He's a PhD student at Carleton University in Ottawa, Ontario. A link to his site and the software is here: http://www.stellaralchemy.com/lee/virtual_creatures.html

Greg Priest

1 comment:

Tommy said...

At first thought, agreed.