Hierarchical Task Plans (HTPs)
- Hierarchical Task Plans (HTPs) are formal models that decompose high-level goals into sequences of primitive actions using explicit domain control knowledge.
- They employ recursive decomposition via methods and schemas, enabling precise task ordering and optimization through matchability checks.
- Empirical evaluations show that matchability-based pruning in HTPs dramatically reduces redundant search branches, enhancing efficiency in robotics and logistics domains.
Hierarchical Task Plans (HTPs) are formal models and algorithmic frameworks for structuring, reasoning, and planning with complex, multi-level, and often partially ordered sets of tasks. HTPs support systematic decomposition of high-level goals into coordinated sequences of primitive actions, using explicit domain control knowledge in the form of methods or schemas. The resulting plans can exploit both domain-specific strategies and search-based optimization, and offer a unifying foundation for classical, temporal, probabilistic, and reactive planning.
1. Formal Foundations and Semantics
Hierarchical Task Plans are generally defined as partially or totally ordered networks of tasks, consisting of primitive and compound tasks, over a suitable planning domain. Primitive tasks correspond directly to executable operators; compound tasks must be recursively decomposed via a library of methods. A formal HTP model (in the standard HTN sense) specifies:
- Task: , where is a task symbol, and each is a term. Primitive tasks have (the set of operator symbols); otherwise, they are nonprimitive.
- Task Network: , with a set of task nodes and a set of ordering and state constraints. A network is primitive iff every is primitive.
- Operator: $o = (\operatorname{name}(o), \pre(o), \eff(o))$, mapping to preconditions and effects.
- HTN Method: $m = (\operatorname{name}(m), \task(m), \subtasks(m), \constr(m))$, where 0 is a nonprimitive task symbol, and 1 is a (possibly nonprimitive) task network.
- HTN Domain: 2; HTN Problem: 3 with initial state 4 and initial task network 5 (Georgievski et al., 2011).
Execution proceeds by repeated decomposition of nonprimitive tasks until only primitive tasks remain, yielding an ordered plan executable from 6 by sequentially applying operators. Ordering and state constraints guide legal interleavings, and support both total-order and partial-order solutions (Georgievski et al., 2014).
2. Task Interaction and Search Space Pruning
A key challenge in HTPs lies in handling redundant subplans and unnecessary task repetition due to repeated decompositions and interleaving. The “matchability” criterion, as developed in eJSHOP2 (Georgievski et al., 2011), formalizes when a primitive task can be omitted if its effects already hold, as follows:
- Maintain an agenda 7 of effects achieved by previously chosen operators.
- A primitive task 8 is matchable at step 9 iff an earlier executed operator 0 is the same instance as 1 and 2.
- Prune matchable tasks, since their intended effects are guaranteed by causal history. The plan remains sound and complete, as no new state is achievable via redundant execution.
Analytically, matchability can yield a combinatorial reduction in the interleaving space. With 3 primitive tasks and 4 identical tasks, pruning all but one reduces interleavings from 5 to 6, providing exponential savings in practice when repeated actions are common, as experimentally observed in Dock-Worker Robot domains (Georgievski et al., 2011).
3. Modified Planning Algorithm for Task Matchability
The extended JSHOP2 planner (eJSHOP2) (Georgievski et al., 2011) modifies the classic depth-first HTN algorithm as follows:
- Before interleaving a primitive task, check for matchability using the current agenda.
- If matchable, prune the task and recurse on the remainder of the task network.
- For nonprimitive tasks, track which methods have been reduced at a given point to prevent redundant exploration of identical decompositions.
The key pseudocode fragment: 4 This ensures completeness (all solutions found), and soundness (no plan with invalid state) because only strictly redundant tasks—those rendered unnecessary by identical previous execution—are pruned (Georgievski et al., 2011).
4. Complexity Analysis and Empirical Evaluation
Theoretical and experimental results indicate the impact of matchability-based pruning:
- Complexity: In standard SHOP2, 7 identical primitive tasks among 8 may be interleaved in 9 ways; pruning all but the first reduces this to 0, removing a factor of 1 redundant permutations.
- Performance:
- On the Logistics domain, eJSHOP2 incurs a modest overhead (due to pruning checks), being 2 slower than JSHOP2, but the difference is negligible since repeated actions are rare.
- On the Dock-Worker Robot domain with many repeated load/unload operations, eJSHOP2 achieves up to 3 speedups over JSHOP2, sometimes being the only configuration to complete due to the inability of standard planners to handle the combinatorial blowup (Georgievski et al., 2011).
These results indicate that incorporating matchability checks simplifies domain authoring (less need for domain-specific "phantomization" methods) and provides substantial empirical gains in domains characterized by action repetition.
5. Domain Knowledge, Applicability, and Expressiveness
HTPs rely critically on the richness and structure of domain knowledge encoded via methods, preconditions, and task constraints. The planner depends on:
- Expressive Domains: A well-specified library of methods and operators (including preconditions/effects constraints).
- Avoidance of Domain-Encoded Redundancy: By handling matchability internally, eJSHOP2 eliminates the need for domain writers to encode phantom tasks or bespoke pruning, both reducing the cognitive burden on domain modelers and ensuring correctness is enforced at the inference level (Georgievski et al., 2011).
- Competence and Soundness: The extended semantics preserve both soundness (only valid plans generated) and completeness (no solution omitted if non-redundant).
These elements enable practical deployment in real-world domains such as home/building automation and robotics, where repeated operations and task interaction are prevalent.
6. Broader Impact and Future Research Directions
The matchability-based extension to HTN planning underscores the importance of reasoning about task interactions at the inference engine level, rather than at the domain representation level. This approach:
- Simplifies domain models: Fewer "phantomization" tricks or redundancy-avoiding methods required.
- Scales to domains with repeated actions: Exponential reductions in redundant search branches.
- Provides a template for further interaction handling: Extensions could include more general forms of state-based optimization, redundancy elimination, and dynamic task matching.
A plausible extension is the integration of more generalized task interaction handling (e.g., partial matchability, non-identical effects, or temporal overlap) and the combination with probabilistic or preference-based frameworks to capture user intentions and real-world uncertainty (Li et al., 2010).
References:
- "Task Interaction in an HTN Planner" (Georgievski et al., 2011)