Explaining and Repairing Plans that Fail

Kristian J. Hammond

Introduction

In the evolution of symbolic AI, the ability of a system to learn from its own mistakes is a hallmark of intelligent behavior. This paper introduces CHEF, a case-based planner designed to operate in the culinary domain of Szechwan cooking. Unlike traditional planners that treat failure as a signal to backtrack blindly, CHEF treats failure as a learning opportunity. It constructs causal explanations for its errors and uses these explanations to index into a library of sophisticated repair strategies.

The Challenge of Failure Recovery

During the mid-1980s, automated planning systems often struggled with flexibility. When a plan failed to achieve its goal, most systems either performed an exhaustive search for alternatives or applied localized fixes without a "global understanding" of the underlying cause. Hammond identifies this as a "knowledge access" problem: in a complex domain, there are countless ways to modify a plan, but identifying the correct modification requires understanding the causal chain that led to the failure.

The CHEF Architecture

CHEF operates through a cycle of planning, simulation, and repair. The process begins with Case-Based Planning, where the system retrieves a successful past recipe and modifies it to meet new constraints. For instance, creating a "Strawberry Soufflé" might involve adapting a "Vanilla Soufflé" recipe.

The modified plan is then run through a simulator that symbolically computes the effects of each action. If the simulation detects a state that violates the goal (e.g., a "flat" texture for a soufflé), the REPAIRER module is activated. This module traces the causal links within the simulation to identify the specific step responsible for the failure.

Causal Explanations and TOPs

The core innovation of CHEF is the use of Thematic Organization Packets (TOPs). Once a causal explanation is generated, it is used to index into a library of abstract structures that link specific types of problems to proven solution strategies.

High-level repair strategies and Thematic Organization Packets (TOPs) used by CHEF.

As shown in the figure above, CHEF utilizes a variety of repair strategies such as ADJUST-BALANCE:UP or ALTER-PLAN:SIDE-EFFECT. By categorizing failures at an abstract level, the system can narrow its search to strategies that directly address the identified causal link, such as adjusting ingredient ratios to compensate for an unwanted side effect.

Implementation and Case Studies

The system's efficacy was demonstrated through several culinary scenarios. In the "Beef and Broccoli" case, CHEF successfully tracked the state of ingredients to ensure the final dish met the desired size, texture, and taste profiles.

Symbolic representation of object states (size, texture, taste) for ingredients and the final dish.

The "Strawberry Soufflé" served as the primary case study for failure recovery. The system identified that pulping strawberries added excess liquid, which violated the balance required for the soufflé to rise. By consulting its TOPs, CHEF evaluated multiple repairs—such as replacing strawberries with preserves or increasing egg whites—and selected the most "painless" fix based on built-in heuristics.

Discussion and Limitations

CHEF demonstrates that causality can serve as a powerful index for problem-solving. By separating abstract strategies from concrete implementations, the system achieves a level of planning wisdom that transcends specific recipes. However, the system's reliance on a highly specialized simulator and a manually engineered knowledge base limits its immediate portability to other domains. Future work in this area involves automating the acquisition of these causal rules and refining the heuristics used to select optimal repairs.

Summary updated

BibTeX
@inproceedings{hammond1987explaining,
  author = {Kristian J. Hammond},
  title = {{Explaining and Repairing Plans that Fail}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {1987},
}
Figure