Designing high-performing metaheuristics for NP-hard combinatorial optimization problems, such as the Vehicle Routing Problem (VRP), remains a significant challenge, often requiring extensive domain expertise and manual tuning. Recent advances have demonstrated the potential of large language models (LLMs) to automate this process through evolutionary search. However, existing methods are largely reactive, relying on immediate performance feedback to guide what are essentially black-box code mutations. Our work departs from this paradigm by introducing Metacognitive Evolutionary Programming (MEP), a framework that elevates the LLM to a strategic discovery agent. Instead of merely reacting to performance scores, MEP compels the LLM to engage in a structured Reason-Act-Reflect cycle, forcing it to explicitly diagnose failures, formulate design hypotheses, and implement solutions grounded in pre-supplied domain knowledge. By applying MEP to evolve core components of the state-of-the-art Hybrid Genetic Search (HGS) algorithm, we discover novel heuristics that significantly outperform the original baseline. By steering the LLM to reason strategically about the exploration-exploitation trade-off, our approach discovers more effective and efficient heuristics applicable across a wide spectrum of VRP variants. Our results show that MEP discovers heuristics that yield significant performance gains over the original HGS baseline, improving solution quality by up to 2.70\% and reducing runtime by over 45\% on challenging VRP variants.
翻译:针对诸如车辆路径问题(VRP)等NP-hard组合优化问题设计高性能元启发式算法,仍然是一项重大挑战,通常需要深厚的领域专业知识及手动调参。近期进展已展示了大语言模型(LLM)通过进化搜索自动化该过程的潜力。然而,现有方法多为反应式,即依赖即时性能反馈来引导本质上属于黑盒代码变异的操作。本文通过引入元认知进化规划(MEP)框架突破了这一范式,将LLM提升为战略发现代理。不同于仅对性能得分作出响应,MEP迫使LLM参与结构化的"推理-行动-反思"循环,要求其明确诊断失败原因、提出设计假设,并基于预置领域知识实现解决方案。通过将MEP应用于最先进的混合遗传搜索(HGS)算法核心组件的进化,我们发现了显著优于原始基线的新颖启发式方法。通过引导LLM对探索-开发权衡进行战略推理,我们的方法发现了适用于广泛VRP变体的更高效启发式策略。结果表明,MEP发现的启发式方法相较于原始HGS基线实现了显著性能提升:在具有挑战性的VRP变体上,解质量提升高达2.70%,运行时间减少超过45%。