Navigation

The Rational Response Squad is a group of atheist activists who impact society by changing the way we view god belief. This site is a haven for those who are pushing back against the norm, and a place for believers of gods to have their beliefs exposed as false should they want to try their hand at confronting us.

Buy any item on AMAZON, and we'll use the small commission to help end theism, dogma, violence, hatred, and other irrationality. Buy an Xbox 360 -- PS3 -- Laptop -- Apple

Programming evolution

We would like to simulate the evolution of ants from undifferentiated individuals to colonies with workers and queens.

We had some results that seem promising but do you know how we should present them? We have a problem about the validity of these results because we designed our model to imitate what we think should happen.

In any simulation, you MUST tackle these problems skillfully. You need to be able to CLEARLY define your alogorithms and assumptions - your assumptions will require more defense than the former. Your assumptions dictate how your alogrithm works, and regardless of how brilliant your program is, it will be ignored and torn assunder if you cannot make a stong case for the inputs you used. IOW, people won't even look at your alogorithm if your science is suspect. CompSci guys may find it interesting, but folks of the biological bent won't without that.

I have written several amateur evolutionary simulations, the most recent being a simulation of viral mutation and evolution. However, nothing I make is very accurate or even interesting. If you want to make a proper simulation, study the actual science on ants, and develop your simulation based on that. You don't have to get down and dirty with the specifics, but you do need to have a genotypic base that is similar enough to the genes of an ant's, and an environment with motivations that are comparable.

However, if you're just coding it for fun, just to get results and without any concern for realism, I suggest this: create an Ant class that has an array of integers or doubles which you will consider its genome. Go through the genome, and decide what each gene "means" (like size, color, speed, efficiency, sex, whether or not it has wings, whether or not it can mate, how long it lives, how much food it requires, etc.). In the constructor of the Ant class, give it all the attributes based on its genome. Then simply create a method for the life of the ant, telling it to do things like "random walk" or "sniff for pheremones" or "dig" or "find food". Make sure that each gene in your genome has a somewhat noticeable effect on the performance of the ant in each case. Finally, if the ant is able to reproduce, tell it to produce children that are the random combination of genes from each parent ant, with a slight chance of mutation.

Include also various classes representing environmental objects, preferrably a coordinate system, along with ant-produced entities like pheremones and waste. The pheremones themselves could be a string of two or three integers, linked to the genomes of each ant. As the ants go about finding food, they could secrete a specific pheremone to whatever they are doing. If another ant has similar pheremone codes to the ant producing the pheremone, it should be able to respond appropriately to it.

If you have a structure basically like this, and run the simulation for a long enough time, you should at least see some evolutionary pattern occuring. It may not be even very interesting or much like ants at all, but you will definatley see a trend, and if you're lucky, the trend might be towards a stable, sociable ant population. In the case of my viral simulation, it almost always resulted in a single strain of virus which could not infect any cells and eventually died, and sometimes resulted in all of the cells being killed by the virus. So yes, unless your simulation closely fits reality, you probably will not get favorable results. In fact, you might be surprised and discover something totally new, and that's the joy of pure simulation.

What we are trying to simulate is the fact that primitive ants did not have any difference between queens and workers whereas nowadays it is the most wide spread pattern for an ant colony. (This result was proven by two biologists, I have the references)

We did not go as far as giving each ant a genome of its own, we only work on their size (which has an influence on the daily intake of food they need) and on there ability to reproduce. The next level is the level of the colony. It is made of various ant types (worker, queen, soldier or any random combination of ant parameters).

We compare 20 colonies through a simulation of 100 days of survival. The 5 most efficient (meaning the one that has the biggest output of energy for the smallest input of energy) are kept for a next generation of 20 colonies built by crossing-over and mutations from those 5 winners.

We were surprised to find out that the most efficient colonies were the one that had 50% queens at the beginning then that spawned 100% workers after that. (We started with undifferenciated colonies with only semiworker that could hatch eggs.