Towards a General Framework for Composing Disjunctive and Iterative Macro-operators

Peter Shell, Jaime G. CarbonellIJCAI 1989

This paper, originally presented at the 1989 International Conference on Machine Learning (ICML), marks a significant advancement in the field of knowledge compilation. It explores the transition from slow, deliberate problem-solving to the creation of "compiled" expertise through the use of complex macro-operators.

The Utility Problem in Classical AI

In classical AI, macro-operators (macro-ops) are sequences of atomic actions learned from experience, designed to bypass search steps in future problem-solving. However, traditional macro-ops suffer from several limitations:

  1. Linearity: They are typically "frozen" sequences. Any slight variation in a problem requires a completely new macro-op, leading to the "utility problem" where the system spends more time matching rules than it saves in search.
  2. Lack of Generality: They cannot handle repetition. A macro-op for a 3-disk Tower of Hanoi problem cannot be applied to a 4-disk version.
  3. The "Expensive Chunk" Problem: In systems like SOAR, creating large rule chunks can lead to exponential increases in the time required for the RETE match algorithm to process the current state.

Shell and Carbonell address these issues by proposing a framework that "compiles" problem-solving traces into flexible, iterative, and disjunctive structures.

Methodology: Disjunction and Iteration

The authors implemented their approach within FERMI, a problem solver built on the FRuleKit production system. The framework focuses on two primary structural improvements:

1. Disjunctive Macro-operators

Instead of generating separate rules for every task variation, the system identifies similar operator sequences and uses sequence-alignment techniques to find points of divergence. Common preconditions are shared, and divergent steps are wrapped in <OR> statements. This allows the RETE algorithm to exploit these disjunctions; if one branch is satisfied, the system avoids checking the others.

Merging linear sequences into a disjunctive macro-operator structure.

2. Iterative Macro-operators

When the system detects repeating rules or macro-ops, it applies optimizations inspired by compiler theory, such as loop-invariant extraction. It classifies condition elements as Precondition (static), Temporary (modified within the loop), or Retained (new data per cycle). To improve efficiency, the system uses local LISP variables for intermediate steps rather than updating the global "Working Memory" on every iteration, only updating the global state once the loop concludes.

Evaluation and Key Results

The framework was evaluated in two domains: an Algebra module for solving linear simultaneous equations (32 equations) and a World Modeling System involving a simulated organism.

The results demonstrated significant improvements in both "coarse-grain" search (number of steps) and "fine-grain" search (computational cost of rule-matching):

  • Disjunctive Speedup: In the algebra domain, disjunctive macro-ops were nearly twice as fast as traditional agenda-based methods.
  • Iterative Speedup: Iterative operators provided a 4.04x total speedup and a 6.74x speedup specifically in match time for the algebra rule set.
  • Combined Efficiency: Utilizing both methods together resulted in a 7.25x speedup over traditional composition methods.
Performance comparison showing the time reduction achieved by moving from agenda-based methods to disjunctive macro-operators.

Conclusion

By treating AI operator sequences like blocks of code in a high-level language, Shell and Carbonell demonstrated that compiler-style optimizations can drastically reduce the overhead of rule-based systems. Their iterative macro-ops successfully generalize to an arbitrary number of applications ($N$), solving a long-standing limitation of traditional chunking methods. Future work aims to refine sequence recognition and explore heuristic ordering of disjuncts to further optimize match costs.

Summary updated

BibTeX
@inproceedings{shell1989towards,
  author = {Peter Shell and Jaime G. Carbonell},
  title = {{Towards a General Framework for Composing Disjunctive and Iterative Macro-operators}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {1989},
}
Figure