Skip to main content

A Flexible Framework for AI-Driven Scientific and Algorithmic Discovery

Project description

  SkyDiscover logo 

  SkyDiscover

A Flexible Framework for AI-Driven Scientific and Algorithmic Discovery

  Blog   AdaEvolve Paper   EvoX Paper  

SkyDiscover architecture

SkyDiscover is a modular framework for AI-driven scientific and algorithmic discovery, providing a unified interface for running and comparing algorithms across 200+ optimization tasks. It follows the same high-level evolutionary loop as prior systems like AlphaEvolve, but exposes each stage as a reusable, extensible component:

  1. Context Builder. Assembles prompts from the problem spec, prior solutions, and human feedback.
  2. Solution Generator. Produces candidates via LLM calls, with optional tool use (e.g., reading codebases).
  3. Evaluator. Scores candidates and logs metadata back into the solution database.
  4. Solution Selector. Maintains the solution database and picks priors for the next iteration (Top-K, MAP-Elites, adaptive evolutionary methods, etc.).

Come and build easily with SkyDiscover!

🚧 This project is under active development. APIs and interfaces may change.


🏆 Benchmarks & Performance

We implement two adaptive evolutionary algorithms (AdaEvolve and EvoX), achieving:

  • Best open-source performance — ~34% median score improvement on 172 Frontier-CS problems over OpenEvolve, GEPA, and ShinkaEvolve
  • Matching or exceeding AlphaEvolve and human SOTA — on 8 math and 6 systems optimization tasks
  • Real-world discoveries — 41% lower cross-cloud transfer cost, 14% better GPU load balance for MoE serving, 29% lower KV-cache pressure via GPU model placement

SkyDiscover benchmarks

200+ tasks across math, systems, and algorithms
Benchmark Domain Tasks Description
🔢 math/ Math 14 Circle packing, Erdos problems, geometric optimization
🖥️ ADRS/ Systems 6 Cloud scheduling, load balancing, MoE expert placement
gpu_mode/ Systems 3 GPU kernel optimization
🧩 frontier-cs-eval/ Algorithms 172 Frontier-CS competitive programming
🧠 arc_benchmark/ Reasoning ARC-AGI visual reasoning
💻 ale_bench/ Algorithms Algorithmic programming contests
💬 prompt_optimization/ NLP 1 HotPotQA prompt evolution

See Dependency extras for install commands per benchmark.

🚀 Quick Start

Prerequisites: Python >= 3.10, uv

# Install
uv sync
export OPENAI_API_KEY="<your-key>"

# Try the circle packing benchmark
uv sync --extra math
uv run skydiscover-run benchmarks/math/circle_packing/initial_program.py \
  benchmarks/math/circle_packing/evaluator.py \
  --config benchmarks/math/circle_packing/config.yaml \
  --search adaevolve \
  --iterations 100

# Or run on your own problem
uv run skydiscover-run initial_program.py evaluator.py \
  --search evox \
  --model gpt-5 \
  --iterations 100

Or use the Python API:

from skydiscover import run_discovery

result = run_discovery(
    initial_program="initial_program.py",
    evaluator="evaluator.py",
    search="evox",   # or "adaevolve"
    model="gpt-5",
    iterations=100,
)
print(result.best_score, result.best_solution)

✏️ The Two Files You Write

Scoring Function

Your evaluator is a Python file with an evaluate(program_path) function. It returns a dict with metrics and optional artifacts:

def evaluate(program_path):
    score = run_and_grade(program_path)
    return {
        "combined_score": score,       # primary optimization target (maximized)
        "artifacts": {                 # optional — stored with the solution for future context
            "feedback": "Off by one in the loop boundary",
        },
    }
  • combined_score drives evolution. If omitted, SkyDiscover averages all numeric values in the dict.
  • artifacts is optional — entries are injected into the next LLM prompt as context.

Starting Solution

Your initial program marks the region to mutate with EVOLVE-BLOCK markers. Everything outside is left untouched.

# EVOLVE-BLOCK-START
def solve(input_data):
    return input_data  # baseline — SkyDiscover will improve this
# EVOLVE-BLOCK-END

If no markers are present, the entire file is treated as mutatable.

🧬 Pick an Algorithm

Algorithm Flag Description
⭐ AdaEvolve --search adaevolve Multi-island adaptive search with UCB, migration, and paradigm breakthroughs
🧠 EvoX --search evox Self-evolving paradigm that co-adapts solution generation and experience management
📊 Top-K --search topk Simple baseline — keeps the top-K solutions
🔍 Beam Search --search beam_search Breadth-first expansion of a beam of top solutions
🎲 Best-of-N --search best_of_n Generates N variants per iteration, keeps the best
External backends

