arXiv:2601.19622cs.AImath.OC2026-01中稿 · EvoStar conference被引 1

用大模型自动设计启发式函数,比专家还准。

Algorithmic Prompt-Augmentation for Efficient LLM-Based Heuristic Design for A* Search

  • 把A*算法代码放进提示词,让大模型学上下文
  • 在两个难题上生成的启发式函数优于人工设计
  • 适合想自动化搜索算法优化的研究者

启发式函数对树搜索算法(如A*)的性能至关重要,其准确性和效率直接影响搜索结果。传统启发式依赖人工设计,需大量专业知识。近年来,大语言模型(LLMs)与进化框架的发展为启发式自动化设计提供了可能。本文扩展了启发式进化(EoH)框架,提出一种无需领域知识的提示词增强策略,将A*算法代码引入提示词中,利用上下文学习能力,称为算法-上下文启发式进化(A-CEoH)。为验证A-CEoH的有效性,我们研究了两个问题领域:仓库物流中的单位负载预整理问题(UPMP)和经典的滑动拼图问题(SPP)。计算实验表明,A-CEoH能显著提升生成启发式函数的质量,甚至超越专家设计的启发式。

原文摘要 · Abstract (English)

Heuristic functions are essential to the performance of tree search algorithms such as A*, where their accuracy and efficiency directly impact search outcomes. Traditionally, such heuristics are handcrafted, requiring significant expertise. Recent advances in large language models (LLMs) and evolutionary frameworks have opened the door to automating heuristic design. In this paper, we extend the Evolution of Heuristics (EoH) framework to investigate the automated generation of guiding heuristics for A* search. We introduce a novel domain-agnostic prompt augmentation strategy that includes the A* code into the prompt to leverage in-context learning, named Algorithmic - Contextual EoH (A-CEoH). To evaluate the effectiveness of A-CeoH, we study two problem domains: the Unit-Load Pre-Marshalling Problem (UPMP), a niche problem from warehouse logistics, and the classical sliding puzzle problem (SPP). Our computational experiments show that A-CEoH can significantly improve the quality of the generated heuristics and even outperform expert-designed heuristics.

启发式设计大模型搜索算法

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。