Metadata-Version: 2.4
Name: sciel
Version: 0.23.4
Summary: Recursive self-improvement through cultural transmission
Author: Arina Kharlamova, Jikun Kang, Yusheng Zhao, Xue Liu, Bowei He
Maintainer: MBZUAI CPIL Research Group
License-Expression: MIT
Project-URL: Homepage, https://sciel-rsi-cpil.github.io/
Project-URL: Source, https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework
Project-URL: Results, https://sciel-cpil.github.io/sciel-results/
Project-URL: Arena, https://github.com/SCiEL-RSI-CPIL/empira-rsi-arena
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS :: MacOS X
Requires-Python: <3.15,>=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyyaml>=6.0
Requires-Dist: pydantic>=2.0
Requires-Dist: numpy>=1.24
Requires-Dist: scipy>=1.11
Requires-Dist: tenacity>=8.2
Requires-Dist: openai>=1.30
Requires-Dist: greenlet<4,>=3.1
Requires-Dist: huggingface_hub>=0.23
Requires-Dist: torch>=2.2
Requires-Dist: rich>=13.7
Requires-Dist: anthropic>=1.0
Provides-Extra: dev
Requires-Dist: pytest>=8.2; extra == "dev"
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: jsonschema>=4; extra == "dev"
Provides-Extra: tasks
Requires-Dist: scipy>=1.11; extra == "tasks"
Provides-Extra: board
Requires-Dist: wandb>=0.16; extra == "board"
Provides-Extra: analysis
Requires-Dist: duckdb>=0.10; extra == "analysis"
Requires-Dist: pandas>=2.0; extra == "analysis"
Requires-Dist: psutil>=7.2; extra == "analysis"
Provides-Extra: tabular
Requires-Dist: tabpfn>=2.2; extra == "tabular"
Dynamic: license-file

# SCiEL

**Recursive self-improvement through cultural transmission.**

