Cost Based Search Considered Harmful

William Cushing, J. Benton, Subbarao KambhampatiSOCS 2010

Abstract

In automated planning and graph search, it is often assumed that algorithms designed for shortest-path discovery can be seamlessly adapted to find minimum-cost paths by substituting action costs for action counts. We argue that this substitution is fundamentally flawed. Directly optimizing for path cost can lead to "$ε$-cost traps," where algorithms explore an exponential number of low-cost paths before considering more expensive actions that lead directly to a solution. Our analysis and empirical results suggest that planners should prioritize finding short solutions first (size-based search) and utilize costs primarily for pruning.

Introduction

The transition from finding the shortest path (minimum number of actions) to the cheapest path (minimum total cost) is frequently treated as a trivial modification of the evaluation function. However, in domains where action costs vary significantly—such as logistics where boarding a plane is "cheap" compared to the fuel cost of flying—this approach fails. Search algorithms can become trapped exploring sequences of thousands of negligible-cost actions, a phenomenon we term the $ε$-cost trap.

The $ε$-cost Trap and Search Topology

The core issue lies in the "surface" of the search space. A cost-based search may wander a factor of $1/ε$ deeper into the search space than a size-based search, where $ε$ represents the ratio of the cheapest to the most expensive action. In a bit-counter problem, for instance, a size-based search might find a solution in constant time, while a cost-based search takes exponential time because it insists on exploring every possible "cheaper" but significantly longer path first.

Methodology

We evaluated the impact of cost-based search through three lenses:

  1. Theoretical Analysis: Constructing mathematical models of search traps.
  2. Topology Analysis: Examining how cost-based "altitudes" distort the search space.
  3. Empirical Testing: We modified the SapaReplan and LAMA planners to operate in three distinct modes:
  4. Cost-based: Standard optimization of total action cost.
  5. Size-based: Treating all actions as unit cost for search guidance while using actual costs for Branch-and-Bound pruning.
  6. Hybrid: A combination of size-based guidance and normalized costs.

Experiments were conducted on the ZenoTravel domain from the International Planning Competition (IPC), specifically focusing on "2 Cities" and "3 Cities" variants to test the trade-off between many cheap actions and fewer expensive ones.

Key Results

The experimental results on the ZenoTravel domain confirmed that cost-based search is often the least effective strategy for finding high-quality plans efficiently.

Performance comparison of Hybrid, Size, and Cost-based search modes on ZenoTravel benchmarks.

As shown in the table above, the Hybrid mode achieved the highest IPC score in the "2 Cities" task (88.8%), followed by Size-based search (83.4%). Pure Cost-based search trailed significantly at 77.8%. In both the 2-city and 3-city tests, cost-based search ranked last. These results demonstrate that size-based evaluation functions find better plans faster, even when the ultimate objective is cost minimization.

Discussion: Discovery vs. Proof

The failure of cost-based search highlights a critical distinction: the problem of discovering a solution versus the problem of proving its optimality. Cost-based search conflates these two tasks. By focusing on cost from the outset, the search often fails to return any solution within a reasonable timeframe because it is preoccupied with proving that no cheaper path exists.

In contrast, size-based branch-and-bound offers an "anytime optimal" advantage. It quickly identifies a short, feasible plan and then uses the remaining time to refine it. This "interruptibility" is vital for real-world applications where a good solution now is better than a perfect solution that arrives too late.

Conclusion

Using cost as the primary metric for search guidance—the "altitude" of the search space—can be the worst possible choice for performance. Future research should move away from pure cost-based evaluation and instead focus on balancing exploration (via size-based search) with exploitation (via cost-based refinement).

Summary updated

BibTeX
@inproceedings{cushing2010cost,
  author = {William Cushing and J. Benton and Subbarao Kambhampati},
  title = {{Cost Based Search Considered Harmful}},
  booktitle = {SOCS},
  year = {2010},
  doi = {10.1609/socs.v1i1.18178},
}
Figure