disco

A discovery engine, not a knowledge base.

An LLM agent invents its own questions, commits a prediction before it runs the experiment, and keeps a fact only when a runnable check confirms it — and keeps keeping it only while reality still does. Nothing is taught. Everything is earned.

View on GitHub What it's discovered Discovery as training data

the one house rule

A curious kid, locked in a room

Imagine a kid alone with a computer — no books, no teacher. They poke at things, under one rule: before every poke, write down what you think will happen. When the computer does something else, that's the fun part — poke there again until it makes sense. A thing goes up on the wall only with a test anyone can re-run to prove it, and only after checking twice. Useful gadgets go in a toolbox for tomorrow. Slowly the walls fill with proven facts and the toolbox with instruments — none of it taught, all of it earned.

disco is that room. The kid is an LLM; the pokes are Python experiments; the wall is the claims archive; the toolbox is the tools archive. Swap the room for a different world — a codebase, a database, a simulated universe — and the same kid starts filling different walls.

the fast loop

Predict → run → be surprised → compress

Every discovery thread runs the same four-stroke engine. Curiosity is anchored: the surprise score compares reality against a prediction committed before execution, judged in a fresh context that never saw the reasoning.

PREDICTcommit outcome + confidence (+ optional assertions)
RUNexecute in a subprocess — the only oracle
SURPRISEreality vs. prediction, scored 0–10
COMPRESSclaim + runnable check, or park the mystery

↺ dig while surprise shrinks — flat surprise is noise, and gets abandoned

frozen rules — the mechanism

The kernel knows nothing, and guards everything

The kernel contains zero domain knowledge. It bakes in exactly one meta-method and makes honest discovery the only winning move.

No claim without a check

A fact enters the archive only if its check.py exits 0. Unverifiable insight is worthless here.

No claim without replication

Backed by fewer than two experiments? Refused. One result is an anecdote.

Selection, not debate

A claim whose check fails reality twice is culled — demoted to an open question. The archive is a population; reality is its environment.

Laws compress the archive

A claim can subsume the instances it generalizes. Understanding is measured by the index getting smaller.

Tools are inherited

Instruments the agent writes are importable in every later experiment — reuse is executable, not citation.

Self-evolving methodology

The agent's own strategy evolves by champion/challenger selection. It writes its rules of conduct; reality decides which rulebook survives.

discovered so far

None of it taught — and it re-proves itself on your machine

sim-life · Conway's Life on toruses

It built its own physics, then found gliders twice

A bit-parallel engine, ~20 instruments on top, and dozens of verified claims: complete functional graphs of the 4×4 (65,536 states) and 4×5 (1,048,576 states) universes; the still-life maximum ⌊WH/2⌋ proven by dynamic programming; the glider as a true spaceship iff min(W,H) ≥ 5 — found first as anomalous drift in soup debris, then characterized exactly.

gen-42 · a universe with no literature

A law discovered with zero pretraining support

In a cellular automaton whose rule was rolled at random — nothing about it exists in any corpus — the agent found that damage propagation is direction-asymmetric: a 1→0 flip spreads unbounded, a 0→1 flip stays frozen forever. It arrived through a surprise arc of 8 → 3 → 8 → 10 → 0.

eca · the 256 elementary rules

Textbook theorems, rediscovered experimentally

Rules 90 and 150 as GF(2) circulant maps with exact singularity laws; exactly 6 of 256 rules bijective, exactly 16 affine — censused and machine-checked from scratch.

multi-agent · one shared archive

Division of labor, with no coordinator

Two agents sharing an archive split the territory between themselves (focus overlap 0.246, well below chance) — one of them discovering and claiming a bug in the archive's own instruments. Across the corpus, stated confidence anti-correlates with surprise at r ≈ −0.54: the agent knows when it doesn't know.

Every claim ships with a check.py. Clone the repo and run python3 disco.py -w sim-life verify to watch reality re-confirm all of it — including the million-state census — from scratch.

worlds as RL environments

Discovery you can train on

disco natively produces every ingredient a modern compact-agent SFT+RL pipeline wants.

Wrap the loop in procedurally-generated worlds — rules rolled at random, so their truths exist in no pretraining corpus — and disco becomes a self-supplying training environment. Web text holds humanity's conclusions; these trajectories hold the revision process — belief, falsification, correction, verification — with every label anchored in code that actually ran.

coevolveworlds at the frontier
run / rolloutdiscovery sessions
exportreward-labeled JSONL
your trainerSFT / GRPO

Every episode carries execution-anchored outcome rewards (gate + verify, not opinion), per-step process rewards, curation filters, calibration pairs, agent and GRPO group ids, and a loss_mask aligned to the transcript — a turnkey SFT target. The clean eval writes itself: train on some generated worlds, test on held-out ones. Transfer means the model learned to discover, not to recall.

quickstart

Stdlib only. Any local model, or claude -p.

# run against a local OpenAI-compatible endpoint (LM Studio) or claude -p
python3 disco.py run -n 5           # five discovery threads
python3 disco.py status            # the archive + recent ledger
python3 disco.py verify            # reality re-checks every claim, culls what rots

python3 disco.py genworld 7 --family vm   # contamination-free world: ca vm dfa curve percolation collatz modpoly tag
python3 disco.py coevolve          # keep a world population at the competence frontier
python3 disco.py rollout -g 8       # GRPO group sampling from one frozen context
python3 disco.py export            # threads → training episodes (JSONL)

Requires Python 3.10+ and no third-party dependencies. Experiments run model-written code on your machine — run inside a VM or container if that matters to you.