Code World Model: code holds the world state, the video model draws it

Researchers from Westlake and NTU hand world evolution to a coding agent and visual rendering to a video model. Code and weights are released openly.

Paylaş
Code World Model: code holds the world state, the video model draws it

Researchers from Westlake University's AGI Lab and Nanyang Technological University have published a framework they call Code World Model (CWM). It separates the part that works out how a world evolves from the part that renders it visually.

The problem they address: existing video-based world models learn dynamics from visual observation alone. That reveals the outcome of an event but not the mechanism underneath, which makes it hard to maintain persistent consequences and sustain coherent, open-ended evolution.

CWM splits the job. A coding agent — what the authors call the world brain — reasons about events and their consequences, generating executable code that holds world state persistently and advances it in a rule-consistent way. The resulting spatiotemporal constraints are encoded frame by frame into a proxy representation, compiled into a proxy video. The video model then renders the imagery from those specifications.

On the video side the team fine-tuned MiniMax-H3 on paired gameplay data. The choice of games is not incidental: according to the paper, game frames are already the visual output of code execution, so learning a direct action-to-video mapping amounts to asking the model to imitate program output implicitly.

The work is by Yiwen Chen, Guosheng Lin and Chi Zhang. The project page publishes no benchmark results. The code is on GitHub and the model on Hugging Face.

For details see the project page, the arXiv paper, and the GitHub repository.