Skip to content
This repository was archived by the owner on Aug 11, 2025. It is now read-only.

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

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant