seallard / walker

NEAT
MIT License
0 stars 0 forks source link

Using fitness functions with negative values #44

Closed seallard closed 3 years ago

seallard commented 3 years ago

"Is there a way to use negative fitnesses in NEAT?

You may have noticed that if you try to use negative fitnesses, NEAT breaks down because of fitness sharing, which requires positive fitness values.

Real Carbonneau suggested the following solution to this problem: Compute fitness as you wish, with negative values if desired. Then, adjust all the fitnesses by replacing them with the distance between the actual fitness and the lowest fitness in the population. This will scale all the fitnesses above zero, keeping the relationships stable." src