Learning Heuristic Selection with Dynamic Algorithm Configuration

David Speck, André Biedenkapp, Frank Hutter, Robert Mattmüller, Marius Lindauer

Abstract

A key challenge in satisficing planning is to use multiple heuristics within one heuristic search. An aggregation of multiple heuristic estimates, for example by taking the maximum, has the disadvantage that bad estimates of a single heuristic can negatively affect the whole search. Since the performance of a heuristic varies from instance to instance, approaches such as algorithm selection can be successfully applied. In addition, alternating between multiple heuristics during the search makes it possible to use all heuristics equally and improve performance. However, all these approaches ignore the internal search dynamics of a planning system, which can help to select the most useful heuristics for the current expansion step. We show that dynamic algorithm configuration can be used for dynamic heuristic selection which takes into account the internal search dynamics of a planning system. Furthermore, we prove that this approach generalizes over existing approaches and that it can exponentially improve the performance of the heuristic search. To learn dynamic heuristic selection, we propose an approach based on reinforcement learning and show empirically that domain-wise learned policies, which take the internal search dynamics of a planning system into account, can exceed existing approaches.

Introduction

In classical "satisficing" planning—where the goal is to find any valid solution quickly—heuristic search is the primary tool. However, no single heuristic is universally optimal; a heuristic might excel at the start of a search but lead the planner into a "dead end" later. Traditionally, researchers handle multiple heuristics through algorithm selection (picking one at the start), aggregation (combining estimates), or alternation (round-robin rotation).

The limitation of these methods is their "blindness" to internal search dynamics. They do not account for how the search progresses in real-time. This research addresses this gap by asking: Can we use the current state of the search to decide which heuristic to use for the very next step?

Methodology: Heuristic Selection as DAC

The authors frame heuristic selection as a Dynamic Algorithm Configuration (DAC) task, modeled as a contextual Markov Decision Process. In this framework, a Reinforcement Learning (RL) agent acts as a controller that dynamically adapts the planner's parameters based on feedback.

The Dynamic Algorithm Configuration (DAC) framework for heuristic selection, illustrating the feedback loop between the control policy and the planner.
  • The Agent: A Double DQN agent serves as the controller.
  • The Action: At each expansion step, the agent selects one heuristic from a portfolio (e.g., $h_{ff}$, $h_{cg}$, $h_{cea}$, $h_{add}$). The planner then expands the most promising state according to that specific heuristic.
  • State Features: To minimize overhead, the system uses domain-independent features from the planner's "open lists," such as the min, max, mean, and variance of heuristic values, and the change in these values over time.
  • Reward Function: The agent receives a reward of $-1$ for every expansion step, incentivizing it to find a solution as quickly as possible.

Experimental Setup

The approach was evaluated on six domains from the International Planning Competition (IPC): BARMAN, BLOCKSWORLD, CHILDSNACK, ROVERS, SOKOBAN, and VISITALL. For each domain, 200 instances were generated, with an even split between training and testing sets.

Insights: Domain-Specific Strategies

A key finding is that the RL agent learns distinct strategies tailored to the specific dynamics of each domain. Policy analysis using t-SNE visualizations reveals that learned policies cluster significantly by domain, indicating that "one size does not fit all" in heuristic selection.

t-SNE visualization of learned policies showing (a) clear clustering by domain and (b) variations in switching frequency across different problem types.

For instance, in the Sokoban domain, the agent learned to rely almost exclusively on the $h_{ff}$ heuristic (98% of the time). Conversely, in Barman, the agent switched between heuristics much more frequently to navigate the search space effectively. This demonstrates that the internal state of the planner contains a strong signal that RL can exploit to optimize search progress.

Results and Performance

The RL-based dynamic selection was compared against random selection (RND), round-robin alternation (ALT), and the best individual heuristics.

  • Coverage: Across 600 test instances, the RL approach achieved a total coverage of 505.1, outperforming the standard alternation strategy (488.2) and the best single heuristic ($h_{ff}$ at 425.0).
  • Efficiency: In domains like Blocksworld, RL significantly improved performance, reaching a coverage of 92.9 compared to 83.7 for alternation.
  • Oracle Comparison: The RL agent approached the performance of an "Oracle" selector, proving that dynamic switching during a single run can be more powerful than picking the single best heuristic for that run.

Conclusion and Future Work

While the results are promising, current limitations include computational overhead due to TCP/IP communication between the planner and the RL controller. Future work aims to integrate the RL policy directly into the planner's C++ code and develop domain-independent policies that can generalize to entirely new planning tasks. Additionally, addressing overfitting through more diverse training data remains a priority for improving the robustness of learned heuristic selection.

Summary updated

BibTeX
@inproceedings{speck2021learning,
  author = {David Speck and André Biedenkapp and Frank Hutter and Robert Mattmüller and Marius Lindauer},
  title = {{Learning Heuristic Selection with Dynamic Algorithm Configuration}},
  booktitle = {ICAPS},
  year = {2021},
  url = {https://openreview.net/forum?id=WvXSReP6CIg},
}
Figure