---
title: Code-as-World
type: vocabulary
url: "https://www.envisioning.com/vocab/code-as-world"
summary: Paradigm for representing physical worlds as executable code, with an agentic discovery loop that proposes-executes-renders-verifies-refines world hypotheses from multimodal observations.
year: 2026
generality: 0.65
---

# Code-as-World

Paradigm for representing physical worlds as executable code, with an agentic discovery loop that proposes-executes-renders-verifies-refines world hypotheses from multimodal observations.
Code-as-World is a paradigm introduced by Wang et al. (NTU S-Lab + collaborators, August 2026) that represents physical worlds as executable code rather than as neural network weights or implicit latent states. The paradigm expresses physical composition (objects, materials, spatial arrangement), dynamic evolution (forces, collisions, state transitions), and visual appearance as runnable code that can be executed, inspected, and edited. The representation is compact, quantitatively grounded, and controllable in ways that black-box neural world models are not.

The framework includes an agentic discovery loop for constructing these executable representations from multimodal observations (natural-language descriptions, real-world videos, or simulation traces). The loop proceeds as: propose a candidate executable world hypothesis; execute the code to advance the simulation; render the resulting state; verify against the observation; refine the hypothesis; repeat. The verification step uses the rendering to detect discrepancies with the multimodal observation, and the refinement step uses the error signal to update the code.

The trained system, Code-as-World-VL, achieves state-of-the-art performance on QuantiPhy and surpasses leading proprietary models on quantitative physical reasoning. The authors argue executable world representations provide scalable physical supervision — training-data labels for VLMs — that is hard to obtain from real-world data alone. The paradigm connects to symbolic-physics simulation, scene-graph representation, and differentiable physics, but is distinct in treating the world model as a literal program rather than as a continuous representation.

Code-as-World is documented in arXiv:2608.27549 (August 2026). It is adjacent to executable-world-model (the broader paradigm), agentic-discovery (the propose-execute-render-verify-refine loop), and physical-supervision (using rendered worlds as training signal). It sits in a 2026 research cluster that includes SceneCode, VisPhyWorld, PatchWorld, Baba-in-Wonderland, and Executable World Models for ARC-AGI-3.

---
Source: Envisioning — Technology Research Institute (https://www.envisioning.com/vocab/code-as-world)
