Source-linked AI summary

Web World Models

Jichen Feng, Yifan Zhang, Chenggong Zhang, Yifu Lu, Shilong Liu, Mengdi Wang

arXiv:2512.23676v1cs.AIcs.CLcs.CV

TL;DR

Language agents need persistent environments, but conventional web frameworks constrain worlds to anticipated schemas while fully generative models are difficult to control and scale. Web World Models put state and rules in web code and use language models to generate context and narratives. The paper presents a suite of applications and design principles as evidence that web stacks can serve as a practical substrate for open-ended exploration.

  • Problem

    Conventional web frameworks offer reliable but schema-bounded contexts, while fully generative world models are difficult to control, debug, and scale.

    Source: §1 · p. 2
  • Method

    Web World Models define state and rules in ordinary web code and use language models to generate context and narratives on structured latent state.

    Source: §1 · p. 2
  • Results

    The application suite supports the paper’s conclusion that standard web protocols, typed latent interfaces, and procedural generation can provide a substrate for persistent, open-ended exploration.

    Source: §5 · p. 18
  • Takeaways & Limitations

    The paper presents web stacks as a practical middle ground for environments where language agents can act with structural certainty.

    Source: §5 · p. 18

    Cosmic Voyager’s live Gemini narration requires a GEMINI API KEY and otherwise falls back to bundled descriptions; planetary scales are intentionally compressed for usability.

    Source: §3.5 · p. 14

Abstract

from arXiv · show

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.

1 Introduction

The introduction identifies a gap between reliable but schema-bounded web applications and open-ended yet difficult-to-control generative worlds. It presents Web World Models as a code-structured, LLM-expanded middle ground, illustrated by diverse applications and practical design principles.

1 Introduction

  • WWMs address the gap between fixed-context web applications and fully generative worlds, which respectively limit context or pose control, debugging, scaling, and structural challenges.Conventional frameworks offer reliability and tooling but bound worlds to anticipated schemas; fully generative approaches aim for unlimited context and arbitrary environments.Source: §1 · p. 2
  • WWMs define world state and rules in ordinary web code, while language models generate context, narratives, and task-specific reasoning on that structured state.Code specifies entities, interactions, and possible actions; the approach positions web stacks as a programmable substrate for open-ended worlds.Source: §1 · pp. 2–3
  • The proposed design principles separate rules from imagination, use typed interfaces, constrain deterministic expansion to fixed schemas, and support graceful degradation.Procedural generators and templates keep worlds usable when model calls are slow or unavailable.Source: §1 · p. 3
  • The implemented suite spans real-world atlases, fictional galaxies, web-scale encyclopedias, interactive narratives, simulations, and games.Examples include an atlas that expands coordinates into places, routes, and stories, and simulation- and game-like environments with deterministic core transitions.Source: §1 · pp. 2–3

2 Design Principles of Web World Models

WWMs combine deterministic code-defined rules with model-generated content to balance logical consistency with semantic flexibility. The design principles cover typed state, deterministic expansion, graceful degradation, and a web stack for implementation.

2 Design Principles of Web World Models

  • The hybrid WWM addresses the tension between purely generative environments prone to inconsistency and hard-coded environments with limited semantic flexibility.The paper presents code and probabilistic generation as a practical synergy for scalable deployment.Source: §2 · p. 3

2.1 Separation of Concerns: Physics vs. Imagination

  • Code maintains invariant state and computes logical outcomes before the model generates perceptual content conditioned on the updated symbolic state.The code layer enforces constraints such as preventing transit through locked doors; the model generates descriptions, dialogue, and aesthetic style.Source: §2.1 · pp. 3–4

2.2 Typed Interfaces as the Common Language

  • Typed interfaces replace opaque latent vectors with strict schemas, and the LLM returns valid JSON that remains structurally compatible with engine logic.Required fields, such as an item's weight and cost, make imagined content debuggable and filter structural hallucinations.Source: §2.2 · p. 4

2.3 Infinite Worlds via Deterministic Hashing

  • Hashing a location supplies a fixed seed for just-in-time generation, so revisiting it yields the same world state without database storage.The figure describes visits converging on coordinates before the hash produces a frozen seed.Source: §2.3 · pp. 4–5, Figure 4 · p. 5

2.4 Graceful Degradation

  • A fidelity slider falls back from real-time bespoke generation to cached content and then deterministic templates under resource constraints.Because code governs physics, the application remains functional when the imagination layer is unavailable, though it may lose semantic richness.Source: §2.4 · p. 5

2.5 The Technical Stack

  • The proposed web stack pairs TypeScript type safety with HTTP streaming for real-time text delivery and serverless architecture for scaling procedural worlds.The passage presents this stack as avoiding persistent infrastructure management.Source: §2.5 · p. 5

3 Examples

The examples apply the Web World Model across exploration, games, simulation, knowledge browsing, and long-form fiction. They combine structured, persistent world state with generated content, with Bookshelf illustrating typed controls and code-defined narrative mechanics for a controllable open-ended reading experience.

3.1 Infinite Travel Atlas

  • The Infinite Travel Atlas makes arbitrary geographic coordinates accessible without a finite database, using deterministic beacons for continuity and location-aligned LLM-generated destination guides.Demonstrations show distinct themes for Nairobi, Honolulu, and Rio de Janeiro while preserving a consistent interface.Source: §3.1 · pp. 6–7

3.2 Galaxy Travel Atlas

  • The Galaxy Travel Atlas creates an effectively unbounded fictional universe whose deterministic code fixes navigational structure while schema-constrained LLM output adds coherent, context-aware narrative details.Hashed coordinates preserve planet state across revisits, and template descriptions provide a fallback if the model is unavailable.Source: §3.2 · pp. 7–8

3.3 A Card Game Called AI Spire

  • AI Spire separates creative card generation from game execution: the model returns cards and effect codes, while the symbolic rules engine applies only effects from a controlled vocabulary.Players can request custom cards with free-form prompts, and shop inventories are themed with prices and rarity constrained by the current run state.Source: §3.3 · pp. 9–10

3.4 A Sandbox Called AI Alchemy

  • AI Alchemy turns falling-sand cellular automata into a self-expanding sandbox, where the simulator caches and integrates LLM-proposed reactions for new combinations under physical constraints.An optional AI Supervisor monitors global statistics and can perturb the system, such as by inducing rainfall or removing dominant elements.Source: §3.4 · pp. 11–12

3.5 Cosmic Voyager

  • Cosmic Voyager supports orbit, piloted-flight, and surface-walk exploration with narration tailored to the selected body and camera context; its scales are compressed for usability, and live narration requires an API key.When the API is unavailable, the app falls back to bundled descriptions.Source: §3.5 · pp. 13–14

3.6 WWMPedia

  • WWMPedia generates Wikipedia-like pages from natural-language queries, using retrieved web evidence and code-defined rendering while allowing users to elaborate sections on demand.Unlike a pre-indexed corpus, it treats the open web as an unbounded knowledge world and makes source provenance explicit in the generated page.Source: §3.6 · pp. 14–15

3.7 Bookshelf

  • Bookshelf explores long-form generative fiction through a minimal select-a-book, turn-pages interaction designed to maintain continuity, constrain style, and provide a stable, readable interface.Its interface exposes orthogonal tag sets, including choices that determine the UI skin.Source: §3.7 · p. 15
  • Bookshelf tags constrain genre, tone, and pacing, shaping proposed book cards and subsequent pages; users can anchor some tags and rotate others to explore adjacent styles.Interface-style tags deterministically theme the UI, and tag refresh supports exploration without requiring users to author prompts.Source: §3.7 · p. 16, Figure 14 · p. 16
  • On each page turn, code supplies active tags, compact story state, and recent text to the LLM, then streams its continuation into the reading panel.Code defines session state, page-turn semantics, page-length limits, streaming boundaries, UI composition, and which fields carry forward.Source: §3.7 · p. 16
  • Bookshelf keeps long-horizon stories coherent by storing small, typed state while code preserves stylistic constraints, pagination, and open plot threads.The LLM handles local prose and scene detail as the story expands.Source: §3.7 · p. 17

4 Related Work

Related work spans foundational world models, persistent agent environments, dynamic game generation, and agent reasoning and benchmarks. These streams include learned or language-based simulators, long-term interaction systems, consistency-oriented game methods, and evaluation frameworks.

World Models and Web Architectures

Persistent Agent Environments and Social Simulacra

Dynamic Games and Neuro-Symbolic AI

Agent Reasoning, Learning, and Benchmarks

  • Agent reasoning work combines acting, reflection, and continual learning, while benchmarks evaluate social intelligence, games, planning, tool use, and visual-spatial reasoning.The cited visual-spatial work reports gains when models explicitly construct cognitive maps for downstream reasoning.Source: §4 · p. 18

5 Conclusion

The paper presents Web World Models as a middle ground between fixed-context web frameworks and unconstrained generative environments. Its applications use web protocols, typed latent interfaces, and procedural hashing to support persistent, open-ended exploration.

5 Conclusion

  • WWMs separate deterministic code governing state transitions and physical invariants from the probabilistic creativity of large language models.The paper frames this architecture as bridging fixed-context web frameworks and unconstrained generative environments.Source: §5 · p. 18
  • The application suite uses standard web protocols, typed latent interfaces, and procedural hashing as a substrate for persistent, open-ended exploration.The conclusion characterizes this as a practical middle ground for environments combining structural certainty with unlimited imagination.Source: §5 · p. 18
  • The paper concludes that WWMs provide a path toward scalable worlds that do not rely on static databases while retaining structural certainty and open-ended imagination.Source: §5 · p. 18

A Additional Examples

The appendix gallery shows interface states, generative variation, and interaction flows across the Infinite Travel Atlas, Galaxy Travel Atlas, and other demonstrations. The examples illustrate how users select destinations and receive generated guides, mission briefs, or planetary descriptions.

A Additional Examples

Loading 2512.23676v1…