{"data":{"kind":"file","path":"README.md","version_id":"n984ma3xyaj4ryhgxk6pg18p","entry":{"name":"README.md","path":"README.md","is_directory":false,"size":3200,"modified_at":"2026-08-18T06:15:23.249000","content_hash":"bacd55b888a85aaae7b76e95f61d82f5333ca050dd1456039105ab0c3aa60212"},"entries":[],"content":"# The Scientist 🔬\n\n> Can outcome-based RL teach a small language model the scientific method?\n\nThe model enters a tiny simulated universe whose governing law is hidden. It receives a laboratory, a strict experiment budget, and one job: identify the law.\n\n```text\nHidden from the model: y = 2*x1 + x2**2\n\nEXPERIMENT x1=1 x2=0  -> y=2\nEXPERIMENT x1=2 x2=0  -> y=4\nEXPERIMENT x1=0 x2=2  -> y=4\n...\nFINAL {\"family\":\"polynomial\",\"equation\":\"2*x1 + x2**2\",\"confidence\":0.96}\n```\n\nThe interesting part is not curve fitting. With at most six experiments, the agent must choose measurements that separate its remaining hypotheses, revise its beliefs, and only then propose a law.\n\n## The loop\n\n```text\nhypothesize -> design experiment -> observe -> revise belief -> repeat -> propose law\n```\n\nEvery episode is procedurally generated and automatically scored against hidden probes and the true structure. The primary training run rewards only the final answer; experiment quality is measured, not hand-rewarded. If better scientific behavior emerges, it has to earn its keep through better outcomes.\n\n## Curriculum\n\n1. Linear relationships\n2. Polynomial relationships\n3. Interaction terms\n4. Hidden variables\n5. Noisy measurements\n6. Competing hypotheses\n7. Observation versus intervention\n\n## PrimeRL shape\n\nThe environment maps naturally to PrimeRL's environment model: a generated task supplies a hidden universe, a stateful lab tool manages the per-rollout query budget, and an exact rubric scores the final trace. The MVP should use Verifiers' stateful environment interface; the simulator and verifier remain framework-independent so a Verifiers v1 taskset/custom environment adapter can follow without changing the science.\n\n## Research documents\n\n- [Idea](./IDEA.md) — task definition, curriculum, and boundaries\n- [Steps](./STEPS.md) — implementation and experiment roadmap\n- [Method](./METHOD.md) — environment, reward, baselines, and evaluation design\n- [Verification](./VERIFICATION.md) — correctness and anti-leakage gates\n- [Hypotheses](./HYPOTHESES.md) — falsifiable claims and rejection criteria\n\n## Quickstart\n\n```bash\ncd prime-rl/the-scientist\nuv sync --group dev\nuv run pytest\nuv run python -c 'from the_scientist import load_environment; print(load_environment(level=1))'\n```\n\nRun an evaluation after configuring a model provider:\n\n```bash\nprime eval run the-scientist -n 10 -r 3\n```\n\nEnvironment arguments include `level`, `num_train`, `num_eval`, `seed`, `budget`, `domain_min`, and `domain_max`.\n\n## Status\n\n**MVP implemented.** Deterministic Levels 1–3, six experiments, safe equation parsing, hidden-probe scoring, and diagnostic metrics are ready for smoke evaluation. Levels 4–7 remain research milestones.\n\n## References\n\n- [Prime Intellect: The Environment Model](https://docs.primeintellect.ai/hosted-training/environment-model)\n- [Prime Intellect: Create an Environment](https://docs.primeintellect.ai/tutorials-environments/create)\n- [Verifiers v1: Tasksets](https://docs.primeintellect.ai/verifiers/v1/tasksets)\n- [PrimeRL: Training](https://docs.primeintellect.ai/prime-rl/training)\n- [PrimeRL: Algorithms](https://docs.primeintellect.ai/prime-rl/algorithms)\n","encoding":"utf-8","truncated":false,"total_bytes":3200},"status":null}