a simplified model of a butterfly population is created. From external conditions and random behaviour emerges a stable cyclic migration pattern. The concept of migration is in no way encoded into the simulation.
This is a virtual experiment set in a world populated by very simple creatures, which bear some vague resemblance to the Monarch butterfly. I set up this experiment after hearing some very strange (to me) theories about the mechanism behind the cyclic migration of Monarch butterflies between the North-East region of the USA, and a small area in the north of Mexico where they overwinter each year. As a computer scientist, the cause of the cyclic migration seemed much simpler and intuitively obvious, so this simulation was written to confirm my intuition.
Note that the model could just as easily apply to fish, or deer, or songbirds, and is offered as perhaps an approximation to the underlying mechanism behind all cyclic migration strategies.
I have taken what to biologists will probably be seen as outrageous liberties by the simplified assumptions made in order to make this simulation tractable – and by tractable, I mean that the program can be run in a few hours on a single workstation, starting with an initial population of 10 million individuals, where the life of each and every individual is updated once per hour, over a simulated period of 8000 days.
Here are my assumptions, and the reasons for them.
When I say 'instinctive behaviour', I don't mean a hypothetical Lamarckian learned behaviour that is somehow then encoded into genes, but merely a weeding from the gene pool of any random innate behaviour which does not lead to long-term survival. In other words what is left only seems clever in relation to the the other behaviours which to us seemed stupid – but those ones died out pretty quickly.
A more realistic model would take into account all the inputs available to a butterfly, such as the temperature (which is a consequence of the track of the sun, which is dependent on the time of year), the winds (which are seasonal and again dependent on the time of year), the food supply (which is seasonal, etc etc)
So the real world inputs that affect a butterfly's behaviour are mostly dependent on the time of year anyway, so we can optimise the coding considerably by effectively cutting out the middle-man and just having the time of year be the triggering factor.
Now whether a daily choice is appropriate or whether a less granular choice would be better (eg they behave consistently for weeks at a time, until some seasonal factor has noticably changed) is a good question, but by having daily decision points, I'm putting back in some of the more local randomicity of the environment that would be lost by having weekly or monthly decision points.
This is the sort of thing you can refine in later models that attempt to mimic real life more closely. But it's intuitive that if a complex behaviour can emerge from a simple model, the same complex behaviour should be capable of emerging from a more refined model.
The next generation of simulation program will take advantage of a supercomputer array and will handle this assumption. However this is not a simulation of actual Monarch butterflies, it is a simulation of butterfly-like creatures and these particular creatures happen to breed asexually.
So how we solve this quandry is a programmers' trick: we initially populate the world with huge numbers of butterflies, every one of which has a totally random gene. Consider this the equivalent of something like the Cambrian explosion; perhaps the genes are totally randomised because of some catastrophic nuclear event. It doesn't matter, all that's important is that we have enough genetic variation to allow many outcomes. (This is to some extent the price we pay for cloning, rather than having a truly genetic algorithm with gene mixing and random mutations)
This trick allows the stable behaviours to emerge in a few generations; if we started from a more realistic point and with more realistic genetic mechanisms, we would have to run simulations at the level of individual butterflies over evolutionary time-scales, which requires a level of computing power – or patience – that I just do not posess!
To the left and right of the landmass are the oceans. Above is a frozen wasteland and below is an inhospitable desert. Just to the north of the desert is the green region which corresponds to the Monarch overwintering area in the north of Mexico.
When we start the simulation, the initial population disperses at random. Many fall into the inhospitable regions. If they travel too far into those regions (i.e. hit the edge of the map) we consider it too far for them to be able to return alive, and we remove them from the simulation.
These are the simple rules governing butterfly life:
This is the only time we attribute conscious thought to the creatures – we assume they would not leave a region full of food for one that is barren. So effectively when the red or blue rectangles appear, butterflies are trapped within them, gorging themselves on an abundant food supply, until the food disappears and the butterflies randomly disperse.
What we see soon after the initial dispora is that two separate populations set up, in the North East and in Mexico. In the first year, some butterflies randomly disperse from those regions when they are no longer hospitable, but some butterflies just happen to forage in directions that lead them back to the feeding regions just in time for when they appear again. (In real life the cold weather or heat would probably cut down the size of this local population considerably)
However in the second year, most of the remaining butterflies are to some extent stable -- they disperse as soon as the area is inhospitable, but most of them find their way back as soon as the next season starts, which is quite impressive in itself.
However this is an aging population, and in two or three years without breeding, they start dying off. But during the dispersal phase, there are a few individuals whose flights are at the extreme range of normal random foraging, who make it to Mexico.
Of the ones that do, after the first season in Mexico, they (or their children) randomly disperse again.
But a handful of the small population that is dispersing from Mexico happens to reach the North East again, and this is where it becomes interesting, because these individuals now carry genes which each following year will replicate the path that they took, again and again, regardless of whether it is the same individual or their offspring. By the end of the movie we see a small but stable population which makes a cyclic migration that holds steady over generations.
This population could now grow and repopulate the map with large numbers, all of which follow what is now an 'instinctive' cyclic migration pattern. In this simulation, where conditions are exactly the same every year, the population reaches a stable size (about 3000–4000 for this specific version of the simulation) and stays there indefinitely. Subsequent experiments may use this population (I've saved the genomes) as a starting point, and will tweak some of the parameters such as the food supply to see what happens.
As I said, this is a simplification, and two major factors differ from real life; the population is cloned, so there is no preservation of genomes other than the successful ones here. In real life we may have ongoing genetic variation re-establishing itself from random mutations, and we may have creatures with other genomes which stay in the breeding pool because they have a gene that encourages them to follow a pack, for instance by following a pheromone cloud created by the migrating group, which because of the stability of their life cycle will cause them to clump when they migrate, as opposed to the random dispersal of other creatures that eventually die out. This genetic diversity may be a requirement of long term survival if populations are to survive changes in their environment, such as the loss of the Mexican forest, or a northerly shift in the temperate climate zone. This simulation is too crude to use to make predictions, however it does succeed in showing that a cyclic migration loop is a plausible behaviour that can emerge from a much simpler mechanism.
I think this simulation is sufficient to convince computer scientists, though some work may be necessary to do the same for biologists :-)
Graham Toal, 4th May 2011.
Credits:
This experiment was carried out using a single node on the Texas Advanced Computer Center visualisation system, Longhorn. The experiment is a proof of concept carried out using a small 'startup allocation'. I intend to apply for a full project quota in order to parallelise the code and refine the model with details taken from the real behaviour of Monarch butterflies.The work was also done under the auspices of the Division of Information Technology at the University of Texas Pan American, as a demonstration project showing UTPA researchers how to add visualization facilities to their HPC research projects. (The code (probably not this specific version of it – rather one that is cleaner and shorter) will be discussed in a series of blog posts I am currently writing for the IT Blog at UTPA.)