AutoCode:将LLM作为竞赛编程的问题设置者
AutoCode: LLMs as Problem Setters for Competitive Programming
AI总结:
AutoCode利用多轮验证生成竞赛级编程问题及测试用例,测试一致性达99%,并能创建新颖变体,产出被大师级程序员认可的竞赛质量题目。
摘要:
编写竞赛编程问题是一项要求严格的任务。作者必须:设置约束条件、输入分布和边界情况,以排除捷径解法;针对特定算法(如最大流、动态规划、数据结构)进行设计;并校准难度,使其超出大多数参赛者的能力范围。我们认为,这使得竞赛编程问题成为测试通用大型语言模型能力的理想场景,并研究它们能否可靠地完成这一任务。我们引入了AutoCode,它利用多轮验证来生成竞赛级别的问题陈述和测试用例。在保留的测试问题上,AutoCode的测试套件与官方评判的一致性接近99%,显著优于当前最先进的方法(如HardTests),后者的一致性低于81%。此外,从一个随机种子问题出发,AutoCode能够创建带有参考解和暴力解的新颖变体。通过将这些生成的解与测试用例进行交叉验证,我们可以进一步过滤掉有缺陷的问题。我们的系统确保了高正确性,这一点已由人类专家验证。AutoCode成功生成了新颖的问题,并被大师级(前0.3%)的竞赛程序员评定为具有竞赛质量。
英文摘要:
Writing competitive programming problems is exacting. Authors must: set constraints, input distributions, and edge cases that rule out shortcuts; target specific algorithms (e.g., max-flow, dynamic programming, data structures); and calibrate complexity beyond the reach of most competitors. We argue that this makes for an ideal test of general large language model capabilities and study whether they can do this reliably. We introduce AutoCode, which uses multiple rounds of validation to yield competition-grade problem statements and test cases. On held-out problems, AutoCode test suites approach 99% consistency with official judgments, a significant improvement over current state-of-the-art methods like HardTests, which achieve less than 81%. Furthermore, starting with a random seed problem, AutoCode can create novel variants with reference and brute-force solutions. By cross-verifying these generated solutions against test cases, we can further filter out malformed problems. Our system ensures high correctness, as verified by human experts. AutoCode successfully produces novel problems judged by Grandmaster-level (top 0.3%) competitive programmers to be of contest quality.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。