Monte Carlo Tree Search for Comprehensive Exploration in LLM-Based Automatic Heuristic Design
Zhi ZhengZhuoliang XieZhenkun WangBryan Hooi
Proposes a Monte Carlo Tree Search framework for large language model-driven automatic heuristic design that retains and refines temporarily underperforming algorithms in a tree structure to escape local optima in complex optimization tasks.
Complex operational challenges across logistics, task scheduling, and industrial routing rely heavily on heuristic algorithms. Traditionally, developing these heuristics requires extensive manual engineering and domain expertise. While recent advances use Large Language Models (LLMs) to automate heuristic generation, existing systems depend on population-based evolutionary computation. These approaches immediately discard underperforming algorithms to maintain a pool of top candidates, causing the search process to converge prematurely into suboptimal local optima.
The article introduces and evaluates MCTS-AHD, a framework that integrates Monte Carlo Tree Search (MCTS) with LLM-based automatic heuristic design. The main objective is to establish whether organizing generated algorithms into a search tree—allowing exploration of temporarily lower-performing candidates—can discover significantly higher-performing heuristics across complex optimization tasks.
The authors conducted extensive computational experiments across multiple algorithmic frameworks, including step-by-step constructive methods, Ant Colony Optimization, Guided Local Search, and cost-aware Bayesian Optimization. The evaluation covered classic NP-hard combinatorial optimization problems such as the Traveling Salesman, Vehicle Routing, and Knapsack problems, alongside Bayesian optimization benchmarks. MCTS-AHD organizes all generated Python functions into a tree, applying tailored prompting strategies (mutation, crossover, and tree-path reasoning) and an exploration-decay mechanism. The authors compared the system against manual heuristics, deep neural combinatorial solvers, and leading population-based LLM frameworks across multiple model backbones, notably GPT-4o-mini and GPT-3.5-turbo.
MCTS-AHD consistently outperformed existing population-based LLM baselines and handcrafted methods across benchmark tasks. In constructive Traveling Salesman benchmarks, MCTS-AHD achieved an optimality gap of 9.69% at 50 nodes and 11.79% at 100 nodes, noticeably outperforming baseline LLM methods that achieved gaps around 12% to 15%. Across multiple Ant Colony Optimization routing and packing benchmarks, the method achieved top ranks, frequently outperforming specialized neural solvers like DeepACO. In Bayesian optimization, MCTS-AHD generated acquisition functions that achieved lower gaps on test functions where prior methods experienced performance collapses. Furthermore, statistical significance testing confirmed a clear performance advantage over elite population baselines with at least 96% confidence.
These results demonstrate that structured tree search avoids the premature stagnation common in population-based heuristic generation. Retaining temporarily inferior algorithms provides the necessary stepping stones to reach high-performing solutions. Operationally, MCTS-AHD generates high-performing algorithms within a few CPU hours and negligible API costs (approximately $0.30 per run), avoiding the multi-week, GPU-heavy training cycles required by neural optimization approaches.
Organizations addressing complex operational optimization should consider adopting tree-search-guided LLM frameworks in place of standard evolutionary baselines, particularly for complex heuristic spaces with rich linguistic problem formulations. Where immediate implementation is planned, practitioners should provide clear problem descriptions, as the method performs best in white-box settings rather than black-box formulations where problem metadata is obscured. Further development should explore hybridizing tree search with population methods to accelerate convergence speeds.
A key limitation is the framework's reduced effectiveness in black-box scenarios where semantic descriptions are stripped, as well as its current inability to automatically resolve execution bugs in unconstrained code search tasks. Nonetheless, the experimental findings provide strong confidence that MCTS-AHD is a robust, cost-effective framework for automatic heuristic engineering in well-specified optimization problems.
- Paper: Language Agent Tree Search Unifies Reasoning, Acting, and Planning in Language Models, Andy Zhou et al. (2024). LATS shows how Monte Carlo Tree Search can organize language-model-generated candidates, making its tree-based LLM search a direct precursor to the source’s heuristic-design framework.
- Paper: Reasoning with Language Model is Planning with World Model, Shibo Hao et al. (2023). RAP establishes an earlier way to combine LLM reasoning with Monte Carlo Tree Search, clarifying the planning foundation the source adapts for heuristic search.
No sufficiently relevant recommendations were found.
