Adaptive migration: stabilize evolution by adapting mutation/selection based on progress #54
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


Title: Adaptive island migration: per-island parameter tuning + optional bandit policy selection
Summary:
This PR adds an optional adaptive migration module that tunes island-migration behavior during evolution runs. When enabled, Shinka can adjust (per island):
The adaptation can be driven by success, diversity, and/or a bandit policy selector, and it writes a run log to migration_adaptation.csv in the run’s results_dir.
Motivation:
Fixed, global migration hyperparameters are often suboptimal across islands and across phases of a run. This change makes migration responsive to observed outcomes, improving robustness without changing default behavior for existing configurations (adaptation is opt-in).
Key Changes:
Adds MigrationAdaptationController that:
Migration strategy can consume:
Backward Compatibility:
How to Test:
Install (example using uv):
uv venv --python 3.11
source .venv/bin/activate
uv pip install -e ".[dev]"
Run an example with adaptive migration enabled via the provided database preset:
shinka_launch variant=circle_packing_example database=island_adaptive evo_config.num_generations=12
Confirm outputs:
Expected result:
The run completes normally, and migration_adaptation.csv contains per-generation rows per island with migration_rate, migration_interval, island_elitism, and optional bandit policy fields.
Notes / Design Details:
Checklist: