# Thread: Intelligent behaviour and evolution

1. 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

2.

3. You might consider making the field/grid smaller. If the ants are dying before they have a chance to find food, it's probably because there is too much ground to cover before actually reaching it. Decrease the size of the field, the food will be more concentrated and closer to each ant. I'm just speculating here. Good luck.

4. This is an interesting program you are writing. I am not fully understanding what happens to the velocity and position vectors in this "neural network." How do the 30 numbers in its DNA sequence influence its ability to attain food?

For the problem with the ants dying out you could either make the stage smaller like was mentioned before, have more food, or have more ants.

Some interesting things I would like to see with your program would be to start with a good amount of food and then as the population builds lower the amount of food to see if they can survive a food shortage after evolving to a certain point. Just some ideas I thought I would throw out there. I would be interested in seeing your final code to see how you put this together.

~HP

5. Sounds like the margin between starvation death and perpetual success is small. So even if some first generation ants survive, there won't be much incentive to evolve noticeably better.

I don't understand why the ants have different speeds. Is it so faster ants gobble all the food? Neither do I understand why you're sending ants food vectors if they can't steer.

 Bookmarks
##### Bookmarks
 Posting Permissions
 You may not post new threads You may not post replies You may not post attachments You may not edit your posts   BB code is On Smilies are On [IMG] code is On [VIDEO] code is On HTML code is Off Trackbacks are Off Pingbacks are Off Refbacks are On Terms of Use Agreement