Skip to content

feat(config): start islands from per-island initial programs - #547

Merged
codelion merged 7 commits into
algorithmicsuperintelligence:mainfrom
SUPR1M3:feat/island-initial-programs
Oct 26, 2026
Merged

codelion merged 7 commits into
algorithmicsuperintelligence:mainfrom
SUPR1M3:feat/island-initial-programs

Conversation

@SUPR1M3

@SUPR1M3 SUPR1M3 commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #55. Supersedes the stale draft #126 with the config-based design suggested there.

What

New database.island_initial_programs: List[Optional[str]]. Entry i is the program island i
starts from; null/missing keeps today's behaviour. The positional initial_program still seeds
island 0, so entry 0 must be null. No CLI, API or worker changes.

How

  • DatabaseConfig.validate_island_initial_programs(): rejects more entries than num_islands and a
    non-null entry at index 0 (mirrors island_system_messages). Called from Config.from_dict and from
    OpenEvolve.__init__, since a Config built in code skips the check in from_dict.
  • Config.from_yaml resolves relative paths against the config file, like template_dir.
  • Initial-program evaluation, insertion and artifact storage move into _add_initial_program; each
    seed is added with target_island=i on a fresh start only, so resuming does not duplicate seeds.
  • Missing seed file raises at construction. A different extension, or a seed rejected by a custom
    population_strategy.admit, only warns.

Testing

  • tests/test_island_initial_programs.py (14 tests): placement and island metadata,
    validation, path resolution, artifacts, rejected seeds, checkpoint resume, unchanged behaviour
    without the field.
  • Unit suite on Python 3.10: 908 passed. Integration suite against a local OpenAI-compatible stub: 41 passed.
  • With the field unset, the database state after the initial program is added is identical to main.

Notes

  • Seeds share the main program's language and file suffix, and must exist when resuming.
  • Why a different seed extension only warns: Seeds are always evaluated as the main
    program's language: the evaluator writes every program with the main program's suffix, and
    config.language comes from the main program. A different extension doesn't always mean a
    different language (.cc vs .cpp, .mjs vs .js, a seed saved without an extension), and
    those seeds work correctly, so raising an error would block valid setups. A seed that really is
    in another language doesn't crash the run: the evaluator rejects it, it scores poorly, and the
    startup warning flags it. Happy to make this an error instead if you'd prefer to fail fast.

…+ Tests

Pull initial-program evaluation, insertion and artifact storage into
_add_initial_program, then call it for each configured island seed
with target_island set. Missing seed files fail at construction, a
different extension only warns, as does a seed the population
strategy rejects.
Seeds are added only on a fresh start, so resuming from a checkpoint does not duplicate them.
… + Test

Move the checks into DatabaseConfig.validate_island_initial_programs() and also call it from OpenEvolve.__init__, since a Config built in Python never passes through from_dict. Without it, extra entries wrapped onto island 0. Correct the configs/README note on null islands.
1. configs/island_config_example.yaml: island_initial_programs example right after num_islands, with the same rules as default_config.yaml.
2. configs/README.md: the example line is commented out, so copying the snippet doesn't cause and error due to a missing seed file.
@SUPR1M3 SUPR1M3 changed the title Feat/island initial programs feat(config): start islands from per-island initial programs Oct 25, 2026
@codelion
codelion merged commit 66856ac into algorithmicsuperintelligence:main Oct 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] Starting from multiple primitive programs

2 participants