diff --git a/openevolve/config.py b/openevolve/config.py index 57fcaa46..7cc540b4 100644 --- a/openevolve/config.py +++ b/openevolve/config.py @@ -248,6 +248,7 @@ class DatabaseConfig: population_size: int = 1000 archive_size: int = 100 num_islands: int = 5 + programs_per_island: Optional[int] = None # Selection parameters elite_selection_ratio: float = 0.1 diff --git a/openevolve/process_parallel.py b/openevolve/process_parallel.py index 69766ce5..144449d9 100644 --- a/openevolve/process_parallel.py +++ b/openevolve/process_parallel.py @@ -426,7 +426,7 @@ async def run_evolution( completed_iterations = 0 # Island management - programs_per_island = max(1, max_iterations // (self.config.database.num_islands * 10)) + programs_per_island = self.config.database.programs_per_island or max(1, max_iterations // (self.config.database.num_islands * 10)) current_island_counter = 0 # Early stopping tracking