[![PyPI](https://img.shields.io/pypi/v/sciel?color=f2c94c)](https://pypi.org/project/sciel/)
[![MIT license](https://img.shields.io/badge/license-MIT-9cc3f2)](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/blob/main/LICENSE)
[![Python 3.11–3.14](https://img.shields.io/badge/python-3.11%E2%80%933.14-3776ab)](#quick-start)
[![17 task packages](https://img.shields.io/badge/task_packages-17-6c5ce7)](#tasks)
[![Runs in Empira](https://img.shields.io/badge/runs_in-Empira-64d2ff)](https://github.com/SCiEL-RSI-CPIL/empira-rsi-arena)

SCiEL evolves programs with a language model, **learns to steer its own evolution while it runs**, and **hands what
it learned to the next run**:

- **Search world model (SWM).** Forecasts, before the language model (LLM) is called, whether a step will raise its
  lineage's best. It starts from a pretrained tabular foundation model (TabPFN), so it is useful after a few dozen
  steps, and then refines with its own residual network.
- **Cold start → reinforcement learning (RL).** Sliding-window softmax bandits steer from the first step; the SWM joins
  at ~60 steps; an off-policy, KL-bounded RL step policy at 200+. Each joins only when it beats the one below it out of
  fold.
- **Hot start (cultural inheritance).** A finished run exports its repertoire: tested claims, tools, the step policy
  and the SWM's rows. The next run starts from them instead of from zero, and re-tests each one before trusting it.
- **Research cells.** Persistent questions that write and run their own tools in a Docker sandbox, measure the
  problem, and pass working methods to other branches after a recipient trial.
- **Theory of the search.** Every choice is randomized and logged with its probability; whether a choice helps is
  tested during the run with anytime-valid e-processes and e-BH false-discovery control, not guessed.

<p>
  Made by
  <a href="https://cpil-lab.github.io/"><img src="https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/raw/assets/brand-cpil.png" alt="CPIL logo" width="48" height="48" align="middle"> CPIL Research Group</a>
  at
  <a href="https://mbzuai.ac.ae/"><img src="https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/raw/assets/brand-mbzuai.png" alt="MBZUAI logo" width="48" height="48" align="middle"> MBZUAI</a>.
</p>

[Results](#results-snapshot--v0180) · [Inside SCiEL](#inside-sciel) · [Tasks it is for](#what-tasks-sciel-is-for) ·
[Quick start](#quick-start) · [Components](#components) · [Models](#local-inference-or-an-api) ·
[Contributing](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/blob/main/CONTRIBUTING.md)

[![A run of SCiEL. Left: islands as sectors, lineages as trees, findings passed between islands as crimson chords. Right: the same programs placed by their code, shaded by score](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/raw/assets/sciel-hero.png)](#see-it-run)

## Results snapshot — v0.19.0

As of **20 October 2026**, SCiEL reaches frontier answers at a **fraction of the compute** comparable open-model systems report: an
**open 27B model, not trained during the search**, served from two H100 GPUs.

| Result reached | What it cost SCiEL | Closest system with reported cost | Difference |
| --- | --- | --- | --- |
| **New record** on the third autocorrelation constant with the absolute value inside the maximum ($C_{1d}$ in Tao's list): bound **1.4578548850** (800 steps), 0.36% below the merged record 1.4630716 and 0.15% below 1.4599890 claimed on 17 October 2026 (AlphaEvolve repository PR 13); verified in exact rational arithmetic | **400 evaluations from scratch** to 1.4578673, then about 120 evaluations from that construction · 27B open model | AlphaEvolve and the later constructions: cost not disclosed | **below the best value we know**, on an open model without training |
| Reproduced the state-of-the-art result on circle packing from scratch | **370 model calls · $1.92 · 9.3 h** · 27B open model | TTT-Discover: **25,600 samples · a few hundred $** · 120B open model, trained with RL during the search | **69× fewer model calls, ~100× cheaper, 4× smaller model, no training** |
| Reproduced AlphaEvolve's result on an autocorrelation constant from scratch | fastest: **11 calls · $0.03 · 17 min**; every run of three: at most 204 calls · $0.79 · 7 h | AlphaEvolve: Gemini 2.0 Flash + Pro ensemble, cost not disclosed. ThetaEvolve: 8B model trained with RL, stopped at 1.4930, short of it | **matched for 3 cents in 17 minutes** on an open model, where a model trained for the task fell short |

## Inside SCiEL

A **ladder of controllers** steers the search, matched to how much data the run has. Each one joins as a randomized
planner arm only after it beats the rung below it out of fold, and keeps acting only while it wins.

| Data so far | Who steers | What it learns |
| --- | --- | --- |
| first steps | **sliding-window softmax bandits** | operators and selection modes from recent rewards, with a probability floor so every choice stays logged with a usable propensity |
| ~60 steps | **search world model, TabPFN stage** | whether a step will raise its lineage's best, from a pretrained tabular model plus the rows of earlier runs |
| a run's worth | **world model network** | a residual on that forecast, with code embeddings |
| 200+ steps | **RL step policy** | a KL-bounded off-policy improvement over five decisions; two critics by island parity; acts only above two standard errors |
| always | **theory of the search** | e-processes test every decision while the run goes; e-BH bounds false discoveries; proven actions tilt sampling |

Around the ladder:

- **Research cells.** Persistent questions that write tools, run them in Docker on the step's frozen inputs, revise
  them, submit candidates and pass methods to other islands after a recipient trial.
- **Culture across runs.** A run exports its repertoire: claims, findings, tools, step policy and world-model rows.
  The next run inherits each item as one more randomized arm and keeps it only if it wins again.
- **Optimization machinery.** Islands with MAP-Elites, learned grids or VQ niches; run-wide novelty by hash, AST and
  output; a smoke → full → confirm cascade that keeps the worst repeat; a population view and task modules a candidate
  imports while it runs; parallel waves with shared capacity; checkpointed, replayable recovery.

## What tasks SCiEL is for

SCiEL is built for **long-horizon search**: tasks where a single edit rarely helps, progress takes hundreds of
evaluations, and what the run learns early (tools, tested findings, which moves pay off) keeps paying later. On a task
that 150 samples saturate, there is nothing for culture to compound on.

We make this precise. A task is a tuple $\langle X, F, h, h^{*}, M, B \rangle$: candidates $X$ the model writes, a
feasible set $F$, the objective $h$ the search sees and the true objective $h^{*}$, the model's edit operator $M$, and
the evaluation budget $B$. Its landscape is defined by $M$, so it moves as culture changes the context $M$ sees. The
key quantity is the chance that an edit at the frontier beats its parent by more than the noise radius $\varepsilon$:

```math
\pi_\varepsilon(x) = \Pr_{x' \sim M(\cdot \mid x)}\left[\, h(x') > h(x) + \varepsilon \,\right],
\qquad \mathbb{E}[\text{evaluations to leave a plateau}] \approx 1/\pi_\varepsilon .
```

A task is admitted to a run when its check is exact ($h = h^{*}$, no exploitable tolerance), the headroom between the
best reference and a known bound exceeds $4\varepsilon$ at the planned budget, and the upper confidence bound of
$\pi_\varepsilon$ at the frontier is at least $5/B$. The effect of transmission is expected exactly where
$\pi_\varepsilon$ at the frontier is **small but nonzero**: rare improvements, a long run, and a culture that raises
$\pi_\varepsilon$ for the next step. `sciel task` measures
the noise radius and the headroom before a search starts.

### In plain words

You do not need to write the task yourself. Give **Claude Code** or **Codex** the
[`sciel-task` skill](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/tree/main/skills/sciel-task) and your materials (a description, a paper, a notebook, data) and ask it to
solve the problem with SCiEL:

```sh
cp -r skills/sciel-task ~/.claude/skills/    # Claude Code
cp -r skills/sciel-task ~/.codex/skills/     # Codex
```

The skill:

1. **formulates** the task: what is being improved, how it is scored, the best known result to beat;
2. **builds** it for the search: an exact checker, helper functions the candidates can import, a seed that searches;
3. **audits** it before spending compute: leaks and exploits, noise, headroom, and how often an edit improves;
4. **fixes** what the audit finds, **runs** SCiEL, and **re-checks** the best solution independently.

Problems that fit share three traits: a result you can check exactly or on held-out data, room to improve beyond
the best known answer, and an answer that improves step by step over hundreds of tries rather than being found in
one go.

| Field | Example task | What SCiEL improves | How it is checked |
| --- | --- | --- | --- |
| Finance | Executing a large order over a day with the least slippage | the rule that splits the order over time | average cost on held-out trading days |
| Mathematics | Bounds on constants, packings, extremal configurations | the construction | exact arithmetic |
| Algorithms | A scheduling or bin-packing heuristic | the heuristic's code | cost on a fixed set of instances |
| Science | Decoding behaviour from recorded neural activity | the decoder's code | accuracy on a held-out regime |
| Engineering | A faster numerical kernel | the implementation | speed, with outputs equal to a reference |

## See it run

`sciel watch` follows a run in the terminal; `sciel web` opens the same run as a local page. Both read the run's
journal, so they work on a live run or a finished one. Shown: the best run on the third autocorrelation constant
above, with a local Qwen3.8-27B.

![The terminal viewer: best score, islands, attempts with their diffs, research cells and what the search learned](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/raw/assets/sciel-terminal.png)

| | |
| --- | --- |
| ![Run: attempts, failures and the selected diff](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/raw/assets/sciel-web_run.png) | ![Maps: the culture disk and the behaviour landscape](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/raw/assets/sciel-web_maps.png) |
| **Run.** Every attempt, why candidates fail, the idea and diff of each step. | **Maps.** The culture disk: islands as sectors, lineages as trees, findings passed between islands as chords. |
| ![Engine: how the run started and every island's attempts](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/raw/assets/sciel-web_engine.png) | ![What it learned: findings and where they were delivered](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/raw/assets/sciel-web_what.png) |
| **Engine.** How the islands were seeded and every attempt of every island. | **What it learned.** Findings of research cells and improvements, and where each was delivered. |

## Quick start

> [!TIP]
> **The easiest start is the skill.** Install [`sciel-task`](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/tree/main/skills/sciel-task) in Claude Code or Codex, open your
> materials and say *"solve this with SCiEL"*. It formulates the task, audits it, runs SCiEL and checks the result.
>
> ```sh
> git clone https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework
> cp -r sciel-rsi-framework/skills/sciel-task ~/.claude/skills/    # Claude Code
> cp -r sciel-rsi-framework/skills/sciel-task ~/.codex/skills/     # Codex
> ```

Requires **Python 3.11–3.14** on Linux or macOS.

```sh
pip install sciel
sciel
```

`sciel` alone finds a model key (`ANTHROPIC_API_KEY` or `OPENROUTER_API_KEY`, or asks once), takes the default
profile and asks what to improve: the bundled circle-packing demo, a program of yours, or a run to continue.

**Your own problem** is one Python file:

```python
def solve():                # the search rewrites this
    return [0.0, 0.0]

def score(result) -> float: # fixed during the search; higher is better, valid results score above 0
    x, y = result
    return 1 / (1 + (x - 1.7) ** 2 + (y + 0.7) ** 2)
```

```sh
sciel solve.py --budget 40                 # search
sciel task ./materials --note "..."        # draft a task from papers, notebooks or data, then audit it
sciel watch .sciel/runs/<run>              # terminal viewer; w opens the page, p pauses, q leaves it running
sciel stop .sciel/runs/<run>               # finish the work in flight, save and stop
sciel resume .sciel/runs/<run>
```

`sciel task` has a model draft `problem.py`, runs and repairs the seed, and audits repeatability, the noise floor and
the headroom between the seed and a reference before any search starts. A mock model needs no credentials:
`sciel run configs/smoke_mock.yaml --tasks-root ./tasks --budget 6 --watch none` from a source checkout with
`pip install -e '.[tasks]'`.

---

## The framework at a glance

```mermaid
flowchart LR
    TASK["Task<br/>program · evaluator · assets"]
    subgraph RUN["One run"]
        direction TB
        PLAN["Plan a step<br/>parent · operator · hints"]
        LLM["Language model<br/>local or API"]
        EVAL["Evaluate<br/>smoke → full → confirm"]
        POP["Islands<br/>MAP-Elites · novelty"]
        LEDGER["Decision ledger<br/>every choice + its probability"]
        THEORY["Theory<br/>anytime-valid claims"]
        SWM["World model<br/>forecasts a step"]
        RL["Step policy<br/>off-policy RL"]
        CELLS["Research cells<br/>tools · experiments"]
        PLAN --> LLM --> EVAL --> POP --> PLAN
        PLAN --> LEDGER
        EVAL --> LEDGER
        LEDGER --> THEORY & SWM & RL
        THEORY & SWM & RL -->|"tilt the next choices"| PLAN
        POP -->|"questions"| CELLS
        CELLS -->|"findings · candidates"| PLAN
    end
    REP["Repertoire<br/>claims · tools · models"]
    TASK --> RUN
    RUN -->|"export"| REP
    REP -->|"inherit, then re-test"| RUN
```

The inner loop is ordinary evolution. Everything around it learns about the loop itself, from a ledger in which every
choice is randomized and logged with its probability. That is what makes "this helps" testable inside a run, and what
lets a later run inherit only what was shown to help.

## Project layout

```
src/sciel/
  engine/          the search: step planning, generation, evaluation, islands, checkpoints, parallel waves
    llm/           providers: OpenAI-compatible (vLLM, OpenRouter), Anthropic, Codex, Claude Code CLI, mock
  eval/            task loading, sandboxed stages, output identity and certification
  causal/          decision ledger, doubly robust estimators, e-processes
  theory/          claims, experiments, strategies, findings and procedures
  swm/             search world model: TabPFN stage, residual network, niches, archive
  rl/              step policy: critics, returns, KL-bounded improvement
  research_tools/  research cells: questions, tools, experiments, sharing between islands
  methods/         isolated tool execution in Docker, tool registry, method exchange
  culture/         the repertoire one run exports and the next inherits
  components/      selection, population containers, learned policies
  ui/ cli/         terminal and web viewers, command line
  taskbuilder/     `sciel task`: draft and audit a task from materials
tasks/             task packages: evaluator.py, initial_program.py, task.yaml, optional assets/
configs/           maintained profiles
skills/sciel-task/ an agent skill for Claude Code and Codex: formulate, audit, run and verify a task
```

## Engine

One step of the search, as `engine/step_plan.py` and `engine/step_cycle.py` run it:

```python
def step(island):
    ctx = context_of(engine)                                   # phase, progress, island state
    parent = sample("parent", selection(island))               # every sample() is logged with its probability
    planner = sample("planner", theory.tilt({"base": .., "swm": .., "rl": ..}))
    operator = sample("operator", steered(planner, bandit.operator_probs(ctx)))   # diff, rewrite, cross, idea, repair
    hints = sample("finding", steered(planner, knowledge.offer(island)))          # tested findings, strategy cards
    refs = freeze_population(island, parent)                   # what the child may read while it runs
    child = llm.generate(prompt(task, parent, operator, hints, describe(refs)))
    if novelty.repeat(child): return reject(child)             # SHA-256 and AST repeats, run-wide
    result = cascade(child, stages=["smoke", "full", "confirm"], population=refs)  # confirm keeps the worst repeat
    islands[island].admit(child, result)                       # MAP-Elites cell, eviction, migration
    ledger.record(decisions, outcome=result)                   # feeds theory, world model and step policy
```

| | Parent choice | Edits | Learns during the run | Methods outlive candidates |
| --- | --- | --- | --- | --- |
| FunSearch | islands, score-weighted | whole function | no | no |
| AlphaEvolve | MAP-Elites + islands | diffs, Gemini Flash/Pro ensemble | no | no |
| OpenEvolve | MAP-Elites + islands, fixed exploit ratio | diffs | no | no |
| ShinkaEvolve | sigmoid(fitness) × 1/(1+children) | diffs, rewrites, crossover | UCB1 over LLMs | meta-scratchpad text |
| AdaEvolve | per-island intensity | diffs | UCB over islands; LLM meta-guidance on stalls | no |
| **SCiEL** | islands + learned grids, tilted by the planners | diffs, rewrites, crossover, ideas, repair | every choice: bandits, world model, step policy, tested claims | **tools, findings and models, with trials** |

**Why it is built this way.** The systems above adapt one or two knobs from a heuristic reward. They cannot say
whether an adaptation helped, because their choices are not logged with probabilities. AdaEvolve's ablation shows the
lever that matters most is its LLM meta-guidance (2.629 → 2.521 on circle packing without it), yet that guidance
is untested text. SCiEL randomizes every choice and logs it, so each adaptation, including a model's advice, is a
treatment with a measurable effect, and it is kept only while the effect holds.

## Components

### Search control: bandits and the step policy

```python
# engine/operators.py, components/policy/mode_bandit.py: the cold start
p_op   = floor(softmax(max(reward of the arm's last 20 outcomes) / T), 0.05)    # best case, recent
p_mode = softmax(mean(reward of the mode's last 50 outcomes, warm-started from a prior) / T)
# rl/policy.py: one KL-bounded improvement over the logging policy per decision
Q_even, Q_odd = fit_critic(rows by island parity)              # each scores the other half's rows
adv = pessimistic(Q) - E_mu[pessimistic(Q)]                    # centred on the logged policy
pi = mu * exp(eta * adv), with KL(pi || mu) <= 0.2              # eta searched in units of the advantages
act only if ESS >= 200 and V_oof(pi) > V(mu) + 2 * SE_clustered_by_parent
```

Others use a UCB-style bandit from the first step, with rewards like ShinkaEvolve's `exp(max(Δ, 0)) − 1`. SCiEL's
bandits differ on two points. A **sliding window** forgets old outcomes, because which edit pays off changes as the
population matures. A **softmax with a probability floor** replaces UCB's near-deterministic argmax, so every choice
has a known, nonzero probability and the ledger supports off-policy estimates; UCB1 and sliding-window UCB remain as
ablation arms (`configs/arms`). Parent selection uses the `novelty_chain` kernel, a score-temperature softmax that
also accepts the planners' tilt. Gains at
budgets of 50–800 calls are modest, and larger ones come from training the model itself on 10⁴–10⁵ samples
(EvoTune, ThetaEvolve). Hierarchical selection that values a node by its descendants (HGM) predicts progress far
better than the node's own score. SCiEL keeps online bandits for the cheap decisions and adds a **step policy over
step features**: it waits for 200 steps, values a step by the rise of the best along its lineage rather than the
child's own score, and moves only when an out-of-fold estimate clears its own error. No system we surveyed fits such
a critic with a warm-up and a gate.

### World model of the search

```python
# swm/world.py, swm/tabular.py: forecast whether a step raises its lineage's best
reference = best_of(base_rate, cell_means, TabPFN(operator rows, inherited rows))  # out of fold by island parity
net = residual_network(code_embedding_pca16, step_features, start=reference)        # cannot forecast worse
if gate(net beats reference out of fold): planner arm "swm" tilts the operator choice
```

Most leading systems have no learned predictor of a step's success and rely on filters and evaluation cascades.
Where one exists it is trained once (LLaMEA-SAGE, used only as a prompt hint and not significant at n = 5) or scores
pairs before the call (DGS, 200 evaluations). SCiEL's model starts from a pretrained tabular model, so it can forecast
from a few dozen rows, inherits the operator rows of earlier runs, and **acts only as one randomized arm of the
planner**, so its effect on progress is measured like any other arm's.

### Theory of the search

```python
# theory/claims.py, causal/sequential.py: "this action changes the child's event rate"
for decision in FAMILY:                                         # operator, planner, origin, finding, ...
    e = mixture_of_bets(doubly_robust_contrasts(ledger, decision))   # an e-process, valid at any stopping time
claims = e_BH(all e-values, alpha=0.05)                        # false discovery rate under any dependence
theory.tilt(decision) shifts sampling toward proven actions, and keeps exploring the rest
```

Others report ablations after the fact. SCiEL tests its own choices **while it runs**, without peeking penalties, and
a claim enters a later run only as an inherited prior that is re-tested there.

### Research cells and tools

```python
# research_tools/: a question with an experimental history
cell = open_question(trigger=stall or schedule)                # "what structure of the task changes the design?"
while steps < max_steps:
    tool = llm.write("def run(payload): ...")                  # imports what a candidate imports
    obs = docker_run(tool, payload=frozen(parent, best), no_network=True, limits)
    decide(revise | another experiment | submit candidate | finish)  # finish only after a trial
share(tool, to=other islands) → recipient trial → adopted only if it ran there
```

AlphaEvolve and OpenEvolve keep no methods; ShinkaEvolve keeps a meta-scratchpad of summaries; AdaEvolve asks a model
for new tactics on stalls. None of them separates an untested idea from a measured one. In SCiEL a cell writes
**executable tools** that run in an isolated container on the frozen inputs of the step. Their observations carry
their source, and a tool reaches another island only through a recipient trial. The tool sees the same population
view and task modules a candidate sees, so a cell can measure exactly the object it is reasoning about.

### Population view and task assets

```python
# inside a candidate while it is evaluated
from sciel.population import population    # island best, parent and run best, with the exact scored outputs
from sciel.task import asset
steps = asset("steps")                      # the task's own objective, gradients and refinement
h = population()[0]["output"]["heights"]    # continue the best construction instead of rebuilding it
budget = float(os.environ["SCIEL_STAGE_SECONDS"])   # check fast in smoke, search in full and confirm
```

A child that can only read code rebuilds its parent's construction from scratch every time. Here it continues from
the measured object, and the request binds the view's hash, so a re-measurement reads the same view. On the third
autocorrelation constant, the view, the stage budget and the task's objective module together took the best bound
from about 1.55 to 1.462 after the same 50 evaluations, and to 1.461 by the end of the run.

### Culture across runs

```python
# culture/repertoire.py
export(run) = {claims, surviving strategies, findings, tools, step policy, world-model rows}
inherit(next_run): each item enters as one more randomized arm, and is kept only if it wins there
```

A Darwin or Huxley-Gödel machine changes the agent itself. SCiEL changes the **repertoire around the model**, so a
weaker model can inherit what a stronger run learned, and nothing inherited is trusted without a new trial.

## Local inference or an API

| Provider | Configuration | Used for |
| --- | --- | --- |
| Local vLLM (OpenAI-compatible) | `llm.api_base: http://127.0.0.1:8000/v1` | our runs: Qwen3.8-27B on 2× H100, data parallel, prefix caching |
| OpenRouter | `api_base: https://openrouter.ai/api/v1` | any hosted model, weighted ensembles |
| Anthropic API | `ANTHROPIC_API_KEY` | Claude models, the default of the zero-config start |
| Claude Code CLI | `provider: claude_code` | Claude on a subscription; pauses until a usage limit resets |
| Codex Responses | `provider: codex_responses` | OpenAI models through a Codex login |
| Mock | `configs/smoke_mock.yaml` | engine checks without a model |

A local model costs electricity rather than tokens, so a run can afford long full and confirm stages and many research
experiments. A transient provider failure pauses a parallel run and continues it; a lost request is never resent, and
its unknown charge stays in the record. Research tools need Docker and an immutable image; candidates run as native
subprocesses with resource limits, which bound resources but do not isolate files or network.

## Tasks

The **v0.19.0** task bundle contains **17 packages**: sixteen research tasks and one test fixture. Each defines its
candidate interface, evaluator, metrics and limits.

| Task | Search objective |
| --- | --- |
| [Circle packing](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/tree/main/tasks/oe/circle_packing) | Maximize the sum of radii of 26 non-overlapping circles in a unit square; a [stochastic seed variant](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/tree/main/tasks/oe/circle_packing_seed) too. |
| [Heilbronn triangle](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/tree/main/tasks/oe/heilbronn_triangle) | Place 11 points in a triangle to maximize the smallest triangle area. |
| [Autocorrelation and minimum overlap](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/tree/main/tasks/math) | Step functions bounding the first, second and both third autocorrelation constants and Erdős' minimum overlap, scored in exact rational arithmetic against the best verified values of October 2026; a variant of the absolute third constant starts from the best earlier construction. |
| [Discrete mathematics](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/tree/main/tasks/math) | Beat-the-average, difference bases, edges versus triangles, square-free subsets. |
| [Function minimization](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/tree/main/tasks/oe/function_minimization) · [hidden oracle](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/tree/main/tasks/oe/function_minimization_oracle) | A specified 2-D objective; an unknown function with 50 queries per instance in a container. |
| [Matrix multiplication tensor](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/tree/main/tasks/oe/matmul_tensor) | Tensor decompositions under rank and reconstruction checks. |
| [Toy quadratic](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/tree/main/tasks/test/toy_quadratic) | A fixture for engine and evaluator contracts. |

A normalized score's denominator may be a fixed reference rather than a record; read `task.yaml` and the evaluator
before comparing results.

## Configure a live experiment

Start from a [profile](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/tree/main/configs) and choose the task, provider and models, budget, storage, research features and
limits. `budget` counts successful evolutionary evaluations; seeding and failed attempts are counted separately.
Checkpoints bind task, source and execution identities, so changing the engine can require a fresh run.

| Optional dependency | Purpose |
| --- | --- |
| `tasks` | SciPy for the numerical tasks. |
| `tabular` | TabPFN for the world model's tabular stage. |
| `analysis` | Dataframes and process-memory telemetry. |
| `board` | A Weights & Biases sink. |
| `dev` | Tests, schema validation and builds. |

Research tools require `parallel_search`, `candidate_novelty`, `llm.max_retries: 1` and an immutable Docker image;
see [integration validation](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/blob/main/src/sciel/config_validation.py) and the
[research-tool configuration](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/blob/main/src/sciel/research_tools/config.py). Learned profiles need external weights
(`embed_grid_path`, `embed_axis_path` or `embed_niche_path`); missing ones stop startup.

## Inspect runs in Empira

[Empira](https://github.com/SCiEL-RSI-CPIL/empira-rsi-arena) is the research board and experiment workspace. It reads the same run
evidence: progress, lineages, source changes, research cells, tools, model calls and artifacts.

```sh
python -m arena --root /absolute/path/to/sciel-runs
```

## Releases

`pip install sciel` installs the latest release from [PyPI](https://pypi.org/project/sciel/). Each
[GitHub release](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/releases) also provides the wheel, the source distribution, a separate task bundle and
SHA-256 checksums.

```sh
python3 -m venv .venv
.venv/bin/python -m pip install 'sciel[tasks]'
tar -xzf sciel-<version>-tasks.tar.gz
.venv/bin/sciel tasks list --tasks-root ./sciel-<version>-tasks/tasks
```

## Development

```sh
.venv/bin/python -m pip install -e '.[tasks,dev,analysis]'
.venv/bin/python scripts/check_repository.py
.venv/bin/python -m build
git diff --check
```

Maintained files have a **500-line limit** (I'm old-school and can't read past 500 lines, and vibe-coded walls of code in one file are a pain to read), enforced by the repository check. Experiment outputs, model weights and
working notes live outside the source tree. See [CONTRIBUTING.md](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/blob/main/CONTRIBUTING.md) for implementation and
verification rules.

## License

SCiEL is released by Arina Kharlamova, Jikun Kang, Yusheng Zhao, Xue Liu, Bowei He and the MBZUAI CPIL Research
Group under the [MIT license](https://github.com/SCiEL-RSI-CPIL/sciel-rsi-framework/blob/main/LICENSE).
