0

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?

OMGitzMidgar
  • 689
  • 2
  • 10
  • 28
  • Given that capturing an elephant takes four hunters, modifying the movement behavior of individual hunters might not do. – Tarik Apr 02 '17 at 02:49
  • Just added edit explaining that Hunters can move either towards nearest Elephant or towards nearest teammate Hunter. Do you think this would allow cooperative behaviors to emerge amongst the hunters? Or do you think they would need to do more than just "move towards closest teammate" ? – OMGitzMidgar Apr 02 '17 at 03:30
  • Hard to prove, but i've the intuition that allowing only these two moves will lead to agreggation of hunters in the same area. If sometime one will try to go to an elephant, most of the other hunters will remain in place. Maybe the navigation scoring of hunter should be dependant of elephant proximity and number of already present hunter around it. This way, an hunter moves (randomly?) until seeing one elephant, go to it, but prefer elephants with other hunters around. Selection is done on min/max number of hunters to join : too much of them and no food remain, too few and the elephant live. – aluriak Apr 02 '17 at 03:40

0 Answers0