Coevolution of code and tests to improve LLM-driven code generation via Bayesian updates and evolutionary strategies.
cd /path/to/workspace
uv syncThe main entry point is main.py. Run an experiment using a YAML config:
uv run python main.py run --config configs/experiments/default.yamlOverride components or subsets via CLI options:
# Use a different LLM config
uv run python main.py run --config configs/experiments/default.yaml \
--llm configs/llm/gpt-4.yaml
# Run a quick test experiment
uv run python main.py run --config configs/experiments/quick-test.yaml
# Validate a config without running (dry-run)
uv run python main.py run --config configs/experiments/default.yaml --dry-run
# List available config types
uv run python main.py list-configs llmConfiguration files live under configs/ and are modular (LLM, profiles, sandbox, schedules, experiments).
See configs/README.md for details and examples on composing configs and overriding values.
- Source:
src/— core modules and implementations.src/coevolution/populations/— Population types (code, unittest, differential, agent_coder) and their specialized LLM operators.src/coevolution/strategies/— Shared infrastructure (breeding, selection, probability).- See src/coevolution/README.md for deeper details.
- Configs:
configs/— modular YAML files used bymain.py. - Data:
data/— datasets, generations, and evaluation outputs. - Scripts & experiments:
experiments/andscripts/— helpers and notebooks for running experiments and analyses. - Logs & outputs:
logs/— run metadata, saved configs, and generated artifacts.
- Use
--dry-runto validate configuration and view the resolved config without executing experiments. - The runner saves the resolved config to
logs/run_config.jsonwithin each run directory for reproducibility.
If an experiment is interrupted (e.g., due to a crash or manually stopping it), you can resume it using the same run_id and the --resume flag:
uv run python main.py run --config configs/experiments/default.yaml --run-id <existing_run_id> --resumeBy default, the --resume flag is set to False. When enabled, the system will:
- Reuse the existing log directory without renaming it.
- Scan existing problem logs for a completion marker (
"event": "survived"). - Skip already completed problems and jump directly to the next one in the sequence.
- Override partial logs for problems that were interrupted mid-evolution to ensure a clean restart for that specific problem.
To disable this behavior and force a fresh run (renaming the directory if a collision occurs), use --no-resume:
uv run python main.py run --config configs/experiments/default.yaml --run-id <existing_run_id> --no-resume- Experiment runner: main.py
- Coevolution implementation and API: src/coevolution/README.md
- Config documentation: configs/README.md