PathWise: Planning through World Model for Automated Heuristic Design via Self-Evolving LLMs

Oguzhan Güngördü, Siheng Xiong, Faramarz Fekri · OpenReview

Abstract

Large Language Models (LLMs) have enabled automated heuristic design (AHD) for combinatorial optimization problems (COPs), but existing frameworks' reliance on fixed evolutionary rules and static prompt templates often leads to myopic heuristic generation, redundant evaluations, and limited reasoning about how new heuristics should be derived. We propose a novel multi-agent reasoning framework, referred to as Planning through World Model for Automated Heuristic Design via Self-Evolving LLMs (PathWise), which formulates heuristic generation as a sequential decision process over an entailment graph serving as a compact, stateful memory of the search trajectory. This approach allows the system to carry forward past decisions and reuse or avoid derivation information across generations. A policy agent plans evolutionary actions, a world model agent generates heuristic rollouts conditioned on those actions, and critic agents provide routed reflections summarizing lessons from prior steps, shifting LLM-based AHD from trial-and-error evolution toward state-aware planning through reasoning. Experiments across diverse COPs show that PathWise converges faster to better heuristics, generalizes across different LLM backbones, and scales to larger problem sizes.

Introduction

Combinatorial Optimization Problems (COPs), such as the Traveling Salesman Problem (TSP) or Bin Packing, are fundamental to logistics and manufacturing but are typically NP-hard. Finding efficient solutions often requires heuristics—specialized "rules of thumb." While traditionally hand-crafted, recent advances in Large Language Models (LLMs) have introduced Automated Heuristic Design (AHD). However, current AHD methods often suffer from "myopia," treating each generation as an isolated event or following rigid evolutionary rules. They lack a stateful memory of the search history, leading to redundant trials and an inability to plan complex improvements.

Methodology: Planning over an Entailment Graph

PathWise addresses these limitations by reformulating heuristic design as a Sequential Decision Process over an Entailment Graph. This graph acts as a "family tree" of algorithms, where each node stores the heuristic code, its performance, and a natural language rationale explaining its derivation.

The PathWise framework utilizes an entailment graph to maintain a stateful memory of the search trajectory, guided by a multi-agent system consisting of Policy, World Model, and Critic agents.

The framework employs a multi-agent architecture to navigate this search space:

  • Policy Agent: Acts as a high-level planner, selecting parent heuristics and defining the strategy (rationale) for the next iteration.
  • World Model Agent: Executes the policy's strategy by translating the rationale into executable Python code.
  • Critics (Policy & World Model): Provide "verbal gradients" by analyzing recent outcomes and offering feedback to refine future strategies and code quality.

This structure allows the system to "self-evolve" by learning from past successes and failures stored within the entailment graph.

Experimental Results

PathWise was evaluated across diverse COPs, including TSP, Knapsack Problem (KP), and Capacitated Vehicle Routing Problem (CVRP), using various algorithmic frameworks like Ant Colony Optimization (ACO) and Guided Local Search (GLS).

Performance comparison on the Traveling Salesman Problem (TSP) using a constructive framework. PathWise (red) demonstrates faster convergence and superior final performance compared to baselines.

Key findings include:

  • Superior Efficiency: PathWise consistently reaches higher performance levels with fewer evaluations. For instance, it often achieves better results in 500 evaluations than competing methods like ReEvo or MCTS-AHD do in 1,000.
  • Significant Performance Gains: On TSP, PathWise improved relative gaps by 20-31% over baselines. In some cases, it even outperformed specialized neural solvers like POMO, despite those requiring extensive task-specific training.
  • Generalization: Heuristics designed on small instances (e.g., TSP-50) generalized effectively to larger scales (up to 200 nodes), indicating the discovery of robust algorithmic principles.

Conclusion

PathWise shifts the paradigm of automated heuristic design from trial-and-error evolution to strategic, state-aware planning. By leveraging an entailment graph and a multi-agent reasoning framework, it enables LLMs to build upon complex ideas across generations. Future work will focus on managing the token costs associated with reasoning-heavy models and applying PathWise to domains where heuristic evaluation is computationally expensive.

Summary updated

BibTeX
@inproceedings{gungordu2026pathwise,
  author = {Oguzhan Güngördü and Siheng Xiong and Faramarz Fekri},
  title = {{PathWise: Planning through World Model for Automated Heuristic Design via Self-Evolving LLMs}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=aiOv6NhF3N},
}
Figure