cs.ROOct 13, 2026

Code2Worlds-2: Physically Plausible Agent Harness for Embodied World Simulation

Authors: Haoyu Zhang, Siming Li, Zeyu Zhang, Yi Zhang, Tat-Seng Chua, Hao Tang

Organizations: Equal contribution. · School of Computer Science, Peking University, Beijing 100871, China. · Project lead. · School of Computing, National University of Singapore, Singapore.

Abstract

Recent coding large language models (LLMs) can synthesize dynamic 4D worlds from natural language, but the resulting content remains a visual artifact. It lacks physical semantics such as the collision geometry, mass, friction, inertia, and joint structure, required to enable it to simulate the physical world, and its dynamics are scripted to look plausible rather than designed to execute. What is needed is an executable world: one that a physics engine can load and step, resolving contact physically. We present Code2Worlds-2, an extension of Code2Worlds that turns 4D world generation into an embodied world simulation. We keep the original dual-stream generation pipeline intact and append two modules. First, a SimReady Scene Compiler that turns a generated visual scene into a simulator-compatible representation: it assigns collision meshes via convex decomposition, estimates physical attributes with a vision-language model, infers a lightweight support graph, instantiates the engine's contact, friction, and dynamics constraints, and applies a gravity settling pass, before exporting the scene as MuJoCo MJCF. Second, a Simulator-in-the-Loop 4D Refiner that implements an automated agent harness-a compile, simulate, critique and refine loop-that converts visual dynamics into executable rigid and articulated dynamics and evolves the physical settings rather than only the code, replacing the purely visual motion critic with a simulator critic that inspects penetration depth, collision pairs, stability, contact forces, joint limits, and robot reachability. We further propose SimCode4D, a state-based benchmark with five task templates for evaluating embodied simulation. Experiments on SimCode4D and across natural, indoor, industrial, urban, and service scenes show that Code2Worlds-2 produces physically plausible, simulator-compatible, and robot-interactable scenes.

Figures & tables

Appendix figures & tables5 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Coding Agent Is Good As World Simulator

    May 14, 2026Hongyu Wang, Jingquan Wang, Bocheng Zou +2Robotics SimulationWorld Models

  2. WorldSolver: Can LLM Agents Simulate the Physical Dynamics via Solver Generation?

    Oct 6, 2026Siru Jiang, Yongzhe Lyu, Shuo Lu +6Physics-Based SimulationCode Generation

  3. Video2World: Benchmarking Coding Agents for Interactive World Modeling from Embodied Videos

    Oct 3, 2026Jinzhou Tang, Zijun Zhang, Jing Yang +10Interactive World ModelsCoding Agents