cs.AIOct 2, 2026

NeutronGym: Physics-Graded Neutron Instrument Design for LLM Agents

Authors: Lijie Ding, Changwoo Do

Organizations: Neutron Scattering Division, Oak Ridge National Laboratory, Oak Ridge, TN 37831, USA

Abstract

Designing a scientific instrument tests whether language-model agents can do physics rather than recall it, provided the grading cannot be argued with. We introduce NeutronGym, to our knowledge the first executable environment for neutron instrument design: agents build instruments through validating tools, McStas ray-traces what they build, and a level-resolved ladder grades syntax, runtime, structure and science with no LLM judge. Procedural families supply unlimited instances of a fixed layout whose design parameters the agent must set, with held-out parameter regimes; a curated slice, McStasBench, adds 16 tasks from published instruments behind memorization probes and a sandbox. Seven models reproduce at most 7 of the 16, none retrieves a reference, and none meets an improvement target. The environment also trains. Reinforcement learning on its reward takes Qwen3-8B from 11% to 77% of held-out instances of a family whose targets come from a hidden design (69% at a second seed), past an untrained Qwen3-32B, and the recipe holds, at one seed each, on three further gated families. The analysis says what that gain is. Without the ladder's partial credit it collapses by 60 points. From reward alone the trained model reaches what a classical optimizer reaches, at the agent's simulation budget, only when handed the closed-form physics (77% against 81%, a gap that does not separate at this size), while frontier models still solve 98-99%. Getting a trustworthy result meant failing four task designs that no-model baselines could solve, and we release the probes that found them.

Figures & tables

Appendix figures & tables10 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Compositional Machine Design as Program Synthesis with LLMs

    Oct 16, 2025Wenqian Zhang, Yangyi Huang, Weiyang Liu +1LLM-Based Program SynthesisProgram Synthesis

  2. Agent^2 RL-Bench: Can LLM Agents Engineer Agentic RL Post-Training?

    Apr 12, 2026Wanyi Chen, Xiao Yang, Xu Yang +7Agentic RLAI Agent Benchmarks

  3. DiscoverPhysics: Benchmarking LLMs for Out-of-the-Box Scientific Thinking

    May 25, 2026Matt L. Wiemann, Lindsay M. Smith, Peter Melchior +4Physical ReasoningScientific Discovery