arXivDaily arXiv每日学术速递 周一至周五更新
​通知:联邦节假日调休:哥伦布日 / 原住民日(Columbus Day / Indigenous Peoples' Day),今日(13日)无更新。
arXiv 2505.10749cs.AI

基于大语言模型的网格世界代码驱动规划

Code-Driven Planning in Grid Worlds with Large Language Models

University of Southern California(南加州大学);University of Southern California Information Sciences Institute(南加州大学信息科学研究所)

Ashwath Vaithinathan Aravindan, Zhisheng Tang, Mayank Kejriwal

AI总结:

本研究提出迭代程序化规划IPP框架,通过LLM合成代码形式的可解释智能体策略解决网格任务,结合多种提示策略与迭代优化机制,在基准测试中性能显著提升且摊销成本更低。

摘要:

我们提出一种迭代程序化规划(iterative programmatic planning, IPP)框架,通过利用大语言模型(large language models, LLMs)合成以代码表示的可解释智能体策略来解决网格类任务。我们的方法不依赖传统搜索或强化学习,而是将代码生成用作策略合成,由LLM输出可执行程序,将环境状态映射为动作序列。我们提出的架构融合了多种提示策略,包括直接代码生成、伪代码条件优化和基于课程的提示,同时还包含迭代优化机制,可根据任务性能反馈更新代码。我们使用6种主流LLM和两个具有挑战性的网格基准(GRASP和MiniGrid)评估了我们的方法。在6个模型中的5个上,我们的IPP框架相比直接代码生成展现出10%到最高10倍的性能提升,并在GRASP上取得了新的最优结果。研究发现IPP的性能显著优于直接从GPT-o3-mini诱导解决方案的方式(在MiniGrid上提升63%,在GRASP上提升116%),证明了该整体方法的可行性。所有代码生成方法的计算成本相近。尽管与直接解决方案诱导相比,代码生成的初始提示成本更高(GPT-o3-mini的成本为每项任务0.08美元,而直接诱导为每个实例0.002美元),但代码可重复用于任意数量的实例,因此摊销成本显著更低(在完整GRASP基准上,GPT-o3-mini的摊销成本降低了400倍)。

英文摘要:

We propose an iterative programmatic planning (IPP) framework for solving grid-based tasks by synthesizing interpretable agent policies expressed in code using large language models (LLMs). Instead of relying on traditional search or reinforcement learning, our approach uses code generation as policy synthesis, where the LLM outputs executable programs that map environment states to action sequences. Our proposed architecture incorporates several prompting strategies, including direct code generation, pseudocode-conditioned refinement, and curriculum-based prompting, but also includes an iterative refinement mechanism that updates code based on task performance feedback. We evaluate our approach using six leading LLMs and two challenging grid-based benchmarks (GRASP and MiniGrid). Our IPP framework demonstrates improvements over direct code generation ranging from 10\% to as much as 10x across five of the six models and establishes a new state-of-the-art result for GRASP. IPP is found to significantly outperform direct elicitation of a solution from GPT-o3-mini (by 63\% on MiniGrid to 116\% on GRASP), demonstrating the viability of the overall approach. Computational costs of all code generation approaches are similar. While code generation has a higher initial prompting cost compared to direct solution elicitation (\$0.08 per task vs. \$0.002 per instance for GPT-o3-mini), the code can be reused for any number of instances, making the amortized cost significantly lower (by 400x on GPT-o3-mini across the complete GRASP benchmark).

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

↑