Capability-Bounded Code Evolution with Large Language Models: A Cross-Family Study of Adaptive Heuristic Search
Abstract
Large language models (LLMs) can now write and revise executable code, which raises a concrete question for heuristic optimization: can an iterative language-model loop generate useful heuristic programs under controlled evaluation, and what limits appear when benchmarks and baselines become more demanding? The study addresses that question through a unified experimental framework in which models propose deterministic Python heuristics, receive task-specific validator feedback, and are compared under replicated conditions across increasingly realistic problem families. The empirical progression begins with simple adversarial games, moves to the symmetric traveling salesperson problem (TSP), the asymmetric traveling salesperson problem (ATSP), and the capacitated vehicle routing problem (CVRP), and then studies CVRP solver evolution on Uchoa X-series benchmark instances from the Capacitated Vehicle Routing Problem Library (CVRPLIB). The retained evidence supports a capability-bounded interpretation. The loop can produce measurable behavioral adaptation in games and some held-out routing improvements. The same evidence shows that novelty spikes are often unreliable, replay effects are family-dependent, and no single replay recipe dominates TSP, ATSP, and CVRP. In later phases, modular operator search rediscovered recognizable operator families without validating a reusable operator, and adaptive portfolio control improved over a weak LLM selector while remaining behind the strongest fixed selector. Real-world CVRP solver evolution preserved full held-out feasibility and improved over weaker baselines while remaining behind Clarke–Wright savings. A matched-budget CVRP control study showed that replay-aware incumbent-preserving search had lower penalized gap than both a memoryless learned control and a bounded direct-generation-plus-repair control, mainly by avoiding feasibility collapse. An external PyVRP solver calibration based on hybrid genetic search (HGS) ideas produced lower gaps than both Clarke–Wright and the evolved solvers. Finally, a budget-matched factorial study found no replay, failure, or compression condition that reliably improved on the no-replay control. The resulting contribution is a measurement framework for distinguishing useful adaptation from code churn, search budget from mechanism value, and bounded heuristic improvement from unsupported claims of general solver discovery.
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.