Design
The environment
An artificial environment is used to test each animat's neural network performance. The environment consists of a 110 by 90 grid of cells. Each cell contains information about it's terrain, food content, and occupant. There are two types of terrain, open and barrier. An animat cannot occupy a barrier cell. The outside ring of cells, five deep, are barrier cells, locking the animats into their environment. The ring of barrier cells is not diplayed in the graphics. There are 3 world types constructed from various configurations of the barriers cells. Worlds are generated randomly at the start of each generation.
Barrier World
Pac-man World
Maze World
Open cells can contain one food unit. Food units are distributed at random throughout the open cells with a 75% probability at the beginning of each animat's life span. Food is not added to the environment during the life span of an animat. Time in the environment is measured in "clicks". In each click the state of the 13 cells of the environment in front of the animat are encoded and fed into the animat's neural network as input, the output of the net is decoded and the animat's location and orientation are updated, as well as the new state of the environment.
Animats
Animats consist of an input sensor, an output register, a genotype and a hebbian neural network, the topology of which is determined by the animat's genotype. At the beginning of the animat's life span the animat's genotype is read, the corresponding hebbian network is built. and the animat is placed at random in the environment. Animats that do not collect any food for a continuous 256 clicks are considered to have starved to death and the animat's life span is terminated. Animats interface with their environment through the input sensor and output register. The input sensor encodes the state of the 13 cells directly in front of the animat, into a binary array. This array is given to the animat's neural network as input, and the resulting output from the neural net is put into the animat's output register. The output register is then decoded to determine the animat's intended movement and orientation. If the movement is legal, i.e. not into a barrier cell, the animat's location is updated. In any event the animat's orientation is updated. An animat collects food by moving onto a cell which contains food, after which the cell is updated to reflect that it's food content is zero. An animat's fitness is calculated by the amount of food collected by the animat in it's life span, higher food counts meaning higher fitness.
Selection
At the end of a generation genetic algorithms are used to produce the next generation of animats from the current generation. The fitness function used for the genetic algorithm is the performance of the animat in the artificial environment and is measured by the amount of food collected.