Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion openevolve/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ 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
Expand Down
22 changes: 6 additions & 16 deletions openevolve/process_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,12 +445,6 @@ async def run_evolution(
next_iteration = current_iteration
completed_iterations = 0

# Island management
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
early_stopping_enabled = self.config.early_stopping_patience is not None
if early_stopping_enabled:
Expand Down Expand Up @@ -543,16 +537,12 @@ async def run_evolution(
)

# Island management
if (
completed_iteration > start_iteration
and current_island_counter >= programs_per_island
):
self.database.next_island()
current_island_counter = 0
logger.debug(f"Switched to island {self.database.current_island}")

current_island_counter += 1
self.database.increment_island_generation()
# get current program island id
island_id = child_program.metadata.get(
"island", self.database.current_island
)
#use this to increment island generation
self.database.increment_island_generation(island_idx=island_id)

# Check migration
if self.database.should_migrate():
Expand Down