Note: The external extra is only supported when installing via uv. It will not work with pip install skydiscover[external] because it pulls packages directly from Git. If you are using pip, install the backends manually (see each project's repo).

Install with uv sync --extra external, then use the corresponding flag:

Backend Flag Source
OpenEvolve --search openevolve codelion/openevolve
GEPA --search gepa gepa-ai/gepa
ShinkaEvolve --search shinkaevolve SakanaAI/ShinkaEvolve (manual install)
ShinkaEvolve manual install
git clone --depth 1 https://github.com/SakanaAI/ShinkaEvolve.git external_repos/ShinkaEvolve
uv pip install -e external_repos/ShinkaEvolve

SkyDiscover shows a helpful error if you try to use a backend that isn't installed.

⚙️ Configuration

Pass a YAML config with -c. See configs/ for full annotated templates.

max_iterations: 100
llm:
  models: [{ name: "gemini/gemini-3-pro-preview", weight: 1.0 }]
search:
  type: "adaevolve"                  # or "evox", "topk", "beam_search", "best_of_n"
prompt:
  system_message: |
    You are an expert at optimizing algorithms.

API keys (OPENAI_API_KEY, GEMINI_API_KEY, etc.) are resolved from environment variables automatically.

📊 Live Monitor & Human Feedback

Add monitor: { enabled: true } to your config. The dashboard URL prints at run start — scatter plot of all programs, code diffs, metrics, and AI summaries. A Human Feedback panel lets you steer evolution in real time. Replay a completed run:

uv run skydiscover-viewer /path/to/checkpoints/checkpoint_100

📖 Reference

CLI flags
uv run skydiscover-run INITIAL_PROGRAM EVALUATOR [options]
Flag Description
-c, --config FILE Config YAML
-i, --iterations N Number of iterations
-m, --model MODEL LLM model (overrides config)
-s, --search TYPE Search algorithm
-o, --output DIR Output directory
--api-base URL Override LLM API endpoint
--checkpoint DIR Resume from checkpoint
--codebase DIR Agentic mode (LLM can read your files)
-l, --log-level LEVEL DEBUG, INFO, WARNING, or ERROR
Python API — discover_solution()
from skydiscover import discover_solution

result = discover_solution(
    initial_solution="def solve(x): return x",
    evaluator=lambda path: {"combined_score": run_tests(path)},
    iterations=50,
    search="evox",
)
Model providers

Any LiteLLM-compatible model works using provider/model format:

--model gpt-5                                               # OpenAI (default)
--model gemini/gemini-3-pro-preview                          # Gemini
--model anthropic/claude-sonnet-4-20250514                   # Anthropic
--model ollama/llama3 --api-base http://localhost:11434/v1   # Local (Ollama, vLLM, etc.)

Multi-model pools with weighted sampling are supported in config:

llm:
  models:
    - name: "gpt-5-mini"
      weight: 0.7
    - name: "gemini/gemini-2.0-flash"
      weight: 0.3
Benchmark dependency extras
uv sync                              # Base install
uv sync --extra math                 # Math benchmarks (SciPy, JAX, PyWavelets, …)
uv sync --extra adrs                 # ADRS systems benchmarks
uv sync --extra frontier-cs          # Frontier-CS benchmark tooling
uv sync --extra external             # OpenEvolve / GEPA / ShinkaEvolve backends (uv only, not available via pip)
uv sync --extra prompt-optimization  # HotPotQA prompt optimization

Combine extras as needed: uv sync --extra external --extra math

If a benchmark ships its own requirements.txt, also run: uv pip install -r path/to/requirements.txt


🔗 Related Work

SkyDiscover is inspired by AlphaEvolve, Google DeepMind's evolutionary coding agent, and OpenEvolve, an open-source reimplementation of the AlphaEvolve framework.

✍️ Citation

@misc{skydiscover2025,
  title={SkyDiscover: A Flexible Framework for AI-Driven Scientific and Algorithmic Discovery},
  author={Liu, Shu and Cemri, Mert and Agarwal, Shubham and Krentsel, Alexander and Naren, Ashwin and Mang, Qiuyang and Li, Zhifei and Gupta, Akshat and Maheswaran, Monishwaran and Cheng, Audrey and Pan, Melissa and Boneh, Ethan and Ramchandran, Kannan and Sen, Koushik and Dimakis, Alexandros G. and Zaharia, Matei and Stoica, Ion},
  year={2025},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

skydiscover-0.1.0.tar.gz (212.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

skydiscover-0.1.0-py3-none-any.whl (245.5 kB view details)

Uploaded Python 3

File details

Details for the file skydiscover-0.1.0.tar.gz.

File metadata

  • Download URL: skydiscover-0.1.0.tar.gz
  • Upload date:
  • Size: 212.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for skydiscover-0.1.0.tar.gz
Algorithm Hash digest
SHA256 106ef1cfd045a1a6ca0c0868ef7265ea1eada8afb14ae9c0e3402040134f9cf1
MD5 d7409a0d9b2b5fb4a1c3bd989413bf74
BLAKE2b-256 67494742b00691ea2cbe13022000e3b5a6c0d8e6ebc7402b14170e1e56df71ef

See more details on using hashes here.

File details

Details for the file skydiscover-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: skydiscover-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 245.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for skydiscover-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 900ada8fa9797dc130495b9b8580c127edfbcf665a3ed18efffa0544ab1bda72
MD5 bd10faacf405c2cd3a70f063c558e79a
BLAKE2b-256 3ef9bea505668268a45a89796516678a12fb3a10c7df9395d92d7dbc64ad4dcb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page