Abstract
Finding multiple high-quality plans is essential in many planning applications, and top-k planning asks for finding the k best plans, naturally extending cost-optimal classical planning. Several attempts have been made to formulate top-k classical planning as a k-shortest paths finding problem and apply K search, which alternates between A and Eppstein's algorithm. However, earlier work had shortcomings, among which were failing to handle inconsistent heuristics and degraded performance in Eppstein's algorithm implementations. As a result, existing evaluation results severely underrate the performance of the K based approach to top-k planning. In this paper, we present a new top-k planner based on a novel variant of K search. We address the following three aspects. First, we show an alternative implementation of Eppstein's algorithm for classical planning, which resolves a major bottleneck in earlier attempts. Second, we present a new strategy for alternating A and Eppstein's algorithm, that improves the performance of K on the classical planning benchmarks. Last, we introduce a simple mitigation of the limitation of K* to tasks with a single goal state, allowing us to preserve heuristic informativeness in face of imposed task reformulation. Empirical evaluation results show that the proposed approach achieves the state-of-the-art performance on the classical planning benchmarks.
Introduction
In classical planning, the primary objective is typically to find a single cost-optimal plan. However, real-world scenarios—such as medical diagnosis or automated machine learning pipeline generation—often require a set of high-quality alternatives, known as the top-k plans.
The $K^*$ algorithm is a theoretically elegant solution that alternates between $A^*$ search for state-space exploration and Eppstein’s algorithm for efficient path extraction. Despite its potential, $K^*$ has historically underperformed in practical benchmarks due to implementation overhead, difficulties with inconsistent heuristics, and the loss of heuristic informativeness during task reformulation. This paper "renovates" $K^*$ by addressing these bottlenecks, resulting in a new state-of-the-art planner.
Methodology
The proposed approach introduces three key technical improvements to the $K^*$ framework.
List-based Eppstein’s Algorithm
Standard implementations of Eppstein’s algorithm rely on complex heap structures that are slow to initialize. The authors observe that planning graphs are typically sparse. Consequently, they implement a simplified version of the algorithm using pointer-based linked lists. While this technically increases theoretical complexity for dense graphs, it significantly reduces constant-time overhead in practice.
Aggressive Switching Strategy
To improve the "anytime" performance of the planner, a new switching strategy is introduced. By using hyperparameters ($A^*_{lb}, A^*_{ub}$) and a "switch-on-goal" flag, the algorithm can more flexibly transition between exploration ($A^*$) and path extraction (Eppstein's). This allows the planner to find initial plans quickly rather than waiting for the entire search space to be processed.
Heuristic Preservation via Task Reformulation
$K^*$ requires a single goal state, whereas most planning tasks have multiple goal conditions. The standard fix—adding a dummy goal node—often degrades heuristic accuracy. The authors mitigate this by performing the search on the reformulated task while evaluating the heuristic on the original task states. This preserves high-quality guidance throughout the search.
Experimental Evaluation
The renovated $K^*$ planner was implemented in the Fast Downward system and evaluated on 1,827 tasks from International Planning Competitions (IPC) 1998–2018. The evaluation focused on four major heuristics: LM-cut (inconsistent), Merge-and-Shrink (M&S), CEGAR, and iPDB (consistent).
Key Results
- State-of-the-Art Coverage: For $k=1000$, $K^*$ with the LM-cut heuristic solved 921 tasks, significantly outperforming previous leaders like SymK (892 tasks) and the iterative FI planner (633 tasks).
- Compatibility with Inconsistent Heuristics: Enabling $K^*$ to work effectively with LM-cut—one of the most informative heuristics—provided a massive performance boost that previous implementations lacked.
- Robustness to $k$: The algorithm's performance remains stable as the number of requested plans increases. For LM-cut, the coverage drop from $k=1$ to $k=1000$ was only 13 tasks.
- Heuristic Impact: Evaluating heuristics on the original task states led to substantial improvements, particularly for the CEGAR heuristic, which saw increased coverage in 28 domains.
Discussion
The success of this renovated $K^*$ search highlights a critical lesson: theoretical complexity does not always dictate practical performance. The shift to simpler linked lists for Eppstein's algorithm proved superior for the sparse graphs encountered in planning. Furthermore, maintaining the context of the original problem for heuristic evaluation prevents the "dilution" of information common in task reformulation.
Future work includes integrating advanced pruning techniques like Partial Order Reduction or Symmetry Breaking into the $K^*$ framework and extending the approach to diverse planning, where the goal is to find plans that are both low-cost and structurally distinct.
The code is available at: https://github.com/IBM/kstar
Summary updated