Skip to content

About the population size #167

@Ethan-han921

Description

@Ethan-han921

When I set

database:
  population_size:  1
  archive_size: 1
  num_islands: 1
  exploration_ratio: 0.0
  elite_selection_ratio: 1.0
  exploitation_ratio: 0.0

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions