Efficient Black-Box Planning Using Macro-Actions with Focused Effects

Cameron Allen, Michael Katz, Tim Klinger, George Konidaris, Matthew Riemer, Gerald Tesauro

Abstract

In black-box planning, agents interact with simulators without access to descriptive models like PDDL. This lack of structural information often forces reliance on simple heuristics, such as goal-count, which perform poorly when actions have widespread effects on state variables. We propose a method to discover "focused" macro-actions—sequences of primitive actions that minimize the number of changed state variables. By augmenting the agent's action space with these macros, we align the environment with the independence assumptions of simple heuristics. Our experiments demonstrate that this approach leads to significant efficiency gains, enabling a black-box planner to solve the Rubik's Cube with a 100% success rate, outperforming state-of-the-art informed planners in state generation.

Introduction

Classical planning typically assumes the existence of a formal model (e.g., PDDL) that describes the preconditions and effects of every action. However, many real-world scenarios only provide a "black-box" simulator. In these settings, planners often fall back on the goal-count heuristic, which counts the number of state variables that match the goal. This heuristic is only effective if subgoals are independent—meaning one can be satisfied without disturbing others. In complex domains like the Rubik's Cube, primitive actions (turns) affect many variables simultaneously, rendering the goal-count heuristic uninformative. This paper addresses this challenge by learning macro-actions that restore heuristic utility.

Methods: Discovering Focused Macro-Actions

The core of our approach is the discovery of macro-actions with a small effect size. We define effect size as the number of state variables that change after executing a sequence of actions.

Macro Discovery

Before the primary planning phase, the agent performs a bounded search to identify sequences of primitive actions that result in a small net effect size. By adding these "focused" macros to the available action set, we transform the planning problem. If a macro-action can change only one or two variables, the agent can "fix" specific parts of the state without the collateral damage typically caused by primitive moves.

Heuristic Alignment

This strategy shifts the focus from improving the heuristic function to modifying the action space. By providing actions that satisfy the "subgoal independence" assumption, simple heuristics like goal-count become highly effective.

Suitcase Lock and effect size analysis

As shown in the analysis of the "Suitcase Lock" domain in Figure 4, the relationship between action effect size and search effort is stark. When the effect size of actions is small, the number of states generated to find a solution remains low. As the effect size increases, the search space explodes, demonstrating why focused macros are critical for efficiency.

Results

We evaluated our method on PDDLGym benchmarks, the 15-puzzle, and the Rubik's Cube.

Rubik's Cube

The Rubik's Cube represents a significant challenge for black-box planners because a single turn changes 20 state variables. Standard planners using primitive actions failed to solve any instances within a 2-million state limit.

Rubik's Cube benchmark

By discovering focused macros—some of which involve 15+ primitive moves to swap only a few pieces—our planner achieved a 100% solve rate. Remarkably, it generated an average of only 171k states, significantly fewer than the 9.1 million states generated by LAMA, a state-of-the-art planner with full access to the PDDL model.

General Performance

Across PDDLGym domains such as Depot and Gripper, adding focused macros reduced state generation by up to an order of magnitude. The discovered macros often mirrored human-expert strategies, such as the specific "algorithms" used by speedcubers to manipulate small sets of pieces.

Conclusion

This research highlights that the quality of a heuristic is inextricably linked to the available action space. By automatically discovering macro-actions with focused effects, we can leverage simple, computationally inexpensive heuristics to solve complex, high-dimensional problems in black-box environments. Future work will explore multi-level hierarchies and the application of these principles to non-factored state representations like raw pixels.

Summary updated

BibTeX
@inproceedings{allen2021efficient,
  author = {Cameron Allen and Michael Katz and Tim Klinger and George Konidaris and Matthew Riemer and Gerald Tesauro},
  title = {{Efficient Black-Box Planning Using Macro-Actions with Focused Effects}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.24963/ijcai.2021/554},
}
Figure