Exploiting N-Gram Analysis to Predict Operator Sequences

Christian J. Muise, Sheila A. McIlraith, Jorge A. Baier, Michael Reimer

Abstract: This paper presents a novel approach to automated planning by applying n-gram analysis—a technique from computational linguistics—to sequences of planning operators. By learning frequent action patterns from successful bootstrap plans, the authors enhance the Fast-Forward (FF) planner to prioritize "familiar" operator sequences. Evaluation on IPC-2008 benchmark domains demonstrates that this lightweight learning mechanism significantly improves success rates and plan quality without the overhead typically associated with macro-operator learning.

Introduction

Automated planning involves searching for a sequence of actions to reach a goal state. The primary challenge is the exponential growth of the search space. While modern heuristics guide this search, they often lack domain-specific context and can lead the planner into dead ends. This paper explores whether the sequential structure of plans can be exploited using n-gram models, similar to word prediction in natural language processing. The core idea is that plans, like sentences, have a "grammar" where certain actions naturally follow others.

Methodology

The proposed system operates in two distinct phases:

  1. Learning Phase: A high-quality planner (LAMA) generates a corpus of plans for simple "bootstrap" problems. From these, n-grams of lengths 2 to 5 are extracted. Crucially, these are "lifted" patterns that capture argument relationships. For example, instead of just learning that a pickup follows a move, the system learns that the pickup occurs at the specific location reached by the preceding move.
  2. Planning Phase: The researchers modified the FF (Fast-Forward) planner, specifically its Enforced Hill-Climbing (EHC) phase. When the current action history matches a learned pattern, the suggested "familiar operators" are prioritized over standard heuristic suggestions.
Figure 1: Illustration of predicting future actions (fire laser, move) based on a sequence of previous actions (move, pickup laser).

As illustrated in Figure 1, the history of actions (1, 2, 3) provides a context that makes certain future actions (like firing a laser) more probable than others. By prioritizing these familiar paths, the planner can often bypass expensive heuristic calculations.

Experimental Setup

The approach was evaluated using the framework from the International Planning Competition (IPC-2008) Learning Track. Six distinct domains were tested: Gold Miner, Matching, N-Puzzle, Parking, Sokoban, and Thoughtful. For each domain, 30 bootstrap problems were used for training and 30 target problems were used for testing. The performance of the enhanced planner, dubbed FF*, was compared against the baseline FF and other state-of-the-art learners.

Results and Discussion

The modified planner, FF*, showed substantial improvements over the baseline FF across nearly all metrics.

Table 1: Performance comparison between the baseline FF planner and the enhanced FF* planner across multiple domains.

As shown in Table 1, the overall success rate increased from 0.36 to 0.51. The most dramatic improvement occurred in the Gold Miner domain, where the success rate jumped from 26% to 100%. Furthermore, FF often produced higher quality (shorter) plans, avoiding the "utility problem" where learned knowledge typically slows down the system. The "Delta" improvement was comparable to, and in some metrics exceeded, the performance of Obtuse Wedge*, the winner of the IPC-2008 Best Learner award.

Conclusion

N-gram analysis provides a simple yet effective way to capture the local structure of planning domains. By prioritizing familiar action sequences, planners can navigate complex search spaces more efficiently. While the current model is "context-blind" regarding the specific state or goal, future work aims to incorporate this information into the n-gram models to provide even more robust predictions.

Summary updated

BibTeX
@inproceedings{muise2009exploiting,
  author = {Christian J. Muise and Sheila A. McIlraith and Jorge A. Baier and Michael Reimer},
  title = {{Exploiting N-Gram Analysis to Predict Operator Sequences}},
  booktitle = {ICAPS},
  year = {2009},
}
Figure