Papers
Topics
Authors
Recent
2000 character limit reached

Hierarchical Task Network Planning

Updated 17 November 2025
  • Hierarchical Task Network (HTN) planning is a method that decomposes high-level tasks into primitive actions using a structured task library.
  • It incorporates explicit agent representation to enable parallel task streams and interleaves symbolic planning with geometric validation.
  • HATP enhances classical HTN methods by integrating social rule filtering and cost-minimization techniques to address real-world execution challenges.

Hierarchical Task Network (HTN) planning is a knowledge-intensive paradigm in automated planning that models problem solving as the hierarchical decomposition of tasks into subtasks, ultimately reducing them to primitive, executable actions. HTN planning exploits domain-specific control knowledge provided as a "task library," resulting in substantial reductions to the classical planning search space while supporting more expressive specifications of agent or robot behavior. In the robotics context, and particularly as realized in the HATP ("Hierarchical Agent-based Task Planner") framework, HTN formalism is extended both to treat individual agents as explicit first-class entities and to interleave symbolic planning with practical geometric validation and social constraints for executing high-level instructions in the real world (Lallement et al., 2014).

1. Formal Foundations of HTN Planning

An HTN planning problem is specified as the 5-tuple: P=(S,T,M,s0,G)P = (S,\,T,\,M,\,s_0,\,G) where:

  • SS is the (possibly infinite) set of world states.
  • T=APT = A \cup P is the set of tasks, split into abstract tasks AA and primitive tasks PP.
  • MM is a finite set of methods.
  • s0Ss_0 \in S is the initial state.
  • G=(TG,G)G = (T_G,\,\prec_G) is the initial goal task network, with TGT_G a multiset of tasks and GTG×TG\prec_G \subseteq T_G \times T_G defining a strict partial order among occurrences.

Task networks are given as pairs τ=(Tτ,τ)\tau = (T_\tau,\,\prec_\tau), where TτT_\tau is a multiset of tasks and τ\prec_\tau is an acyclic ordering. Methods have the form: m=(head(m),pre(m),body(m))m = (\mathit{head}(m),\,\mathit{pre}(m),\,\mathit{body}(m)) where head(m)A\mathit{head}(m) \in A is the abstract task being decomposed, pre(m)\mathit{pre}(m) is a conjunction of fluents and external predicates specifying state applicability, and body(m)=(Tm,m)\mathit{body}(m) = (T_m,\,\prec_m) is a subordinate task network.

HTN planning proceeds by iteratively replacing tasks in the current network using applicable methods, subject to preconditions, until the network contains only primitive tasks. These primitives are directly executable actions.

2. Explicit Agent Representation in Task Networks

A key extension of HATP is the explicit designation of agents as first-class parameters in all task symbols. Given a finite set of agent identifiers Ag\mathsf{Ag} (e.g., "robot1", "humanA"), every task and method is parameterized as: tt(agent,arg1,,argk)t \equiv t(\mathsf{agent},\,\mathsf{arg}_1,\,\ldots,\,\mathsf{arg}_k) This encoding allows representation and reasoning about per-agent streams of activity, supports explicit delegation, and naturally enables synchronization constraints, as each agent's task list and plan can be tracked and executed independently.

3. The HATP Planning Algorithm

HATP implements a totally-ordered decomposition search, combined with cost-minimization and practical backtracking. The planner incrementally constructs a plan by recursively selecting a "ready" (predecessor-free) task from the current task network:

  • If the task is primitive, it verifies both logical preconditions and geometric feasibility (via an external GeoCheck module).
  • If abstract, it matches applicable methods (respecting symbolic preconditions), instantiates them, and replaces the task by their body, inheriting partial ordering.
  • The algorithm maintains global variables BestPlan and BestCost, always retaining the lowest-cost successful plan discovered.
  • Backtracking is triggered by inapplicable tasks, failed geometric checks, or violation of imposed constraints.

