About the population size #173
Unanswered
Ethan-han921
asked this question in
Q&A
Replies: 1 comment
-
When population_size = 1, the method creates a protected_ids set containing both:
This means at least 2 programs are always protected from removal, making it impossible to maintain exactly 1 program in the population. This protection mechanism serves two purposes:
However, when population_size = 1, these protections conflict with the population limit. it is just an edge case you can set |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When I set
For the initial round:
2025-07-29 10:29:26,390 - INFO - Using island-based evolution with 1 islands
2025-07-29 10:29:26,390 - INFO - * Island 0: 1 programs,
For the next round:
2025-07-29 10:29:50,909 - INFO - Population size (2) exceeds limit (1), removing 1 program
2025-07-29 10:29:50,909 - INFO - Population size after cleanup: 2
For the third round:
2025-07-29 10:30:17,429 - INFO - Population size (3) exceeds limit (1), removing 2 programs
2025-07-29 10:30:17,429 - INFO - Population size after cleanup: 2
I'm confused about why there is a population size = 3 in the third round, since I think every round should compare one new candidate against the last round’s best, then evict any losers so that exactly one program remains in memory.
I also checked the database.py
I thought
Because the same protected_ids filter is applied twice (initial pass and refill pass), the code never removes enough entries when both the “current best” and the “new candidate” are protected.
Could you please provide some explanations? Thank you so much
Beta Was this translation helpful? Give feedback.
All reactions