arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.12311cs.SEcs.AI
收藏

感知性自我反思在代理物理模拟代码生成中的应用

Perceptual Self-Reflection in Agentic Physics Simulation Code Generation

Singapore University of Technology and Design(新加坡科技设计大学)

Prashant Shende, Bradley Camburn

AI总结:

本文提出了一种多代理框架,通过感知性自我反思机制提升物理模拟代码生成的准确性与稳定性,验证了视觉反馈在物理模拟任务中的有效性。

摘要:

我们提出了一种多代理框架,用于从自然语言描述生成物理模拟代码,其特色是新颖的感知性自我反思机制用于验证。该系统采用了四个专门的代理:一个自然语言解释器,将用户请求转换为基于物理的描述;一个技术要求生成器,产生缩放的模拟参数;一个具有自动自我纠正功能的物理代码生成器;以及一个实现感知性自我反思的物理验证器。关键创新是感知验证,它使用具备视觉能力的语言模型分析渲染的动画帧,而不是直接检查代码结构。这种方法解决了“ oracle gap”问题,即语法正确的代码会产生物理上不正确的行为——这是传统测试无法检测的限制。我们评估了该系统在七个领域中的表现,包括经典力学、流体动力学、热力学、电磁学、波动物理、反应扩散系统和非物理数据可视化。感知性自我反思架构在单次生成基线上显示出显著改进,大多数测试场景均达到目标物理准确性阈值。该系统表现出稳健的管道稳定性,具有持续的代码自我纠正能力,运行成本约为每动画0.20美元。这些结果验证了我们的假设,即将视觉模拟输出反馈给视觉语言模型进行迭代优化,显著优于单次代码生成,突显了代理AI在支持工程工作流程和物理数据生成管道中的潜力。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