代码世界模型:编码代理作为世界大脑
观点分析 · 2026/08/27
世界模型旨在模拟复杂环境在行动和事件下的演变,但现有的基于视频的世界模型主要从视觉观察中学习动态,这揭示的是结果而非支配世界演变的潜在知识、规则和机制。这使得维持持久后果和支持连贯、开放式演变变得困难。我们引入了代码世界模型,一种将世界演变与视觉实现分离的框架,结合了语言模型的推理和编码能力与视频模型的生成先验。编码代理充当世界大脑,推理事件及其后果,并生成可执行代码以维持持久世界状态并进行规则一致的演变。为了将可执行状态与视觉生成连接起来,我们引入了一种代理表示,它编码逐帧时空约束并编译成代理视频,该视频条件化视频模型以渲染高保真视觉观察。我们进一步开发了从游戏和现实世界视频中构建对齐的代理-观察对的数据管道。在配对游戏数据上微调后,MiniMax-H3 遵循编码代理构建的简单交互世界中的基于代理的时空规范,同时保留丰富的视觉细节和动态。这些结果展示了将代码用于持久世界演变与视频模型用于灵活视觉实现相结合的潜力,为开放式世界模型提供了新路径。
该论文提出了一种新颖的世界模型框架,通过将代码生成与视频生成结合,解决了现有视频世界模型在持久性和开放式演变方面的局限,为通用智能体的发展提供了新思路,具有重要的理论价值和实践意义。
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.