arXiv:2609.03912cs.AISep 2026

Manuscript Offprint

arXiv:2609.03912

Lose the Order, Keep the Hierarchy: Deordering HTN Plans

Takudzwa Togarepi, Gaspard Quenard, Damien Pellier, Humbert Fiorino

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Hierarchical Task Network (HTN) planning is a powerful planning formalism based on task decomposition. Although most of the literature studied plan generation, comparatively less attention has been paid to post-plan optimization. In particular, plan deordering has been extensively studied in classical planning but remains under-researched in the HTN setting. Plan deordering removes unnecessary ordering constraints between actions in a plan whilst keeping the plan valid. In this paper, we adapt two established plan deordering techniques from classical planning by extending the techniques to account for hierarchical decomposition constraints. We evaluate our proposed approaches on the IPC 2023 Partial-Order HTN benchmarks and we compare them against Optiplan, an HTN planner that generates partially ordered plans directly. Our results show a substantial reduction in number of ordering constraints in both our implementations. Although we also observe a reduction in critical path length, the improvements are less pronounced.

Introduction

Hierarchical Task Network (HTN) planning (Erol, Hendler, and Nau 1994b) is planning by task decomposition; that is, recursively refining complex tasks until they become executable tasks. Among other planning formalisms, HTN planning is generally more expressive than STRIPS-style planning (Erol, Hendler, and Nau 1994a; Georgievski and Aiello 2015).

The main objective of an HTN planner is to determine how to refine an initial abstract (compound) task into a sequence of executable tasks. In simple terms, a plan is a sequence of primitive actions whose execution accomplishes a given task network. Existing HTN planners differ in the way they address an HTN problem. Some encode the given HTN problem into propositional logic in order to exploit existing specialized solvers (Behnke, Höller, and Biundo 2019; Schreiber et al. 2019; Schreiber 2021; Quenard, Pellier, and Fiorino 2024, 2025). Alternatively, other planners make use of heuristic search (Höller et al. 2018, 2019, 2020), whereas others translate HTN problems to a classical planning problem in order to exploit classical planners (Alford et al. 2016; Behnke et al. 2022).

While most HTN planning research has extensively studied plan generation, fewer works have addressed plan optimization (Behnke, Höller, and Biundo 2019; Behnke and Speck 2021). In their recent survey, Bercher, Haslum, and Muise (2024) define plan optimization as the task of improving a plan that has already been generated, and they also highlight several optimization techniques.

In practice, one important aspect of plan quality is plan-order flexibility. In some real-world applications of HTN planning, a totally ordered plan imposes unnecessary ordering constraints at the expense of efficiency. For example, in a firefighting mission, a totally ordered plan could enforce that action dispatch-ground-crew be executed before dispatch-helicopter. However, these two actions do not interfere and thus removing the ordering constraint between these two actions results in a flexible partial-order plan. Executing actions in parallel might improve execution speed and flexibility. This approach of post-plan optimization by removing ordering constraints on a plan while keeping it a valid plan is known as deordering and has been extensively studied in the classical planning sense (Bäckström 1998; Kambhampati and Kedar 1994; Muise, McIlraith, and Beck 2012; Bercher and Olz 2020; Siddiqui and Haslum 2015; Muise, Beck, and McIlraith 2016). In particular, Muise, Beck, and McIlraith (2016) improved deordering methods by using partially weighted MaxSAT which computes the minimal deorderings. A minimum deordering is a deordered plan in which one cannot remove any additional ordering constraints without invalidating the plan.

To the best of our knowledge, no prior work has explicitly studied plan deordering under HTN decomposition constraints. Although there is not much done in terms of HTN plan deordering, a few planners try to pursue a similar goal of having a partially ordered plan. One such planner is OptiPlan by Firsov (2025), which produces a partially ordered plan directly. This motivates our interest in studying deordering in HTN planning. Our contributions in this paper are twofold. First, we adapt the PRF algorithm of Bäckström (1998) to the HTN setting, taking into account the hierarchical decomposition constraints. Second, we compute minimal deorderings using a MaxSAT approach of Muise, McIlraith, and Beck (2012), which we also adapt to the HTN setting.

We evaluate both implementations on the IPC 2023 Partial-Order HTN benchmarks. We apply the deordering techniques to plans generated by PANDA a partial-order planner (Höller 2023). As a baseline, we compare the performance of the post-plan optimization against Optiplan. The results show a significant decrease in both the number of ordering constraints and the critical-path length of the plans in the post-plan optimization.

The remainder of this paper is structured as follows: following this introduction, we introduce the formalisms used throughout the paper. Afterward, we present the two implemented algorithms followed by a discussion of the results. Finally, we provide directions for future work and conclude the paper.

References (26)