arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2307.05603cs.SEcs.LGcs.PL
收藏

你能改进我的代码吗?使用局部搜索优化程序

Can You Improve My Code? Optimizing Programs with Local Search

University of Alberta(阿尔伯塔大学);Alberta Machine Intelligence Institute (Amii)(阿尔伯塔机器智能研究所)

Fatemeh Abdollahi, Saqib Ameen, Matthew E. Taylor, Levi H. S. Lelis

AI总结:

本文提出POLIS局部搜索方法,逐行调用暴力综合算法迭代优化程序,并通过27人游戏编程用户研究和Stack Overflow概念验证表明其能显著提升可度量目标下的程序性能。

摘要:

本文介绍了一种局部搜索方法,用于针对可度量目标改进现有程序。Program Optimization with Locally Improving Search(POLIS,基于局部改进搜索的程序优化)利用由程序行定义的程序结构。POLIS在保持其余行固定的情况下,使用现有暴力综合算法改进程序中的单行,并持续迭代,直到无法再提升程序性能。POLIS通过一项27人参与的用户研究进行评估,参与者编写程序,试图最大化两款单智能体游戏Lunar Lander和Highway的得分。POLIS能够在游戏得分方面显著改进参与者的程序。一个基于现有Stack Overflow代码的概念验证演示衡量了其在现实问题中的适用性。这些结果表明,对于具有可度量目标的编程问题,POLIS可用作有帮助的编程助手。

英文摘要:

This paper introduces a local search method for improving an existing program with respect to a measurable objective. Program Optimization with Locally Improving Search (POLIS) exploits the structure of a program, defined by its lines. POLIS improves a single line of the program while keeping the remaining lines fixed, using existing brute-force synthesis algorithms, and continues iterating until it is unable to improve the program's performance. POLIS was evaluated with a 27-person user study, where participants wrote programs attempting to maximize the score of two single-agent games: Lunar Lander and Highway. POLIS was able to substantially improve the participants' programs with respect to the game scores. A proof-of-concept demonstration on existing Stack Overflow code measures applicability in real-world problems. These results suggest that POLIS could be used as a helpful programming assistant for programming problems with measurable objectives.

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

↑