Biologists writing computer simulations of evolutionary worlds are notoriously surprised to find complex processes and behaviours appearing before they've been implemented. I knew this, and I'm quite clever, so after one day writing two pages of simple code I was doubly surprised to find myself surprised by my pixel pixies taking on lives of their own. But at least it means I can rest on the second day.
Pixie world is a picture, 256 x 256, in which each pixie pixel is a separate creature: green for plant, blue for herbivore or red for carnivore. It can interact only with its four immediate neighbours, and only the carnivores can move.
I'll deal with carnivores in a separate post, so this one is about the world of just green plants and blue herbivores. Here on the left is a typical early screen, with an initially random splatter of green and blue in all shades being quickly selected for higher efficiency. The brightness of the pixel shows its efficiency, meaning how much food it can extract from its neighbours (if they are suitable) in each unit of time ("cycle" or "turn").
The graph on the right shows relative number of pixels (vertically) at each level of efficiency (horizontally), so rising to the right means there are more individuals of higher efficiency as the weaklings are out-competed.
For the first few hours of implementation I thought I'd leave out the natural trade-offs creatures have to make (e.g. more armour versus more reproduction). In particular this means there's no disadvantage to higher efficiency, so I assumed all pixies would quickly evolve up to the maximum (very bright pixels).
But even though each pixie is only 2 numbers, interacting with its neighbours with just an addition and a subtraction, they regularly evolve other strategies that work better than being as efficient as possible. This seems very odd at first sight.
Very soon areas of darker green appear, and they grow. These represent less efficient plants (meaning they take in less food per cycle than the plants they are replacing, and hence reproduce less often). The graph confirms it's not an optical illusion caused by dodgy green phosphors in your monitor, there are really two separate green populations: dark and bright.
Another odd effect not visible in these static pictures, but clear in the running program, is that the dark green islands are stationary but the bright green areas continuously flow around them. (Not that the individual plants can move, but there's emergent behaviour of areas of bright green moving by expanding on one edge and receding at the other, by birth and death of individuals.)
There is, of course, no code for producing two such distinct species of plant: natural selection is consistently favouring the less efficient plants in some areas. And not just less efficient as such (since within the brighter population there's a bias to more bright, and there are still no very inefficient individuals), but peaking at exactly half the maximum efficiency possible.
In the climax state the world is completely dominated by the dark greens. There remain a few bright patches, and running the simulation for hours never permanently removes these, but watching them closely shows that they are not survivals of the earlier bright green population.
What happens is that all bright populations become extinct after a while, but mutation within the dark green periodically throws up a new bright species, which may thrive for a while but always dies out in the long run.
So what does this mean for survival of the fittest? Would Darwin be sad to see the best and brightest being out-competed by their dimmer cousins?
No, "fitness" here is of course only related to the strength and speed sort of fitness in a punning sense. Evolutionary fitness means doing whatever's best for survival of the gene (not the individual or the species), however bizarre and unintuitive it is to human observers (which is one reason for doing computer simulations rather than just making explanations up, as biologists used to do).
The answer in this case (I think, from watching the co-evolution of plants and animals for much longer than it took to code) is that becoming less efficient is the plants' only defence against the herbivores (which in the absence of carnivores are free to fully exploit the plants.
The bright plants, being full of juicy goodness, cause population booms for the animals, which then wipe out the plants and quickly starve. This is the engine of the local extinctions which give the impression of movement - there is no stable equilibrium at high plant efficiency.
But the dark green plants don't provide enough energy to the herbivores to fuel a boom and bust system, so once they're established by a random fluctuation they become permanent features of the landscape. It takes thousands of generations, but eventually they fill the world.
Biology is full of equilibria, apart from recent human interventions nearly everything is stable nearly all the time. The best strategies for reproductive success sometimes appear odd to us (suicide, sterility, abortion, incest, male-killing parasites or never being alive at all), but mindless natural selection is a very creative process.
Technical stuff: if you'd like to download the Pixie World program and play with it, you'll need a Windows machine (sorry) for the
pixie binary, which has instructions under "Help" on the "Main Menu". This program expects to run with Cygwin (Unix on Windows - you didn't expect me to use a real Windows environment for my first programming on it?) but if you don't have that installed, it seems to be enough to just download
this file into the same directory as the pixie program. Cygwin itself is entirely free downloads so this probably isn't naughty.