fix NoCrossover missing offsprings#744
fix NoCrossover missing offsprings#744gideonoludeyi wants to merge 2 commits intoanyoptimization:mainfrom
Conversation
|
Any updates on approving this change. The failing tests seemed to have failed due to external causes. Might be worth retrying the CI action to verify. |
|
can you check if the commit above also fixes this issue? |
It does not Consider if you have 3 osprint and 2 parents. Consider the example that the parents are |
- When n_offsprings < n_parents: select without replacement - When n_offsprings == n_parents: return all parents as-is - When n_offsprings > n_parents: keep all parents, fill rest randomly Addresses #744 while supporting random selection options.
|
okay second attempt. what do you think about the new implementation? covering all the cases depending on n_offsprings. |
|
I think it's good. Should be safe to close this PR. |
Resolves #743
NoCrossoverdoes random selection which fails to propagate certain parents.This PR ensures that all parents are propagated as offsprings.
Thanks @oxinabox for the catch.