cs.AIOct 12, 2026

PhysCodeGym: Benchmarking Coding Agents for Physically Verifiable 4D Reconstruction

Authors: Shuai Shao, Jinchen He, Cunxin Fan, Zihan Guo, Shijian Wang, Qihan Ren, Kangning Zhang, Zunnan Xu, 

Organizations: Shanghai Jiao Tong University · Sun Yat-sen University · Shanghai Innovation Institute · Southeast University · 

Abstract

Building physical simulations from video requires coding agents to translate observations into executable models and refine them through tool use. We introduce PhysCodeGym, a benchmark for physically verifiable 4D reconstruction with 156156 tasks covering rigid-body, liquid, deformable, and wind-driven motion. Agents autonomously inspect videos, write and run Blender programs, and revise their scenes using simulation feedback. Six metrics combine rule-based measurements with rubric-based judgments to assess visual and physical reconstruction quality. Program inspection, scene measurements, and counterfactual interventions test physical consistency under original and modified conditions. Experiments with frontier coding agents reveal a tradeoff between artifact quality and completion across reasoning-effort settings, while harness comparisons and agent traces link verification behavior with reconstruction performance. Case studies show that matching visible objects and events can coexist with physical defects. Counterfactual tests further expose latent contact and support failures in reconstructions that pass ordinary physical checks, highlighting the gap between reproducing observations and building reliable physical models. Code is available at https://github.com/ShaoShuai0605/PhysCodeGym.

Figures & tables

Appendix figures & tables31 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. 4DCodeBench: Benchmarking Agents on Inverse Graphics of Dynamic Scenes

    Oct 2, 2026Ruihong Shen, Žiga Kovačič, Peter Kulits +6Dynamic Scene ReconstructionAI Agent Benchmarks

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

    Oct 13, 2026Haoyu Zhang, Siming Li, Zeyu Zhang +3Physics-Based SimulationEmbodied World Models