Skip to main content
Get your first AI-driven discovery running in minutes with this step-by-step guide.

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

1

Install SkyDiscover

Install the base package with uv:
Or install specific extras:
2

Set up API key

Export your LLM API key:
3

Run your first discovery

Try the circle packing example (requires --extra math):

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
The 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

  1. Iteration 1: SkyDiscover runs the initial program and evaluates it
  2. Iteration 2-100: The LLM proposes improvements to the generate_circle_packing function
  3. Selection: AdaEvolve uses adaptive strategies to select which programs to evolve
  4. Evaluation: Each new program is scored by the evaluator
  5. 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
Then run:

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

If a run is interrupted, resume from the last checkpoint:
Distribute load across multiple LLMs:
Or configure in YAML:
Add to your config or command line:
config.yaml
Then visit http://localhost:8080 to see:
  • Real-time scatter plot of all programs
  • Code diffs and metrics
  • Progress charts
  • AI-generated summaries
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

Make sure you’ve exported your API key:
Or pass it via config:
Install the required extras for your benchmark:
Reduce iteration frequency or use multiple models: