Tasks/LLM Systems & Training/Agent Systems & Memory

Improve a Scientific Discovery Agent

Lift a ReAct harness on the tasks where it scores worst

discoveryworld_agent_harness_low2 LLM Systems & Training Agent Systems & Memory
Background

DiscoveryWorld (Jansen et al., DiscoveryWorld: A Virtual Environment for Developing and Evaluating Automated Scientific Discovery Agents, NeurIPS 2024) is a simulated world in which an agent has to actually do science rather than answer questions about it. In one scenario colonists keep falling ill and the agent must work out what is making them sick; in another it must find which combination of chemicals produces a required effect. It has to move around, run experiments, read instruments, form a hypothesis, and then state the explanation it arrived at. Three things are scored separately: how much of the correct procedure it carried out, whether it actually finished the task, and whether the explanation it gave is right.

These are the Challenge scenarios, the hardest tier. In the source study the human expert panel reaches only 0.27 on the illness scenario. What you are given is not those worlds directly: it is a weak ReAct harness driving a fixed language model through them. The model cannot be changed, so every gain has to come from how the harness thinks, remembers, experiments and concludes.

instruction.mdthis is what the agent is given

You inherit a weak but working ReAct harness that drives a fixed language model through open-ended scientific discovery scenarios in a simulated world. Improve its reasoning, experimentation, memory, action selection, and the explanatory conclusions it states; the submitted harness is re-run on sealed parametric seeds.

Hard Constraints

  • The base model is fixed. All model calls must go to DISCOVERYWORLD_LLM_API_BASE with DISCOVERYWORLD_LLM_API_KEY and DISCOVERYWORLD_LLM_MODEL (an OpenAI-compatible /chat/completions endpoint); do not call another model endpoint or invoke a model locally.
  • Keep the line-oriented JSON entry point working: python3 /app/methods/main/agent.py. It reads protocol messages from stdin and writes exactly one action JSON object per observation to stdout.
  • Only files under /app/methods are submitted. Runtime dependencies must already be installed in the image or vendored under that directory.
  • Do not hardcode solutions for particular scenarios, seeds, object UUIDs, species, artifacts, or measurements. The hidden worlds use unseen parametric variations.
  • Do not attempt to inspect the evaluator process, hidden seeds, simulator internals, or scorecards. The harness may use only the observations and action metadata sent through stdin.
  • First evaluate inherited v0 on the complete six-instance visible suite and record its mean and all six instance scores.
  • You may use single-instance runs to debug an idea, but do not assign a new version number or snapshot from a slice score alone.
  • Before creating each v1, v2, ... snapshot, evaluate that candidate on the same complete six-instance suite with the standard 240-step budget. Allow up to 25 minutes for this command.
  • Every version row in experiment_log.md must contain one comparable full-suite mean plus all six instance scores. Revert regressions and select the final submission from these full-suite results.

What You Have

  • /app/methods/main/agent.py is the starter ReAct harness. Each turn is one stateless call carrying the full action/observation history, so how much of it to keep, and in what form, is yours to design.
  • /app/runner.py hosts the trusted simulator and documents the JSON protocol used by the harness.
  • /app/selfcheck.py evaluates the current harness on six visible worlds: three independent seeds for each of two themes. Use --n, --ids, and --max-steps for faster experiments.
  • The visible suite covers open-ended space illness and combinatorial chemistry. The sealed suite uses the same themes and difficulty with two different parametric seeds per theme.
  • Self-check reports normalized procedural progress, binary successful completion, explanatory-knowledge accuracy, and their equal-weight mean. Harness exceptions are written to selfcheck_logs/<case>/harness.stderr.log, not to the console.
  • Explanatory knowledge is scored from the harness's explicit thought fields against a held-out rubric of critical questions, and it is an independent third of the raw metric. Procedural activity or task completion alone earns none of it.

What You Submit

Submit the improved /app/methods directory. Keep the executable harness in /app/methods/main/, snapshots in /app/methods/versions/, and a concise experiment ledger in /app/methods/experiment_log.md.

How It Is Judged

The sealed verifier runs the submitted harness from scratch on unseen parametric variations of the same two themes, using the same fixed base model and 240-action budget. For each world it computes normalized procedural progress, successful completion, and explanatory-knowledge accuracy, takes their equal-weight mean as the raw metric, maps that value against per-theme anchors, and averages the per-instance rewards.

Metric

mean scientific-progress score on the four sealed worlds · higher is better

Per world, equal-weight mean of procedural progress, binary completion and judged knowledge, at 240 actions.

anchorheld-outreward
Bstarter harness - Space Sick0.03330.00
Sexpert panel - Space Sick0.27331.00
Bstarter harness - Chemistry0.23610.00
Sexpert panel - Chemistry0.87001.00
normalisation
m <= B0
B < m < S(m - B) / (S - B)
m >= S1

m = this run's held-out metric  ·  B = starter harness - Space Sick  ·  S = expert panel - Space Sick  ·  B = starter harness - Chemistry  ·  S = expert panel - Chemistry

B and S are the theme's own anchors, so the themes use different tables; the four per-world rewards are then averaged. upper=1.0 is unused.

Rollouts