Pseudocode (abbreviated, see (Lallement et al., 2014) for complete semantics):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function HTN-Search(τ, s, π, cost_so_far):
    if τ is empty:
        if cost_so_far < BestCost:
            BestPlan ← π
            BestCost ← cost_so_far
        return
    t ← select a ready task in τ
    if t is primitive:
        if pre(t) holds in s AND GeoCheck(s, t):
            s' ← apply_effects(t, s)
            c ← cost_function(t)
            if cost_so_far + c < BestCost:
                HTN-Search(τ \ {t}, s', π ⧺ [t], cost_so_far + c)
    else:
        for each method m with head(m) = t:
            for each ground m′ with pre(m′) in s:
                τ_new ← (τ \ {t}) ∪ T_{m′}
                ≺_new ← update orderings
                HTN-Search((τ_new, ≺_new), s, π, cost_so_far)

The recursion depth and number of backtrack points are governed by method branching and geometric feasibility.

4. Extensions for Social and Geometric Validation

4.1 Social Rule Filtering

Domain authors can supply user-defined "social rule" predicates σ:(S×A){true,false}\sigma: (S \times A)^* \rightarrow \{\text{true}, \text{false}\} which are applied post hoc to candidate primitive plans (sequences of actions). These predicates can implement requirements such as:

  • Wasted-Time: bounding the maximum idle steps for any agent.
  • Effort-Balance: requiring actionable cost parity.
  • Undesirable-Sequence: prohibiting specific subsequences (e.g., unsafe handover protocols).

After planning, only those plans satisfying all social rules σi(π)=true\sigma_i(\pi) = \text{true} are retained.

4.2 Geometric Interleaving

Each primitive action is further validated against the continuous robot or agent world model by a geometric feasibility test: GeoCheck:S×P{0,1}\text{GeoCheck}: S \times P \rightarrow \{0,1\} If GeoCheck(s, a) = 1, a collision-free geometric trajectory exists for action a in state s; otherwise, the plan is infeasible and backtracking is invoked. This integration ensures that planned actions are not merely symbolically possible but are also physically executable.

5. Illustrative Example: "Serve Coffee" Domain

Consider an instance with agents Ag = {Robot, Human}, primitive actions Move, Pick, Place, and an abstract task ServeCoffee.

  • Methods for ServeCoffee include:
    • m1m_1: Make-and-serve sequence: first MakeCoffee(r), then Deliver(r, h, L).
    • m2m_2: If ReadyMug(h, L), reduce to a Pick/Move/Place sequence with precondition ReadyMug(h, L), enforcing proper partitioning of action based on the mug's location.

One decomposition step:

  • τ₀ = (ServeCoffee(Human, Robot, Table)), s₀ initial state.
  • m₂ is chosen if ReadyMug(Human, Table) holds.
  • ServeCoffee is replaced by Pick, Move, Place in order.
  • For each primitive, preconditions are checked, then GeoCheck is invoked (e.g., can the robot's manipulator reach the mug?).
  • If an action fails GeoCheck (e.g., Move fails due to an obstacle), HATP may backtrack either locally (by trying a different trajectory for Move) or globally (by discarding m₂ and trying m₁ instead).
  • Upon constructing a complete plan, social rules are applied; plans failing these constraints are rejected.

6. Implementation Issues and Practical Considerations

  • The agent-centric parameterization ensures each agent's plan can be executed, monitored, and resynchronized in parallel.
  • Social rule filters are currently applied after plan generation; integrating these checks during search would enable earlier pruning of infeasible behavioral branches.
  • The framework supports backtracking along both the symbolic decomposition tree and the geometric validation layer, but heuristics for efficient combined backtracking remain an open research question.
  • Optimality is maintained via cost-accumulation and backtracking but is limited by the depth and breadth of the method set and the feasibility of geometric solutions.

7. Limitations, Open Questions, and Extensions

  • Native support for partially ordered (PO) task expansion is not intrinsic; current approaches enumerate all linearizations, limiting scalability on highly concurrent domains.
  • The distinction between post-hoc and online social rule enforcement raises the possibility of integrating social criteria into the expansion/search policy directly.
  • Combined symbolic/geometric backtracking strategies lack formal comparison and guiding heuristics; principled methods for hybrid reasoning are an area for further investigation.
  • There is ongoing work on extensions for epistemic planning (reasoning about agents' beliefs) and for richer integration with multiagent execution and observation models.

HTN representations, as extended for robotics in HATP, offer a powerful bridge between high-level, human-interpretable instructions and robust, executable multiagent plans. The incorporation of agent-first semantics, social acceptability metrics, and geometric feasibility constraints significantly advances the applicability of HTN planning in real-world, embodied environments, particularly in human-robot interaction scenarios (Lallement et al., 2014).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)
Forward Email Streamline Icon: https://streamlinehq.com

Follow Topic

Get notified by email when new papers are published related to Hierarchical Task Network (HTN).