I'm writing a programme to model evolution. The basic premise is that a stage is populated with ants, each of which has a 'genetic code', a list of 30 numbers. There is also randomly generated food on the screen. Each ant is given information on its current velocity (as a vector) and the vector to the nearest piece of food, which is fed into a neural network whose weights are specified by its genetic code. In addition, whenever any two ants cross paths (and aren't too hungry) they will reproduce to form a third ant whose DNA is a mixture of its parents, plus a small chance for the occasional mutation.
The idea is that the ants who are better at finding food (ie. have a better set of weights for the neural network) will survive longer to reproduce more often, so the population will get more intelligent by the normal process of evolution.
Unfortunately, the ants are so abysmally stupid they all die before they have a chance to really evolve. Is there any way I can fix this? It could, of course, be a programming error... Also, there's the possibility that it is impossible/incredibly difficult for a neural network to calculate a good speed and direction from the inputs given.
All feedback welcome
Snark