Manuscript Offprint
arXiv:2609.03938Towards Numerical TOHTN Planning with SMT-based HTN-SAT Encoding
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
While HTN planning has received significant attention in recent years, support for numerical reasoning remains very limited. In this paper, we investigate numerical Totally-Ordered HTN (TOHTN) planning and show how standard SAT-based encodings can be naturally extended with SMT to handle numeric fluents. In addition, we introduce a benchmark suite for numerical TOHTN planning, providing a first common basis for evaluation in this setting. Experimental results show that this simple encoding already constitutes a competitive baseline. This work opens the way to more expressive approaches to HTN planning.
Introduction
Hierarchical Task Network (HTN) planning (Erol, Hendler, and Nau 1994) is a planning paradigm that decomposes complex tasks into simpler subtasks using domain-specific knowledge. Unlike classical planning, HTN introduces abstract tasks, which cannot be executed directly, and methods, which describe how these tasks can be refined into partially ordered sets of subtasks including both primitive tasks (i.e., executable actions) and additional abstract tasks that must themselves be recursively refined. The objective of an HTN planner is to iteratively decompose an initial abstract task into a valid plan (i.e., an executable sequence of primitive tasks). In this paper, we focus our investigation on Totally-Ordered HTN (TOHTN) planning, a highly popular subclass of HTN problems where the decomposition methods specify a totally-ordered list of primitive actions and abstract tasks to be executed in order to achieve an abstract task.
While HTN planning is a central topic in automated planning and has been included in recent editions of the International Planning Competition (IPC) (Behnke et al. 2019; Taitler et al. 2024), it still suffers from important modeling limitations compared to classical planning formalisms. In particular, numerical and temporal features (such as resource management, costs, and durations) introduced in classical planning with PDDL2.1 (Fox and Long 2003) are absent from most HTN planners. Although some work has investigated the integration of temporal aspects into HTN planning (Pellier et al. 2022), the formalization of temporal HTN remains an active research topic, and current proposals have not yet reached broad adoption. In contrast, numerical reasoning (e.g., through numerical constraints over the precon-
ditions and effects of primitive tasks) can be naturally incorporated, but has received little attention so far. These features are essential in many real-world applications, including logistics, robotics, and scheduling, where reasoning about quantities is required. To the best of our knowledge, only Siadex (Castillo et al. 2006) and Aries (Bit-Monnot 2023) support numerical reasoning in HTN planning. This limitation restricts the applicability of HTN planning to realistic domains.
In this paper, we propose to extend SAT-based TOHTN planning to handle numerical constraints by leveraging Satisfiability Modulo Theories (SMT). SAT-based approaches have shown strong performance in recent years in TOHTN planning due to both the efficiency of modern solvers and improved encodings and search strategies (Schreiber et al. 2019; Behnke, Höller, and Biundo 2018; Schreiber 2021; Behnke 2021; Quenard, Pellier, and Fiorino 2024, 2025), but they are inherently limited to propositional representations. In contrast to heuristic-search-based approaches, which typically require substantial adaptations to handle numerical reasoning, SAT-based methods can be more naturally extended by lifting the encoding to SMT, without fundamentally modifying the search procedure. By moving to SMT, we enable reasoning over numerical variables while preserving the benefits of logical encodings. In this paper, we introduce a new encoding that extends SAT-based TOHTN planning to handle numerical variables and constraints using an SMT solver. Additionally we design and provide seven numerical TOHTN benchmarks to evaluate these approaches. We experimentally show that our SMT-based encoding enables solving numerical TOHTN problems more efficiently than existing numerical HTN planners.
This paper is organized as follows: first, we introduce the concept of numerical TOHTN planning. Next, we describe the basic incremental encoding used by current SAT-based TOHTN planners to find a solution. Then, we explain how this encoding can be modified to support numerical constraints. Finally, we compare this approach with other numerical HTN planners.
Tasks, Actions, Methods, Numeric Fluents, and Task Networks
Tasks are central to HTN planning. A task is defined by a name and parameters. Tasks are either primitive or abstract: primitive tasks directly affect the state of the world, while abstract tasks do not; instead, they must be decomposed into primitive tasks using methods before they can be executed.
We assume a finite set of propositions and a finite set of numeric fluents. A numeric expression over is built from constants and fluents in using the arithmetic operators . A numeric constraint is an expression of the form , where is a numeric fluent, is a numeric expression, and .
A primitive task is analogous to an action in classical planning and is defined by a tuple . Its preconditions consist of a set of propositional preconditions and a set of numeric constraints . Its effects consist of add and delete effects over propositions and a set of numeric effects . In this work, we restrict numeric effects to assignment effects of the form , where and is a numeric expression over .
A state is defined as a pair where is the set of propositions true in the state, and is a valuation function assigning a real value to each numeric fluent. A task is executable in iff and , i.e., all numeric constraints in are satisfied under . If a task is executable in a state , applying its effects yields a new state , where and is obtained by applying to .
A method indicates how an abstract task can be refined into a task network , called the subtasks of . For notation purposes, we define as the set of all methods that can be applied to decompose the abstract task .
Planning Problem and Solution
Definition 1 (TOHTN Planning Problem) A numerical TOHTN planning problem is a tuple where: is a finite set of propositions; is a finite set of numeric fluents; is a finite set of abstract tasks; is a finite set of primitive tasks; is a finite set of decomposition methods; is the initial abstract task to be decomposed; is the initial state; and is the goal condition, where is a set of propositions and is a set of numeric constraints.
Definition 2 (TOHTN Planning Problem Solution) A solution to a numerical TOHTN planning problem is a primitive task network such that:
-
is obtained by refining using methods,
-
is executable in ,
-
reaches the goal after execution.
SAT-based Search in TOHTN
HTN planning can be naturally represented as an AND/OR tree (Ghallab, Nau, and Traverso 2004), where the root contains the initial abstract task. This tree represents a finite fragment of the potentially infinite decompositions of the initial abstract task, and is incrementally expanded during search. OR nodes correspond to abstract tasks with multiple possible decompositions (methods), while AND nodes represent methods whose subtasks must all be achieved. A valid plan is obtained by selecting exactly one child for each OR node and all children for each AND node, such that the leaves form a sequence of primitive actions achieving the goal. An example of such AND/OR tree is given in the left side of Figure 1. This tree is not fully developed here, since the abstract task is undeveloped.
In SAT-based HTN planning, the AND/OR tree is encoded into a SAT formula that is satisfiable iff a solution exists within it, with the satisfying assignment yielding the plan. However, the AND/OR tree alone is insufficient for current encodings. Indeed, clauses must capture action transitions, ensuring preconditions hold at execution time and effects are applied. All current SAT-based HTN planners address this by assigning each task a discrete time step indicating when it may execute; something the AND/OR tree's structural representation does not provide.
That is why all current HTN-SAT planners rely on a structure introduced independently in TreeRex and totSAT (Schreiber et al. 2019; Behnke, Höller, and Biundo 2018), which is equivalent to the AND/OR tree while making execution time steps explicit. We call this structure a Compact Path Decomposition Tree (cPDT); its nodes may contain multiple tasks and are organized as follows:
-
The root node contains only the initial abstract task .
-
To expand a node , its children are built as follows:
-
For each abstract task in and each method decomposing into subtasks , the -th child of contains task .
-
For each primitive task in , the first child of contains .
The cPDT guarantees that for any task at leaf , all tasks that must precede appear at leaves with , and all that must follow appear at with . Consequently, a left-to-right scan of the leaves reveals all possible plans encoded in the cPDT. The cPDT corresponding to the AND/OR tree of Figure 1 is shown on its right side.
We now present an incremental encoding, capturing the core ideas shared by current HTN-SAT encodings (Schreiber et al. 2019; Behnke, Höller, and Biundo 2018; Schreiber 2021), that determines whether a solution exists in a given cPDT. This encoding serves as the basis for the numerical extension introduced next. For each cPDT node , we use Boolean variables indicating that task is active at , variables indicating that proposition holds at , and an auxiliary variable indicating that a primitive

