Evolution Before Your Very Eyes

Developed: December 2009

by Rohan Padhye


If you are having trouble playing the simulation for some reason, you can check out a video demo on YouTube that I uploaded recently.

Applet failed to run. No Java plug-in was found.
Simulation control

Population Control

Red: Green: Blue:

OR

Food Control

Add food items (max 1000) every seconds (0 to disable) or


What is this?

This is a computer simulation of evolution by natural selection. Imagine the big circle to be a dish in a lab. The little circular thingies you see are micro organisms. Their colour represents their genome. The little orange squares are food items that need to eaten. The simulation follows the following simple rules:

  1. Food items can appear randomly (you can control their rate). This represents addition of energy to the environment as we see due to sunlight or a lab student adding a drop of glucose in the dish.
  2. Organisms move about searching for food until they eventually die out due to old age.
  3. Every individual is characterized by its genome. There are three types of genes:
    1. Blue - The presence of these genes increases the speed of movement of the organism.
    2. Green - The presence of these genes improves the sense of smell i.e. organisms can detect food at a larger range and pursue that food item. If no food is detected within range, the organism just wanders about randomly.
    3. Red - The presence of these genes increases the life span (a matter of seconds) of the organism (you can think of these genes as immunity to disease).
    An organism can have upto 255 of each of these genes. The combination of Red, Green and Blue genes makes up the colour of the individual in RGB format (eg. a purple organism is fast and can live long, but has a low sense of smell). You might think it would be beneficial to have 255 of all these genes, but they come at a cost...
  4. Organisms reproduce asexually each time they eat a certain amount of food. This amount depends on the total number of genes in the individual. This is the cost. Being complex makes it expensive to reproduce because it takes more energy (food). Hence organisms should have a good tradeoff between the two. Also, each time an organism reproduces, its offspring will have almost the same genome. A few random mutations vary the characteristics a little.

These simple rules give rise to amazing observations. There is no "selection" process programmed. Natural selection is just that - its "natural". The more an organism can eat and reproduce before it dies the more it can spread its genes. Just as you would see in nature, over time, organisms adapt to their environment.

Sample Observations

For best results start with a population of a few individuals having very less number of all the genes (eg. 60-60-60). Such individuals can reproduce quickly, after eating just 3 or 4 foodstuff. The main principle is that if a mutation causes an increase of a particular gene, the organism will improve some of its ability but will require more food to reproduce (eg. for every one second that it lives longer by increase in red genes, one more food item is required to reproduce).

Increase the rate of food supply (eg. 10 food items per 0.1 seconds). Food will become abundant and so organisms can afford to become more complex. You might observe that the frequency of blue genes in the gene pool increases and red genes remains low because it is a "eat quickly, reproduce quickly" strategy that is beneficial. Here a sense of smell is important, but not critical, because a fast individual will wander about randomly until it finds food close by.

If you want to see an increase in red genes, slowly start decreasing the food rate, but increasing the amount of food per serving. (eg. 10 per second, then after a while make it 25 in 2 seconds, then 60 in 3 seconds, and so on). The life of organisms ranges from 4 to 10 seconds depending on the number of red genes. Naturally, redder organisms will be able endure patiently waiting for food servings to reproduce. The average redness in the gene pool will keep increasing until it reaches 240 or so. You might be somewhere at 500 food items per 10 seconds or something, to try to avoid complete extinction. Now you can start reducing the food per serving one by one - you might be able to maintain a small population even up to 50 food items per 10 seconds, but they will probably be yellow (long life, detect food far away, and decently fast too).

Of course, this is just an observation from one particular scenario. The results may change every time depending on the initial population, random mutations and new individuals introduced manually using the controls above. Often, you might even drive your population to extinction or overpopulation. No worries, you can use the controls alongside the simulation to reset the environment, add an individual with a specific genome, or add an invidual with a random genome.

Some other good strategies I've observed are blue-greens (fast creatures who pursue food from a distance), dark greys (it sometimes pays to be simple, they need just 1 or 2 food items to reproduce), reds (these guys linger around for a long time but don't multiply easily), etc. Let me know if you find anything else interesting!!!

Relevance to Natural Selection

This simulation follows simple rules of energy flow and reproduction with mutations and natural selection takes over on its own. It gives an idea of how evolution might take place in nature, but its not meant to be the exact same. For one thing, the phenotype of an organism doesn't depend on the number of genes of a certain type, but instead is much more complex (involving DNA and chromosomes and stuff). To be honest, I don't understand the real thing very well because I dropped biology when I was in 10th grade. But I do understand the principals of evolution, and this simulation pretty much demonstrates the same.

An interesting thing I observed using this model was the possible explanation for why flightless birds evolved when no predators were around or why mammals who live underground lost their eyes. In this model, a sense of smell seems like a good trait in any environment, harsh or plentiful. But in a plentiful food supply, it is not strictly necessary. Organisms find food even by random wandering about because food is likely to spring about close by. Hence a small range of smell suffices. This does not mean that a long range of smell is a bad thing. However, the extra burden of developing sensory organs requires more energy to survive and reproduce and this ultimately favours those organisms who forgo their orfactory organs.

What's more?

Some might say that I have missed out on some of the most interesting aspects of evolution in nature:

  1. Sexual Reproduction
  2. Speciation
  3. A Food Chain (i.e. inclusion of carnivorous species)

I'd like to point out that identifying distinct species is something only people do. It would be difficult to incorporate into a simulation because an organism might belong to more than one species if it can reproduce with either of the groups. Anyway, it would be interesting to incoporate these features into the simulation some time in the future. I'm particularly curious to know whether cannibalism emerges as a dominant trait or not when speciation and a food chain is incorporated.

If you have any suggestions on what else to include or if you have some valuable feedback please don't hesitate to e-mail me at rohanpadhye((at))gmail.com.

Get Evolution in Minutes at SourceForge.net. Fast, secure and Free Open Source software downloads