Code World Model: Coding Agent as World Brain
Reading guide · Based on sections of the original paper
Why read this
Practitioners building controllable video world models or game-generation agents can use it as a design rationale and training recipe for frame-wise spatial conditioning, but it offers no benchmarked evidence.
What the authors found
- After rank-128 LoRA fine-tuning of MiniMax-H3 Ref2VA on about 5.6 hours of gameplay (9,420 five-second clips), the authors report that generations closely follow the proxy's entity positions, motion, layout and camera paths. This evidence is qualitative only and uses proxies from simple agent-built worlds plus a GPT Image 2 first-frame anchor. The comparisons against action- or camera-conditioned models are demos on the project page, which were not supplied, and they ignore latency. 4.2 Visual Quality Results
- The motivation for the proxy is the authors' own unquantified experiments with a large-scale video world model, LingBot-World 2.0. They report that structured text conditioning, even with a camera pathway, did not give precise control. 3.2 World-State Conditioning for the Video Model
- In the prototype, the coding agent (GPT-5.6 Sol) did not build worlds from scratch. It extended supplied game-engine code and existing scenes as templates. Coding-agent inference.
Main limitation
The authors say compute limited training scale and output quality, and the system has no autoregressive real-time generation. They also state that coding agents cannot reliably build complex mechanisms from scratch, so no complete open world is demonstrated. 5 Limitations and Conclusions
Where to start
Video-model inference. · Check the exact inference conditioning (image anchor, 34-frame overlap windowing) behind the qualitative results before trusting the control claims.
Abstract
World models aim to simulate how complex environments evolve under actions and events, yet existing video-based world models primarily learn dynamics from visual observations, which reveal outcomes rather than the underlying knowledge, rules, and mechanisms governing world evolution. This makes it difficult to maintain persistent consequences and support coherent, open-ended evolution. We introduce Code World Model, a framework that separates world evolution from visual realization by combining the reasoning and coding capabilities of language models with the generative priors of video models. A coding agent serves as the world brain, reasoning about events and their consequences and generating executable code to maintain persistent world state and perform rule-consistent evolution. To connect executable state with visual generation, we introduce a proxy representation that encodes frame-wise spatiotemporal constraints and is compiled into a proxy video, which conditions a video model to render high-fidelity visual observations. We further develop data pipelines for constructing aligned proxy-observation pairs from gameplay and real-world videos. After fine-tuning on paired gameplay data, MiniMax-H3 follows proxy-based spatiotemporal specifications from simple interactive worlds built by the coding agent while preserving rich visual details and dynamics. These results demonstrate the potential of combining code for persistent world evolution with video models for flexible visual realization, providing a new path toward open-ended world models.