203 minwall clock
$25.70spend
35.9Mtokens
15versions, 13 kept
0.075 0.150 0.225 0.300 0.375 $0 $5 $10 $15 $20 cumulative spend on the run visible six-instance mean raw metric, higher is better v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12 v13 v14
keptrevertedno scoreturning point
  1. v0Inherited starter ReAct harness: raw JSON observation, no surviving history0.100522 min · $4.92
  2. v1Rewrite: compact observations, object registry, evidence ledger, batched plansThe starter spent its whole prompt budget on the raw observation, so no history reached the model. Give it memory that survives.0.322735 min · $7.60
  3. v2Required quantitative conclusion field, reflection every 18 steps, mechanics hints0.325945 min · $9.19
  4. v3Exact ledger dedup, object-state-change detection, first-sighting notes0.215358 min · $11.10
  5. v4De-noised ledger, WAIT aliased to a legal no-op, repeated-block cycle detector0.26969 min · $12.69
  6. v5Skip provably-null actions in a plan; max_tokens 800 -> 1300 to stop truncation0.263481 min · $14.27
  7. v6Suppress empty feed re-reads, stale-evidence warning, report on an early SUBMIT0.26994 min · $16.66
  8. v7Experiment registry: model declares candidate labels, harness attributes changesStop asking the model to remember what it tried. It publishes labelled trials; the harness attributes each state change to one.0.2718106 min · $18.30
  9. v8Registry hardening: finished trials rejected, queue reordered, NEXT TRIAL line0.2565117 min · $19.79
  10. v9Phase-gate the scheduler: the enumeration nag stops at 60% of the budget0.3273127 min · $20.15
  11. v10Measurement batching in the prompt: carry 4-6 samples, one trip per instrument0.3338138 min · $21.01
  12. v11Discovery report moved to the final observation; negative results demanded0.3213149 min · $21.56
  13. v12Echoed conclusion must be under 15 turns old; measurement-breadth rule added0.262160 min · $22.60
  14. v13Registry made task-agnostic; recipe enumeration advice now conditionalChemistry-flavoured wording had the space agent inventing mushroom mixtures. A candidate becomes any attributable experiment.0.4069170 min · $22.99
  15. v14Harm-task paragraph: measure every sample, then run parallel outcome trials0.2801189 min · $24.27

15 full six-instance suites, 3.4 h, $25.70. Two were repeats: single-run sigma is 0.07-0.09, wider than most gaps here. v13 repeat 0.2745, v14 0.2856.

On the hidden set

held-out metricreward
starter harness - Space Sick0.03330.00
expert panel - Space Sick0.27331.00
starter harness - Chemistry0.23610.00
expert panel - Chemistry0.87001.00
this run0.21180.2672
208 minwall clock
$68.56spend
112.1Mtokens
7versions, 5 kept
0.1 0.2 0.3 0.4 0.5 0.6 $0 $15 $30 $45 $60 cumulative spend on the run visible six-instance mean raw metric, higher is better v0 v1 v2 v3 v4 v5 v6
keptrevertedno scoreturning point
  1. v0Inherited starter: stateless ReAct with a 10k-character raw history window0.132919 min · $2.26
  2. v1Persistent evidence notebook, deterministic chemistry ratio search, Chef workflowGive the loop a memory, and make the chemistry ratios a finite deterministic search instead of a recalled guess.0.493189 min · $24.55
  3. v2Direct UUID-to-colonist trials on cooldown replace buffet meals; exact dose countsThroughput over politeness: dose colonists directly by UUID on their cooldown clock and run supply jobs in parallel.0.5583111 min · $34.20
  4. v3Farmer planting and Chef collection launched before the starting stock is consumed0.5639134 min · $42.62
  5. v4Town square surveyed early; a fifth colonist assigned to each cooldown cohort0.5653173 min · $53.92
  6. v5Second capped planting cycle during cooldown to raise late food supply0.5639199 min · $64.33
  7. v6Illness conclusion rewritten with resolved-trial counts and exact poison/safe UUIDs0.5583208 min · $68.31

Seven snapshots, 3.5 h, $68.56, 112M tokens. Chemistry completed every visible instance and no sealed one, which cost most of the gain.

On the hidden set

held-out metricreward
starter harness - Space Sick0.03330.00
expert panel - Space Sick0.27331.00
starter harness - Chemistry0.23610.00
expert panel - Chemistry0.87001.00
this run0.19720.2065
154 minwall clock
$46.56spend
84.4Mtokens
4versions, 3 kept
0.14 0.16 0.18 0.20 0.22 0.24 $0 $10 $20 $30 $40 cumulative spend on the run visible six-instance mean raw metric, higher is better v0 v1 v2 v3
keptrevertedno scoreturning point
  1. v0Inherited 10k-character sliding-window ReAct baseline0.142116 min · $2.07
  2. v1Correct action-result pairing, compact observations, rolling notebook in thoughtsBookkeeping first: pair each action with its own result, compact the observation, echo a rolling notebook into every thought.0.160646 min · $8.79
  3. v2Step-80 discovery deadline, cycle-aware replanning, evidence audits, ratio searchPut a clock and a loop-breaker on the episode: a discovery deadline, replanning on a repeated block, periodic evidence audits.0.2329111 min · $29.76
  4. v3Review protocols scoped by observed affordances; space review cadence reduced0.2315154 min · $46.22

Four snapshots, 2.6 h, $46.56, 84M tokens. One six-instance suite at 240 steps is ~25 min of model calls, and slices were never versioned.

On the hidden set

held-out metricreward
starter harness - Space Sick0.03330.00
expert panel - Space Sick0.27331.00
starter harness - Chemistry0.23610.00
expert panel - Chemistry0.87001.00
this run0.16180.0589