NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Do We Still Need Reinforcement Learning When We Can Read the World Model?

Mingchao Zhang, Miduo Cui, Kangze He, Yuanjun Li, Dapeng Li, Ce Zhang, Chuanchen Luo, Xue Yan, Mingzhe Xing, Zhumin Chen, Hangyu Mao, Bin Zhang, Zhiwei XuarXiv 2026

TL;DR

Instead of teaching AI agents how to act through millions of steps of blind trial-and-error, what if an autonomous coding agent simply read the environment's source code and wrote a control script? This paper shows that LLM-based coding agents can inspect "readable world models" to directly synthesize executable, interpretable control policies—matching or beating state-of-the-art reinforcement learning (RL) with a fraction of the interaction data, and zero task-specific neural network training.

What Problem Does This Paper Address?

Reinforcement learning is a powerhouse for sequential decision-making, from robotics to multi-agent games. Yet, it has a notorious appetite for experience: online RL demands millions of trial-and-error interactions, while offline RL is bottlenecked by the quality of pre-collected datasets. Model-based RL softens the blow by learning a predictive "world model" to simulate outcomes, yet it still treats that model as a black-box simulator for planning or policy optimization.

Here is the catch: in programmable simulators, software-defined systems, and digital twins, the environment isn't a mystery—we literally have the source code. Traditional RL throws away this explicit blueprint and forces an agent to rediscover gravity and game rules from scratch. The authors ask a provocative question: If an agent can read the world model’s source code, do we still need task-specific RL training at all?

Figure 1: Comparison of conventional RL and policy synthesis from readable world models.

Methods

The authors explore PS-RWM (Policy Synthesis with Readable World Models). Rather than proposing a new neural optimization algorithm, they flip the paradigm from parameter learning to code reasoning.

An autonomous LLM-based coding agent (specifically, OpenAI's Codex powered by gpt-6-astra) is handed the environment’s source code—which explicitly defines state transitions and reward functions. Without human intervention, the agent writes an executable Python program to act as the policy:

  • Online Refinement: The agent runs its candidate script in the environment, inspects failure trajectories and rewards, diagnoses bugs in its own logic, and rewrites the code (capped at a strict budget of 1,600 attempted episodes).
  • Offline Refinement: Without touching the live environment, the agent inspects fixed trajectory datasets. It can compare its script’s actions against high-return demonstrations or even fit classical statistical ML models (like kernel ridge regression) inside its code.

Crucially, there is no cheating at test time. During evaluation, the synthesized Python script runs frozen—no LLM calls—and receives the exact same partial observations and action interfaces as standard RL baselines.

Figure 2: Overview of policy synthesis from readable world models. An autonomous coding agent constructs executable policies by reasoning over environment source code. The policies are iteratively refined using online feedback or offline data. The resulting policies are then independently evaluated and further analyzed under various settings.

Datasets

No new benchmarks were introduced; instead, the authors stress-tested PS-RWM across six established, diverse RL suites:

  • Online Multi-Agent: StarCraft Multi-Agent Challenge (SMAC) and Multi-Agent Particle Environments (MPE).
  • Online Single-Agent: MiniGrid (discrete navigation/memory) and Box2D (continuous physics control like LunarLander and BipedalWalker).
  • Offline Control & Instruction Following: D4RL (Maze2D, AntMaze, Kitchen, MuJoCo locomotion, Adroit manipulation) and BabyAI.

Key Insights and Ideas

  • Immunity to Sparse Rewards: Standard RL starves when intermediate reward shaping is stripped away. Because PS-RWM reads the terminal goal conditions directly from the code, removing dense rewards barely fazes it.
  • Emergent, Glass-Box Strategies: Unlike opaque neural weights, you can read PS-RWM's strategies. In StarCraft, the agent independently coded "kiting" (retreating while weapons recharge) and "focus fire" (shared target-ranking heuristics). In Maze2D, it wrote a velocity-braking controller to counteract momentum inside goal zones.
  • Structural Inference Over Exploration: Reading the code changes how policies think. In MiniGrid's FourRooms, knowing from the source code that every wall has exactly one gap allowed the synthesized policy to mathematically infer unseen walls rather than wasting steps exploring frontiers.
  • Zero-Shot Policy Patching: When observation sizes or map rules change, neural RL policies often crash or require retraining. Coding agents can read the updated environment diff and patch their policy logic in a single, interaction-free revision.

Key Results

PS-RWM matches or outperforms established model-free (PPO, DQN, QMIX, MAPPO) and model-based (DreamerV3, MBVD, SeqWM) baselines while slashing sample complexity:

  • Online Dominance & Sample Efficiency: PS-RWM beat model-free baselines in 15 of 16 online scenarios. On MiniGrid DoorKey, it hit the 80% success target in 1,789 steps compared to DreamerV3's 400,000 steps—a >200x reduction in interactions. Under sparse rewards on SMAC corridor, QMIX scored 0%, while PS-RWM achieved a 100% win rate.
  • Zero-Data Synthesis: On offline BabyAI, PS-RWM achieved a 99.28% average success rate (vs. 65.33% for Decision Transformer), and remarkably hit 100% across all six tasks with zero demonstrations ($M=0$) purely by reading the environment mechanics.
  • Offline Control Split: On D4RL, PS-RWM crushed baselines on Maze2D (176.9 average normalized score vs. CQL’s 62.0) and Kitchen (90.2 vs. IQL’s 54.4). Even with just 1% of the halfcheetah dataset, it built a Matérn kernel ridge regression controller scoring 41.0. However, it lagged behind neural offline RL on high-dimensional continuous tasks like MuJoCo locomotion (59.9 vs. CQL's 80.6) and Adroit robotic hand manipulation (17.4 vs. BC's 34.8).
Figure 3: Performance comparison between PS-RWM and RL baselines across 16 online tasks. Solid curves show RL performance, with shading indicating standard deviation across three runs. Box2D curves report training returns.

Limitations and Future Work

The authors are candid that RL isn't ready for retirement just yet:

  • High-Dimensional Continuous Control: Hand-crafted rules and classical ML struggle with agile, high-degree-of-freedom motor control (like MuJoCo locomotion or dexterous Adroit hands), where gradient-based neural optimization still shines.
  • Model Mismatch & Reality Gaps: PS-RWM assumes an accessible, accurate codebase. If a digital twin’s physics diverge from reality, hardcoded thresholds may prove brittle.
  • Compute Trade-offs: While environment steps plummet, autonomous LLM reasoning incurs substantial token and compute costs during development.

Looking ahead, the authors suggest extending direct policy synthesis to incomplete or noisy world models, and exploring hybrid paradigms—using code synthesis to bootstrap strong, interpretable initial policies that conventional RL can then fine-tune.

Summary updated

BibTeX
@misc{zhang2026do,
  author = {Mingchao Zhang and Miduo Cui and Kangze He and Yuanjun Li and Dapeng Li and Ce Zhang and Chuanchen Luo and Xue Yan and Mingzhe Xing and Zhumin Chen and Hangyu Mao and Bin Zhang and Zhiwei Xu},
  title = {{Do We Still Need Reinforcement Learning When We Can Read the World Model?}},
  year = {2026},
  eprint = {2611.34656},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.34656},
}
Figure