Automatic SAT-Compilation of Planning Problems

Michael D. Ernst, Todd D. Millstein, Daniel S. WeldIJCAI 1997

Introduction

In the late 1990s, the planning community observed a significant paradigm shift: general-purpose propositional satisfiability (SAT) solvers, such as Walksat, began to outperform specialized planning algorithms. This success, however, was largely contingent on "hand-crafted" SAT encodings that incorporated domain-specific knowledge not explicitly present in the original STRIPS problem descriptions. This paper introduces MEDIC, a compiler designed to systematize the "black art" of SAT compilation by automatically transforming STRIPS planning problems into efficient propositional formulas.

The MEDIC Compiler Framework

The authors identify a two-dimensional parameter space for planning encodings, focusing on how actions and frame axioms are represented.

Action Representation

  1. Regular: A single variable represents a fully instantiated action (e.g., Move(A, B, C)).
  2. Simply Split: An $n$-ary action is replaced by $n$ variables, one for each argument (e.g., MoveArg1(A), MoveArg2(B)).
  3. Overloaded Split: Argument variables are shared across different operators to save space.
  4. Bitwise: Actions are represented as bit patterns using a logarithmic number of variables.

Frame Axioms

Frame axioms handle the "frame problem"—representing what remains unchanged after an action.

  • Classical Axioms: State that if an action occurs and does not affect a specific fluent, that fluent's value persists.
  • Explanatory Axioms: State that if a fluent's value changes, one of the actions capable of causing that change must have occurred.

The MEDIC compiler automates the generation of these encodings through a multi-stage pipeline, as illustrated in Figure 1.

The MEDIC compiler pipeline, showing the transformation from STRIPS inputs to a final plan via SAT solving.

Optimization and Factoring

To manage the potential explosion in formula size, MEDIC employs two critical optimizations:

  • Type Analysis: By inferring which objects can validly fill specific roles (e.g., distinguishing between "movable" objects and "static" locations), the compiler prunes impossible actions from the encoding.
  • Factoring: This technique reduces clause counts in split encodings by using partial instantiations. Without factoring, "blind" substitution in split encodings often leads to an exponential increase in clauses. The authors found that factoring can reduce formula size by up to 80%.

Experimental Results

The compiler was evaluated on standard STRIPS benchmarks, including Logistics, Blocks World, and classic puzzles like the Tower of Hanoi. The results were compared against hand-tuned Satplan encodings.

Key Findings

  • Explanatory Frames are Superior: Explanatory frame axioms consistently produced smaller and faster-to-solve formulas. Because most actions affect only a small subset of the state, describing only what changes is far more efficient than describing what stays the same.
  • The "Regular" Representation: Surprisingly, the "regular" encoding (one variable per action) performed exceptionally well when paired with explanatory frames and type optimization, challenging the assumption that it would be too bulky for large problems.
  • Performance Parity: MEDIC’s automated encodings were often within a factor of two of the size of hand-coded versions. Type analysis and factoring together reduced the number of variables by 50% and total literals by 80%.

The solving time across various problem domains is shown in Figure 2, highlighting the efficiency of the generated encodings.

Solving time in seconds for various planning problems across different encoding strategies.

Conclusion and Future Work

The MEDIC compiler demonstrates that automatically generated SAT encodings can rival hand-tuned ones in efficiency. The study highlights that the primary advantage of hand-coding often lies in "invariant" knowledge (e.g., an object cannot be in two places at once). Future work aims to bridge this gap by automating the inference of such domain invariants, further narrowing the performance gap between human-designed and machine-generated planning encodings.

Summary updated

BibTeX
@inproceedings{ernst1997automatic,
  author = {Michael D. Ernst and Todd D. Millstein and Daniel S. Weld},
  title = {{Automatic SAT-Compilation of Planning Problems}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {1997},
}
Figure