Skip to content

Set genome_indexer to last key in population +1 on checkpoint restore #287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ThomasGjerde
Copy link

When restoring a population from a checkpoint, the genome_indexer count is re-initialized from 1, and this causes genomes to be overwritten when the keys collide.

I came across the issue when I was investigating why my best genomes in a species would suddenly drop in fitness even if I had elitism configured and was using a deterministic fitness function. Turns out they were being overwritten by new children that were given the same key. I also kept getting smaller populations than the size defined in the config, and I think this is the reason for that as well.

This PR adds functionality that re-initializes the genome_indexer count to the last key in the population + 1.

I'm not sure if I've implemented the fix in the correct place, so let me know if I should make changes to better align with the project conventions :)

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant