NEATALS (NEAT Artificial Life Simulation)
| || |
Download the code
This program was written for Dr. Stanley's NeuroEvolution class (CAP6938) in the Spring of 2006. The goals were to create a complex artificial life simulation where creatures, controlled by neural networks evolved using NEAT methodologies, would compete for food while avoiding environmental hazards (poisonous food, turrets, etc.) Users should be hopefully be able to see the creatures getting smarter as natural selection weeds out the unfit individuals. The main goal is to have fun!
Each creature in the simulation is controlled by a neural network. Initially, the neural network architecture is simple, with only its input and bias being connected to the outputs (no hidden neurons.) When creatures move on top of food, their energy supply is increased, and if it surpasses its ASEXUAL_MATING_THRESHOLD it asexually reproduces. At this point, its offspring's controller has a chance to become more complicated through mutation.
Figure 1 shows how the creatures' omnidirectional sensor is divided into four areas. Each of these four areas has s sensors associated to it, with each of these sensors being "on" in the presense of a particular type of entity. The entities within the simulation are: creatures, moving food, stationary food, poisonous food, turrets and bullets. Thus, each creature has 4 * 6 = 24 inputs in its neural network. In Figure 1, creatures are shown as big black circles, stationary food is red, and moving food is green. Poisonous food (not shown in Figure 1) is gray and sucks energy from the creatures it touches. Moving food is tougher to catch and thus gives the creature a higher reward when eaten. It becomes interesting to see what type of food the agents chase and whether or not they learn to avoid the bullets and poisonous food. Initial experiments show the agents learn only to eat good food and do not worry about avoiding these hazards.Perhaps by playing around with the energy rewards and penalties of the food, you can see some more interesting behavior evolve.
Double clicking on a creature will bring up the inspector tab for that creature (Figure 2.) From there, you can see a little of what is actually happening inside the creature. Various interval variables can be read from here, and some can even be written to. Click on the Figure 2 to see the full image.
Compiling and running the code
To compile and run the code, first download and extract it. (Go to http://www.gzip.org if you need help extracting
To run the simulation, go into the