Figure 1: On the left, a simple decomposition schema in the form of an AND/OR tree, where denotes abstract task , denotes method and denotes action . On the right, we represent the corresponding cPDT. An identical potential solution for both structures is highlighted in blue.
task is active in . When is a primitive task, we write it as ; when is an abstract task, we write it as . For any leaf , we denote by the leaf executed immediately after in the left-to-right order induced by the decomposition hierarchy. To handle the goal state, we introduce a special virtual node , representing the goal. Thus, for any node that has no successor, we define . As shown in Figure 1, there may exist solutions in which no task is active at a given position. To handle this case, we introduce a special action such that . This action is treated like a normal action in the encoding, but it is ignored in the final plan. We write to denote that no task is active at node .
Initial task, initial state, and goal. At the root node , the initial task and initial state must hold, and the goal must hold at :
Leaf constraints. For every leaf node , exactly one task is active at :
If a primitive task is active in , then its preconditions must hold at and its effects at :
Frame axioms ensure that if a fact changes value between a node and its successor, it must be explained by a specific
action that can change this fact or an abstract task:
Finally, if an action is chosen on this position, this node is primitive:
Hierarchical constraints. Let be an expanded node with children . Facts hold in iff they hold in its first child:
If an abstract task is selected at , then exactly one applicable method must be chosen to decompose this task, its subtasks must be assigned to the children in order, and all remaining children must receive :
If a primitive task is selected at (including ), it is propagated to the first child and remaining children receive :
Primitivity of the leaves. Finally, in order to obtain a solution, all leaves must contain primitive actions.
The clauses ensuring the initial task, initial state, and goal are generated only during the first encoding of the cPDT, whereas the clause ensuring the primitivity of the leaves is provided only as assumptions (temporary hypotheses active during a single SAT call). All other clauses remain valid after extending the cPDT. When the cPDT is expanded, hierarchical constraints are generated for the newly expanded nodes, and leaf constraints are generated for the new leaf positions (i.e., the children of the expanded nodes).
SMT Extension for Numerical TOHTN
To extend the previous SAT encoding to numerical TOHTN, we introduce for each node and each numeric fluent a numeric variable denoting the value of at . For any numeric expression or constraint , we write for the arithmetic expression or constraint obtained by replacing each fluent occurring in by the numerical variable .
Initial numeric state and numeric goal. The initial valuation of the numeric fluents is encoded at the root node:
Each numeric goal constraint must hold at the goal node :
Numeric leaf constraints. If a primitive task is active at leaf node , then its numeric preconditions must hold at :
If is active at , then each numeric effect of the form determines the value of at :
Numeric frame axioms. For each leaf node and each fluent , the value of can change between and only if the selected task is abstract or a primitive action that can modify :
Numeric hierarchical constraints. As in the propositional case, numeric fluent values are constrained to be equal between a node and its first child :
All Boolean clauses from the SAT encoding remain unchanged. The numeric clauses described above are generated following the same incremental scheme: the initial numeric state and numeric goal clauses are generated once at the first encoding, while the numeric precondition, effect, and frame axiom clauses are generated for each new leaf node as the cPDT is extended and numerical hierarchical constraints are generated for the newly expanded nodes.
Evaluation
We compare our approach with the two numerical HTN planners available to us. The evaluation involves three planners: SibylSmt, our planner using the encoding described above with the Z3 SMT solver (De Moura and Björner 2008) and a BFS exploration (i.e., expanding all nodes of the cPDT if no solution is found); Siadex (Castillo et al. 2006), an HTN planner derived from SHOP (Nau et al.
1999, 2003) with constraint-based reasoning; and Aries (Bit-Monnot 2023), a hybrid CP/SAT planner. Experiments were run on an Intel Core i7-12700H with 32GB RAM, with a 10-minute time limit per instance.
To the best of our knowledge, no standard benchmark suite exists for numerical HTN planning. We therefore introduce seven numerical HTN benchmark families, each with an instance generator. For example, TRANSPORT-FUEL models fuel-limited delivery with possible refueling, while TRANSVASEMENT captures water-jug-style transfers (reaching a target quantity in a specific container by pouring between containers of different capacities).
| Domain | SibylSmt | Aries | Siadex | |
|---|---|---|---|---|
| Alchemy | 20 | 10.54 | 7.79 | 12.82 |
| Backpack | 20 | 9.99 | 4.59 | 0 |
| Gripper-colors | 20 | 9.54 | 7.82 | 6.81 |
| Minecraft | 20 | 9.11 | 4.09 | 19.91 |
| Overcooked | 20 | 12.58 | 0 | 1 |
| Transport-Fuel | 20 | 7.89 | 1.61 | 0 |
| Transvasement | 20 | 7.17 | 5.82 | 0 |
| Coverage | 140 | 91 | 48 | 42 |
| Agile score | 140 | 66.82 | 31.72 | 40.54 |
Table 1: Performance of each planner on the numerical benchmark suite. Each cell reports the agile score per domain. Total coverage and agile score are shown in the last two rows. Agile score is computed as if a plan is found, and 0 otherwise, where is the time limit and the solving time (in seconds).
Results are shown in Table 1. Our approach achieves higher coverage and agile scores (reflecting how quickly a planner finds a solution) than the other planners on most benchmarks, suggesting that it is a promising direction for numerical HTN problems. In particular, it appears more robust, being able to solve multiple instances across all benchmark families, while the other planners fail on some domains. Siadex notably struggles on recursive domains with strong combinatorial branching, where the choice of decomposition methods is not easily guided by the current state. Finally, none of the planners saturate all the benchmarks, leaving significant room for improvement and the development of more powerful approaches.
Conclusion
Numerical reasoning is essential in many planning applications, yet remains largely underexplored in HTN planning. We introduced a benchmark suite for numerical TOHTN and a simple SMT-based extension of HTN-SAT encodings to handle numeric fluents. This provides a baseline for future work and enables empirical comparison on shared instances. We hope this work encourages further research on expressive HTN models and stronger planners and benchmarks for numerical hierarchical planning.
https://github.com/gaspard-quenard/sibylsat
https://github.com/gaspard-quenard/HTN-Numerical-Benchmarks
References
Behnke, G. 2021. Block compression and invariant pruning for SAT-based totally-ordered HTN planning. In Proceedings of the International Conference on Automated Planning and Scheduling, volume 31, 25–35.
Behnke, G.; Höller, D.; Bercher, P.; Biundo, S.; Pellier, D.; Fiorino, H.; and Alford, R. 2019. Hierarchical planning in the IPC. In Workshop on HTN Planning (ICAPS).
Behnke, G.; Höller, D.; and Biundo, S. 2018. totSAT-Totally-ordered hierarchical planning through SAT. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 32.
Bit-Monnot, A. 2023. Experimenting with Lifted Plan-Space Planning as Scheduling: Aries in the 2023 IPC. In 2023 International Planning Competition at the 33rd International Conference on Automated Planning and Scheduling.
Castillo, L. A.; Fernández-Olivares, J.; Garcia-Perez, O.; and Palao, F. 2006. Efficiently Handling Temporal Knowledge in an HTN Planner. In ICAPS, 63–72.
De Moura, L.; and Björner, N. 2008. Z3: An efficient SMT solver. In International conference on Tools and Algorithms for the Construction and Analysis of Systems, 337–340. Springer.
Erol, K.; Hendler, J. A.; and Nau, D. S. 1994. UMCP: A Sound and Complete Procedure for Hierarchical Task-network Planning. In Aips, volume 94, 249–254.
Fox, M.; and Long, D. 2003. PDDL2. 1: An extension to PDDL for expressing temporal planning domains. Journal of artificial intelligence research, 20: 61–124.
Ghallab, M.; Nau, D.; and Traverso, P. 2004. Automated Planning: theory and practice. Elsevier.
Nau, D.; Cao, Y.; Lotem, A.; and Munoz-Avila, H. 1999. SHOP: Simple hierarchical ordered planner. In Proceedings of the 16th international joint conference on Artificial intelligence-Volume 2, 968–973.
Nau, D. S.; Au, T.-C.; Ilghami, O.; Kuter, U.; Murdock, J. W.; Wu, D.; and Yaman, F. 2003. SHOP2: An HTN planning system. Journal of artificial intelligence research, 20: 379–404.
Pellier, D.; Fiorino, H.; Grand, M.; Albore, A.; and Bailon-Ruiz, R. 2022. HDDL 2.1: Towards Defining an HTN Formalism with Time. arXiv preprint arXiv:2206.01822.
Quenard, G.; Pellier, D.; and Fiorino, H. 2024. SibylSat: Using SAT as an Oracle to Perform a Greedy Search on TO-HTN Planning. In 27th European Conference on Artificial Intelligence, volume 392, 4157–4164.
Quenard, G.; Pellier, D.; and Fiorino, H. 2025. SibylSatOpt: a MaxSAT-based Greedy Optimal Search for TOHTN Planning. In Proceedings of the International Conference on Automated Planning and Scheduling, volume 35, 236–244.
Schreiber, D. 2021. Lilotane: A lifted SAT-based approach to hierarchical planning. Journal of artificial intelligence research, 70: 1117–1181.
Schreiber, D.; Pellier, D.; Fiorino, H.; et al. 2019. Tree-REX: SAT-based tree exploration for efficient and high-quality HTN planning. In Proceedings of the International Conference on Automated Planning and Scheduling, volume 29, 382–390.
Taitler, A.; Alford, R.; Espasa, J.; Behnke, G.; Fišer, D.; Gimelfarb, M.; Pommerening, F.; Sanner, S.; Scala, E.; Schreiber, D.; et al. 2024. The 2023 international planning competition.