I'm running a genetic algorithm to train a set of Hunters to learn to capture as many Elephants as possible. Basically, there's ~20 Hunters that move around in a 2D Grid environment, and 4 Hunters must surround an Elephant to capture it (there's ~20 Elephants in the world). Each time this simulation runs, all Hunters and Elephants are placed in random starting locations. Hunters' movement controlled by its chromosome, Elephants' movements are random.
All of the Hunters have the same chromosome (homogeneous), so I run this simulation each time when assigning a fitness to a chromosome. My fitness function simply rewards the chromosome for the total number of Elephants captured in the simulation:
double fitness = totalElephantsCaptured() * 100;
The results of the generations' fitnesses are basically random. The most fit individual in each generation does not become more fit as generations progress, and the total fitness of each generation does not increase. I sense that my fitness function is too primitive, but I'm not sure how to change it to yield better results. It does not seem like the Hunters are learning anything.
Details on my GA (Numbers in a range because I've tried various values):
Population size: 64 or 128.
Generation cap: 500 - 1000.
Elitism: 5% - 10% of population
Mutation: 1% - 4%
Chromosome size: 180
Selection: Roulette wheel.
Crossover: Simple crossover in middle of chromosome.
The chromosome is designed in 'blocks' of movement rules based on sensor data:
Each block has a sensor criteria (e.g. "if nearest Elephant is X distance away") and a movement rule (e.g. "move towards nearest Elephant for Y amount of time"). Hunters can either move towards nearest Elephant or towards nearest teammate Hunter.
Does anyone have any suggestions to make the fitness of the Hunters gradually increase as generations increase?