Prerequisites
- Python 3.10 or higher (3.10-3.13 supported)
- uv package manager (recommended) or pip
- LLM API key (OpenAI, Gemini, Claude, or local model)
Quick Setup
Understanding the Example
The Circle Packing Problem
The circle packing problem asks: What’s the optimal arrangement of n circles of diameter 1 in a unit circle?Initial Program
The starting solution uses a constructor-based approach:initial_program.py
EVOLVE-BLOCK markers tell SkyDiscover which region to optimize. Everything outside remains unchanged.
Evaluator Function
The evaluator scores how tightly circles can be packed:evaluator.py
How Evolution Works
- Iteration 1: SkyDiscover runs the initial program and evaluates it
- Iteration 2-100: The LLM proposes improvements to the
generate_circle_packingfunction - Selection: AdaEvolve uses adaptive strategies to select which programs to evolve
- Evaluation: Each new program is scored by the evaluator
- Best tracking: The highest-scoring solution is saved
Try Your Own Problem
Option 1: Start from Scratch
Let the LLM generate a solution from just an evaluator:Option 2: Python API
Use SkyDiscover programmatically:Option 3: Custom Evaluator
Create a custom optimization problem:my_evaluator.py
Choose a Search Algorithm
Different algorithms work better for different problems:AdaEvolve
Best for: Most problemsAdaptive multi-island search with UCB selection and paradigm breakthroughs
EvoX
Best for: Complex landscapesSelf-evolving algorithm that adapts its own strategy
Beam Search
Best for: Discrete decisionsMaintains multiple candidate solutions in parallel
Top-K
Best for: Quick experimentsSimple greedy selection of top performers
Common Workflows
Resume from checkpoint
Resume from checkpoint
If a run is interrupted, resume from the last checkpoint:
Use multiple models
Use multiple models
Distribute load across multiple LLMs:Or configure in YAML:
Enable live monitoring
Enable live monitoring
Add to your config or command line:Then visit
config.yaml
http://localhost:8080 to see:- Real-time scatter plot of all programs
- Code diffs and metrics
- Progress charts
- AI-generated summaries
Optimize multiple files (agentic mode)
Optimize multiple files (agentic mode)
Let the LLM read and modify multiple files:The LLM can now read any file in your codebase and make coordinated changes across multiple files.
Next Steps
Core Concepts
Learn how SkyDiscover works under the hood
Writing Evaluators
Best practices for creating effective scoring functions
Browse Examples
Explore math, systems, and algorithm optimization examples
Configuration Guide
Advanced configuration options and YAML reference
Troubleshooting
API key not found
API key not found
Make sure you’ve exported your API key:Or pass it via config:
Module not found
Module not found
Install the required extras for your benchmark:
Rate limit errors
Rate limit errors
Reduce iteration frequency or use multiple models: