Method preconditions specify when a method may be applied in hierarchical task network (HTN) planning, but their meaning differs under two established semantics. The SHOP planners, like the classical HTN formalism of Erol, Hendler and Nau, require the precondition to hold immediately before the method's first action. HDDL, the input language of the International Planning Competition's HTN track, instead introduces an auxiliary action to check it; under partial order, unrelated actions may invalidate the precondition before the method starts. HDDL's designers adopted this weaker semantics because the first-action reading could not easily be compiled. Subsequent work has repeatedly identified its compilation under partial order as an open question, with existing transformations limited to total order. We give a compilation of the first-action semantics into standard partially ordered HTN planning without method preconditions using only two additional facts, thereby resolving a longstanding question in the HTN planning community.
Figures & tables
Figure 1: The running example. Rounded boxes are compound tasks, square boxes are actions, and arrows are ordering constraints. S and M are unordered, and so are U and c in the method of S . The actions a , b , c have no preconditions or effects.
Figure 2: Three linearisations of the example. The small boxes between the actions are the states, green where p holds and red where it does not. Diamonds are checks, drawn at the state in which they are evaluated. (i) is a solution under the HDDL semantics but not under the first-action one; (ii) and (iii) are solutions under both. The vacuous check of mM is omitted. The labels p and ¬p distinguish the states without colour.
Figure 3: Reachable methods of the compiled example. Diamonds are checks, dashed arrows their ordering before the other subtasks, and orange boxes mark the subtask that has to produce the first action and release the lock. The method of MN has no check because mM has no precondition.