Learning Features and Abstract Actions for Computing Generalized Plans.

Blai Bonet, Guillem Francès, Hector Geffner

Abstract

Generalized planning is concerned with the computation of plans that solve not one but multiple instances of a planning domain. Recently, it has been shown that generalized plans can be expressed as mappings of feature values into actions, and that they can often be computed with fully observable non-deterministic (FOND) planners. The actions in such plans, however, are not the actions in the instances themselves, which are not necessarily common to other instances, but abstract actions that are defined on a set of common features. The formulation assumes that the features and the abstract actions are given. In this work, we address this limitation by showing how to learn them automatically. The resulting account of generalized planning combines learning and planning in a novel way: a learner, based on a Max SAT formulation, yields the features and abstract actions from sampled state transitions, and a FOND planner uses this information, suitably transformed, to produce the general plans. Correctness guarantees are given and experimental results on several domains are reported.

Introduction

In classical planning, the goal is to find a sequence of actions to reach a goal from a specific initial state. Generalized Planning (GP) is a more ambitious task: it seeks a single strategy or policy that works across an entire domain, regardless of the specific instance size or configuration. For example, instead of a plan to move "Block A" to "Block B," a generalized plan provides a rule like "if the gripper is empty and there are blocks above the target, pick the top block and set it aside."

Recent advancements have demonstrated that if the right high-level features and abstract actions are available, standard planners can find these general rules. However, these abstractions previously required manual expert design. This research addresses this "manual bottleneck" by introducing a method to learn these features and abstract actions automatically from a small set of example transitions.

Methodology

The proposed framework utilizes a multi-step pipeline to bridge the gap between raw state transitions and high-level policies:

  1. Sampling: State transitions are collected from a few small, simple instances of a problem (e.g., a Blocksworld instance with only 5 blocks).
  2. Feature Pool Generation: Using Description Logic (DL), the system generates a large pool of candidate boolean and numerical features based on the domain's primitive predicates (e.g., on(x,y), clear(x)).
  3. Max-SAT Encoding: This core component formulates a SAT problem to select the simplest subset of features that satisfies two critical conditions:
  4. Soundness: Every abstract action must correspond to at least one valid concrete action in the samples.
  5. Completeness: Every concrete transition in the samples must be explained by an abstract action.
  6. Abstraction to QNP: The selected features and actions form a Qualitative Numerical Problem (QNP), which tracks whether values are zero or changing qualitatively (increasing/decreasing) without requiring exact numerical values.
  7. FOND Planning: The QNP is translated into a Fully Observable Non-Deterministic (FOND) planning problem, which is then solved to produce the final generalized policy.

Experimental Results

The approach was evaluated on four classic planning domains: clearing a block ($Q_{clear}$), stacking blocks ($Q_{on}$), the Gripper domain, and a reward-collection grid task ($Q_{reward}$).

Experimental results for the four test domains, showing the efficiency of the SAT solver and the compactness of the resulting policies.

As shown in the table above, the system successfully learned generalized policies for all test domains. Key performance metrics include:

  • Efficiency: The SAT solver typically identified the required features in less than 0.02 seconds ($t_{SAT}$).
  • Policy Compactness: The resulting policies ($|\pi|$) were extremely concise, consisting of only 5 to 14 rules.
  • Scalability: In the Gripper domain, the system learned a policy in approximately 172 seconds that generalizes to any number of balls and grippers, despite being trained on only two small examples.

Key Insights

  • Learning as Combinatorial Optimization: By treating feature selection as a logical constraint satisfaction problem rather than a statistical estimation, the system ensures the resulting policy is provably correct for the provided samples.
  • The Power of Description Logic: Using a formal grammar allows the system to "invent" complex relational concepts, such as transitive closures, without explicit instruction.
  • Small Data, Big Generalization: By focusing on qualitative changes, the system can learn rules from a handful of transitions that scale to instances of arbitrary size (e.g., a stack of a million blocks).

Limitations and Future Work

While the SAT solver is fast for small problems, the encoding size grows quadratically with the number of sampled states, presenting a potential scalability bottleneck. Additionally, the system currently relies on hand-coded initial and goal conditions for the abstract problem. Future research aims to automate the learning of these conditions and explore "learning from pixels," where primitive predicates are not provided and must be discovered by the system itself.

Summary updated

BibTeX
@inproceedings{bonet2019learning,
  author = {Blai Bonet and Guillem Francès and Hector Geffner},
  title = {{Learning Features and Abstract Actions for Computing Generalized Plans.}},
  booktitle = {AAAI},
  year = {2019},
  url = {https://openreview.net/forum?id=Hsgg4XQzg_6H},
}
Figure