-
Notifications
You must be signed in to change notification settings - Fork 650
Description
I am observing that when I have multiple islands, only island 0 ever increments its generation count:
2025-10-12 15:24:02 | openevolve.database | INFO | * Island 0: 5 programs, best=0.8743, avg=0.5215, diversity=1742.58, gen=6 (best: ee76dc80-4872-401b-a364-cb832b802afb)
2025-10-12 15:24:02,188 - INFO - * Island 0: 5 programs, best=0.8743, avg=0.5215, diversity=1742.58, gen=6 (best: ee76dc80-4872-401b-a364-cb832b802afb)
2025-10-12 15:24:02 | openevolve.database | INFO | Island 1: 2 programs, best=0.8743, avg=0.8709, diversity=806.50, gen=0 (best: 82d83ba0-de71-4b38-8800-b2f4a945372c)
2025-10-12 15:24:02,188 - INFO - Island 1: 2 programs, best=0.8743, avg=0.8709, diversity=806.50, gen=0 (best: 82d83ba0-de71-4b38-8800-b2f4a945372c)
2025-10-12 15:24:02 | openevolve.database | INFO | Island 2: 0 programs, best=0.0000, avg=0.0000, diversity=0.00, gen=0 2025-10-12 15:24:02,188 - INFO - Island 2: 0 programs, best=0.0000, avg=0.0000, diversity=0.00, gen=0
2025-10-12 15:24:02 | openevolve.database | INFO | Island 3: 0 programs, best=0.0000, avg=0.0000, diversity=0.00, gen=0 2025-10-12 15:24:02,188 - INFO - Island 3: 0 programs, best=0.0000, avg=0.0000, diversity=0.00, gen=0
2025-10-12 15:24:02 | openevolve.database | INFO | Island 4: 2 programs, best=0.8743, avg=0.8709, diversity=806.50, gen=0 (best: 90fce5eb-3989-4a5d-9750-85008bf75877)
2025-10-12 15:24:02,188 - INFO - Island 4: 2 programs, best=0.8743, avg=0.8709, diversity=806.50, gen=0 (best: 90fce5eb-3989-4a5d-9750-85008bf75877)
Notice that Island 1 is on gen 6 and everything else on gen 0. I've seen this go pretty high, island 1 on gen 100+ and the rest on 0.
This seems like a bug, but I'm uncertain if it is a bug in the counting or a bug in the actual generation. I think https://github.com/codelion/openevolve/blob/main/openevolve/process_parallel.py#L675 is incorrect, because it will always prioritize island 0 and as long as island 0 returns first it will only ever iterate on that island;
and second, I think https://github.com/codelion/openevolve/blob/main/openevolve/process_parallel.py#L529 may be wrong, since it looks at the number of completed iterations instead of which island the completed iteration actually came from.
Note: claude code helped me with this analysis, so take it with a grain of salt.