This guide gets you from zero to running evolution in 5 minutes.
- Python 3.12+
- Redis server running
- OpenRouter API key (or other LLM provider)
# Clone and install
pip install -e .
# Create .env file
echo "OPENAI_API_KEY=sk-or-v1-your-key-here" > .env# In a separate terminal
redis-server# Run the heilbron problem (triangle packing)
python run.py problem.name=heilbron max_generations=5You should see:
[INFO] GigaEvo Evolution Experiment
[INFO] Problem: heilbron
[INFO] Loading initial programs...
[INFO] Loaded 5 initial programs
[INFO] Starting evolution...
Congratulations! Evolution is running. 🎉
- Initial Programs: 5 seed programs loaded from
problems/heilbron/initial_programs/ - Evaluation: Each program is evaluated (runs its
entrypoint()function) - Mutation: LLM mutates the best programs to create new ones
- Selection: Programs that improve fitness are kept in the archive
- Repeat: Continues for 5 generations
Open a new terminal:
# Show current run status (fitness, gen count, invalidity, etc.)
# Preferred: use --experiment mode (auto-discovers runs from experiment.yaml)
PYTHONPATH=. python tools/status.py --experiment <task>/<name>
# Or specify a single run directly:
PYTHONPATH=. python tools/status.py --run heilbron@0:run-1
# Show top N programs
PYTHONPATH=. python tools/top_programs.py --run heilbron@0:run-1 -n 5
# Export results to CSV
PYTHONPATH=. python tools/redis2pd.py --run heilbron@0:run-1# Logs are in outputs/
tail -f outputs/2025-11-11/*/evolution_*.logAfter evolution completes:
# Export to CSV
PYTHONPATH=. python tools/redis2pd.py --run heilbron@0:run-1
# Compare fitness curves across runs (pass multiple --run flags)
PYTHONPATH=. python tools/comparison.py --run heilbron@0:run-1 --run heilbron@1:run-2
# View top programs
PYTHONPATH=. python tools/top_programs.py --run heilbron@0:run-1 -n 10[INFO] Step 1/5: Initializing components... ✓
[INFO] Step 2/5: Checking Redis database... ✓
[INFO] Step 3/5: Loading initial programs... (5 programs) ✓
[INFO] Step 4/5: Starting evolution... ✓
[INFO] Step 5/5: Running until completion...
[INFO] [EvolutionEngine] Phase 1: Idle confirmed
[INFO] [EvolutionEngine] Phase 2: Created 10 mutant(s)
[INFO] [EvolutionEngine] Phase 3: Mutant DAGs finished
[INFO] [EvolutionEngine] Phase 4: Ingestion done (added=3, rejected=7)
[INFO] [EvolutionEngine] Phase 5: Refreshed 8 program(s)
- Added: Programs accepted into the archive (good!)
- Rejected: Programs that didn't improve any cell (normal)
- Fitness: The main objective value (higher is better for heilbron)
Solution:
# Use tools/flush.py (kills exec_runner workers first):
PYTHONPATH=. python tools/flush.py --db 0 --confirm
# Or use a different database:
python run.py problem.name=heilbron redis.db=1Cause: Programs might be failing validation.
Solution:
# Check invalidity rate
PYTHONPATH=. python tools/status.py --run <prefix>@<db>:<label>
# View top programs and their fitness
PYTHONPATH=. python tools/top_programs.py --run <prefix>@<db>:<label> -n 10Cause: LLM API calls take time.
What's normal:
- Initial evaluation: ~30 seconds per program
- Mutation creation: ~10-30 seconds per mutant
- Generation cycle: ~2-5 minutes
Speed it up:
- Reduce
max_mutations_per_generationin config - Use faster LLM models
- Increase
max_concurrent_dags(but beware of rate limits)
# Copy the heilbron template
cp -r problems/heilbron problems/my_problem
# Edit the key files:
# - problems/my_problem/validate.py (fitness function; can return (metrics_dict, artifact) for mutation context)
# - problems/my_problem/metrics.yaml (metric definitions)
# - problems/my_problem/initial_programs/ (seed programs)
# - problems/my_problem/task_description.txt (LLM instructions)# Try multi-island evolution
python run.py experiment=multi_island_complexity problem.name=heilbron
# Use different LLM models
python run.py experiment=multi_llm_exploration problem.name=heilbron
# Adjust parameters
python run.py problem.name=heilbron \
max_generations=20 \
max_mutations_per_generation=15 \
model_name=anthropic/claude-3.5-sonnet- Architecture:
ARCHITECTURE.md- Understand the system design - DAG System:
DAG_SYSTEM.md- Learn about pipelines - Evolution Strategies:
EVOLUTION_STRATEGIES.md- Learn about MAP-Elites - Contributing:
CONTRIBUTING.md- Development guidelines
# View all available experiments
ls config/experiment/
# View all available problems
ls problems/
# View available LLM configurations
ls config/llm/# Run evolution
python run.py problem.name=<problem>
# Run with config override
python run.py problem.name=<problem> max_generations=10
# Use different experiment
python run.py experiment=<experiment> problem.name=<problem>
# Preview config (no execution)
python run.py problem.name=<problem> --cfg job
# Check run status (--experiment mode preferred for managed experiments)
PYTHONPATH=. python tools/status.py --experiment <task>/<name>
# Or for a single run:
PYTHONPATH=. python tools/status.py --run <prefix>@<db>:<label>
# View top programs
PYTHONPATH=. python tools/top_programs.py --run <prefix>@<db>:<label> -n 10
# Export results to CSV
PYTHONPATH=. python tools/redis2pd.py --run <prefix>@<db>:<label>
# Flush Redis (kills exec_runners first — never use redis-cli FLUSHDB directly)
PYTHONPATH=. python tools/flush.py --db 0 --confirm
# View logs
tail -f outputs/*/evolution_*.log- Check logs: Most issues are explained in the logs
- Check run status:
PYTHONPATH=. python tools/status.py --run <prefix>@<db>:<label> - Read architecture doc:
ARCHITECTURE.mdexplains the system - Check examples: Look at existing problems in
problems/
✅ How to run evolution ✅ How to inspect evolution state ✅ How to debug common issues ✅ Where to find logs and results
- Day 1: Run existing problems, inspect results
- Day 2: Read
ARCHITECTURE.md, understand the flow - Day 3: Create your own simple problem
- Day 4: Customize pipeline (add custom stages)
- Day 5: Experiment with multi-island evolution
Happy Evolving! 🚀