neat-python icon indicating copy to clipboard operation
neat-python copied to clipboard

Evaluation function receiving less genomes than the established population

Open joeloverbeck opened this issue 6 years ago • 2 comments

I was under the assumption that the population was fixed. I have reset_on_extinction set to True, although I doubt it's influencing the behaviour, given that some of those issues with missing genomes happened in the early generations. Is there a setting that I can use to force a fixed population no matter what? Otherwise not only the visual representation of the simulation will get screwed up, but I won't be able to know if I'm assigning the fitnesses properly, given that I'm running all the genomes at once.

joeloverbeck avatar Aug 13 '18 20:08 joeloverbeck

Eventually I changed the code to support a variable population, and assigning the fitnesses as close to possible to avoid giving them to the wrong genomes during list iteration. However, if there was a way to make the population completely fixed that would be good to know.

joeloverbeck avatar Aug 13 '18 22:08 joeloverbeck

At the moment, there's no setting available that will force the population to be exactly the specified size. Right off the top of my head I can't remember why this happens, but you could probably modify the DefaultReproduction.reproduce method to always produce the exact number of members in each generation.

CodeReclaimers avatar Aug 23 '18 02:08 CodeReclaimers