Skip to content
Free planNo credit card requiredStart writing

preprint · arXiv (Cornell University) · 2026

Perceptual Self-Reflection in Agentic Physics Simulation Code Generation

Prashant Shende, Bradley Camburn

Cited by 0Open access

Abstract

We present a multi-agent framework for generating physics simulation code from natural language descriptions, featuring a novel perceptual self-reflection mechanism for validation. The system employs four specialized agents: a natural language interpreter that converts user requests into physics-based descriptions; a technical requirements generator that produces scaled simulation parameters; a physics code generator with automated self-correction; and a physics validator that implements perceptual self-reflection. The key innovation is perceptual validation, which analyzes rendered animation frames using a vision-capable language model rather than inspecting code structure directly. This approach addresses the ``oracle gap'' where syntactically correct code produces physically incorrect behavior--a limitation that conventional testing cannot detect. We evaluate the system across seven domains including classical mechanics, fluid dynamics, thermodynamics, electromagnetics, wave physics, reaction-diffusion systems, and non-physics data visualization. The perceptual self-reflection architecture demonstrates substantial improvement over single-shot generation baselines, with the majority of tested scenarios achieving target physics accuracy thresholds. The system exhibits robust pipeline stability with consistent code self-correction capability, operating at approximately \$0.20 per animation. These results validate our hypothesis that feeding visual simulation outputs back to a vision-language model for iterative refinement significantly outperforms single-shot code generation for physics simulation tasks and highlights the potential of agentic AI to support engineering workflows and physics data generation pipelines.

Cite this paper

APA 7

Shende, P., & Camburn, B. (2026). Perceptual Self-Reflection in Agentic Physics Simulation Code Generation. arXiv (Cornell University). https://doi.org/10.48550/arxiv.2602.12311

MLA 9

Shende, Prashant, and Bradley Camburn. “Perceptual Self-Reflection in Agentic Physics Simulation Code Generation.” arXiv (Cornell University), 2026, https://doi.org/10.48550/arxiv.2602.12311.

Chicago

Shende, Prashant, and Bradley Camburn. 2026. “Perceptual Self-Reflection in Agentic Physics Simulation Code Generation.” arXiv (Cornell University). https://doi.org/10.48550/arxiv.2602.12311.

Harvard

Shende, P. and Camburn, B. (2026) ‘Perceptual Self-Reflection in Agentic Physics Simulation Code Generation’, arXiv (Cornell University). Available at: https://doi.org/10.48550/arxiv.2602.12311.

BibTeX
@misc{shende2026perceptual,
  title = {{Perceptual Self-Reflection in Agentic Physics Simulation Code Generation}},
  author = {Shende, Prashant and Camburn, Bradley},
  journal = {arXiv (Cornell University)},
  year = {2026},
  doi = {10.48550/arxiv.2602.12311}
}

Made from the index record. Check names, capitalisation and page numbers against the paper. Need another style? AI for Research has over 10,000.