Web World Models
Jichen Feng, Yifan Zhang, Chenggong Zhang, Yifu Lu, Shilong Liu, Mengdi Wang
TL;DR
The paper presents Web World Models (WWMs) as a practical middle ground between fixed-context web applications and fully generative environments. WWMs split world state into a deterministic physics layer $S^{\phi}$ and a stochastic imagination layer $S^{\psi}$, enabling logical consistency while allowing unlimited, on-demand content via large language models within typed JSON interfaces. A Just-In-Time, hash-based generation strategy provides object permanence without storage, and a fidelity-degradation mechanism ensures robust operation under latency or availability constraints. Across diverse demos—from Infinite Travel Atlas and Galaxy Travel Atlas to AI Spire, AI Alchemy, Cosmic Voyager, WWMPedia, and Bookshelf—the approach demonstrates broad generality and concrete engineering principles: separating concerns, using typed interfaces, deterministic generation, and graceful degradation. The work argues that standard web stacks can subsist as scalable substrates for persistent, open-ended environments, offering controllability and testability alongside imaginative richness and real-world grounding.
Abstract
Language agents increasingly require persistent worlds in which they can act, remember, and learn. Existing approaches sit at two extremes: conventional web frameworks provide reliable but fixed contexts backed by databases, while fully generative world models aim for unlimited environments at the expense of controllability and practical engineering. In this work, we introduce the Web World Model (WWM), a middle ground where world state and ``physics'' are implemented in ordinary web code to ensure logical consistency, while large language models generate context, narratives, and high-level decisions on top of this structured latent state. We build a suite of WWMs on a realistic web stack, including an infinite travel atlas grounded in real geography, fictional galaxy explorers, web-scale encyclopedic and narrative worlds, and simulation- and game-like environments. Across these systems, we identify practical design principles for WWMs: separating code-defined rules from model-driven imagination, representing latent state as typed web interfaces, and utilizing deterministic generation to achieve unlimited but structured exploration. Our results suggest that web stacks themselves can serve as a scalable substrate for world models, enabling controllable yet open-ended environments. Project Page: https://github.com/Princeton-AI2-Lab/Web-World-Models.
