tutorial: an introduction to hierarchical task network ... · single-agent just one kind of action!...

245
About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning Pascal Bercher and Daniel H¨ oller Institute of Artificial Intelligence, Ulm University, Germany June 25th, ICAPS 2018 (Delft) Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 1 / 73

Upload: others

Post on 25-Aug-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tutorial: An Introduction to Hierarchical TaskNetwork (HTN) Planning

Pascal Bercher and Daniel Holler

Institute of Artificial Intelligence,Ulm University, Germany

June 25th, ICAPS 2018 (Delft)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 1 / 73

Page 2: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Target Audience

Everyone (beginner or expert) who is familiar with the basics ofclassical planning!

We assume prior knowledge about:

standard problem definition and semantics of classical planning

heuristics, esp. delete relaxation

search strategies (A*, greedy, etc.)

basic complexity theory (Chomsky hierarchy, automata, etc.)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 2 / 73

Page 3: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Target Audience

Everyone (beginner or expert) who is familiar with the basics ofclassical planning!

We assume prior knowledge about:

standard problem definition and semantics of classical planning

heuristics, esp. delete relaxation

search strategies (A*, greedy, etc.)

basic complexity theory (Chomsky hierarchy, automata, etc.)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 2 / 73

Page 4: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Target Audience

Everyone (beginner or expert) who is familiar with the basics ofclassical planning!

We assume prior knowledge about:

standard problem definition and semantics of classical planning

heuristics, esp. delete relaxation

search strategies (A*, greedy, etc.)

basic complexity theory (Chomsky hierarchy, automata, etc.)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 2 / 73

Page 5: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Target Audience

Everyone (beginner or expert) who is familiar with the basics ofclassical planning!

We assume prior knowledge about:

standard problem definition and semantics of classical planning

heuristics, esp. delete relaxation

search strategies (A*, greedy, etc.)

basic complexity theory (Chomsky hierarchy, automata, etc.)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 2 / 73

Page 6: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Goals of the Tutorial

Obtain most relevant basics of the most-commonly known hierarchicalplanning formalization – HTN planning:

understand the core differences to non-hierarchical (classical)planning: HTN planning is not (just) a planning technique!

learn basic theoretical properties of HTN planning:hardness of the problem(s), expressivity

learn the most important solving techniques

obtain some ideas on how to design heuristics (why is it morecomplicated than in non-hierarchical planning?)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 3 / 73

Page 7: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Goals of the Tutorial

Obtain most relevant basics of the most-commonly known hierarchicalplanning formalization – HTN planning:

understand the core differences to non-hierarchical (classical)planning: HTN planning is not (just) a planning technique!

learn basic theoretical properties of HTN planning:hardness of the problem(s), expressivity

learn the most important solving techniques

obtain some ideas on how to design heuristics (why is it morecomplicated than in non-hierarchical planning?)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 3 / 73

Page 8: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Goals of the Tutorial

Obtain most relevant basics of the most-commonly known hierarchicalplanning formalization – HTN planning:

understand the core differences to non-hierarchical (classical)planning: HTN planning is not (just) a planning technique!

learn basic theoretical properties of HTN planning:hardness of the problem(s), expressivity

learn the most important solving techniques

obtain some ideas on how to design heuristics (why is it morecomplicated than in non-hierarchical planning?)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 3 / 73

Page 9: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Goals of the Tutorial

Obtain most relevant basics of the most-commonly known hierarchicalplanning formalization – HTN planning:

understand the core differences to non-hierarchical (classical)planning: HTN planning is not (just) a planning technique!

learn basic theoretical properties of HTN planning:hardness of the problem(s), expressivity

learn the most important solving techniques

obtain some ideas on how to design heuristics (why is it morecomplicated than in non-hierarchical planning?)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 3 / 73

Page 10: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Goals of the Tutorial

Obtain most relevant basics of the most-commonly known hierarchicalplanning formalization – HTN planning:

understand the core differences to non-hierarchical (classical)planning: HTN planning is not (just) a planning technique!

learn basic theoretical properties of HTN planning:hardness of the problem(s), expressivity

learn the most important solving techniques

obtain some ideas on how to design heuristics (why is it morecomplicated than in non-hierarchical planning?)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 3 / 73

Page 11: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Outline

Part I: Theoretical Foundations

Problem Definition(s)

Computational Complexity of Plan Existence Problem

Expressivity Analysis

Part II: Practice

Solution Techniques

Heuristics

Excursion: Further Hierarchical Planning Formalisms

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 4 / 73

Page 12: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Overview Part I

Theoretical Foundations

Introduction

Problem DefinitionComputational Complexity of the Plan Existence Problem

General HTN PlanningHTN Planning with Task InsertionTotally Ordered HTN PlanningRestricting Recursion (Acyclic, Regular, Tail-recursive)

Expressivity Analysis

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 5 / 73

Page 13: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Non-Hierarchical Classical Planning

Classical Planning (Recap)

Environment:

Fully observable

Discrete (no time or resources)

Deterministic

Single-agent

Just one kind of action!

Planning:

Offline

Usually ground and via progression search

Solutions are action sequences

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 6 / 73

Page 14: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Non-Hierarchical Classical Planning

Classical Planning (Recap)

Environment:

Fully observable

Discrete (no time or resources)

Deterministic

Single-agent

Just one kind of action!

Planning:

Offline

Usually ground and via progression search

Solutions are action sequences

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 6 / 73

Page 15: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Non-Hierarchical Classical Planning

Classical Planning (Recap, cont’d)

Problem formalization, P = (V , sI ,A, g):

Set of state variables V

Initial state sI ∈ 2V

Set of actions A, a ∈ A has the form (prec, add , del) ∈ (2V )3

An action (prec, add , del) is executable in a state s ∈ 2V iffprec ⊆ s. Its application to s results into the state (s \ del)∪ add .Executability of task sequences defined analogously

Goal description g ⊆ V

solution:sI s⊇g

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 7 / 73

Page 16: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Hierarchical Planning – Motivation

Informal Problem Definition

What is hierarchical planning, anyway?

Here: the model specifies a task hierarchy : compound (or complex,abstract, high-level) tasks need to be decomposed into primitive tasks.

pick(?obj,?from)

¬handopen

holding(?obj)

¬at(?obj,?from)

at(?obj,?from)

handopenplace(?obj,?to)

handopen

¬holding(?obj)

at(?obj,?to)

holding(?obj)<

move(?obj, ?from, ?to)

move(?obj, ?from, ?to)at(?obj,?to)¬at(?obj,?from)at(?obj,?from)

Problem given as a compound task (or a set of compound and/orprimitive tasks).

Goal: Finding a (primitive) executable refinement.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 8 / 73

Page 17: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Hierarchical Planning – Motivation

Motivation

Why relying on a hierarchical model?

More flexibility with regard to modeling approach: incorporateprocedural expert knowledge (just as a modeling means, or tospeed up search)

Describe more complex behavior (i.e., pose complex restrictionson the desired solutions)

Allow easier user integration in the plan generation process(mixed initiative planning; MIP)

Communicate plans on different levels of abstraction

Incorporate task abstraction in plan explanations

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 9 / 73

Page 18: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Hierarchical Planning – Motivation

Motivation

Why relying on a hierarchical model?

More flexibility with regard to modeling approach: incorporateprocedural expert knowledge (just as a modeling means, or tospeed up search)

Describe more complex behavior (i.e., pose complex restrictionson the desired solutions)

Allow easier user integration in the plan generation process(mixed initiative planning; MIP)

Communicate plans on different levels of abstraction

Incorporate task abstraction in plan explanations

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 9 / 73

Page 19: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Hierarchical Planning – Motivation

Motivation

Why relying on a hierarchical model?

More flexibility with regard to modeling approach: incorporateprocedural expert knowledge (just as a modeling means, or tospeed up search)

Describe more complex behavior (i.e., pose complex restrictionson the desired solutions)

Allow easier user integration in the plan generation process(mixed initiative planning; MIP)

Communicate plans on different levels of abstraction

Incorporate task abstraction in plan explanations

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 9 / 73

Page 20: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Hierarchical Planning – Motivation

Motivation

Why relying on a hierarchical model?

More flexibility with regard to modeling approach: incorporateprocedural expert knowledge (just as a modeling means, or tospeed up search)

Describe more complex behavior (i.e., pose complex restrictionson the desired solutions)

Allow easier user integration in the plan generation process(mixed initiative planning; MIP)

Communicate plans on different levels of abstraction

Incorporate task abstraction in plan explanations

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 9 / 73

Page 21: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Hierarchical Planning – Motivation

Motivation

Why relying on a hierarchical model?

More flexibility with regard to modeling approach: incorporateprocedural expert knowledge (just as a modeling means, or tospeed up search)

Describe more complex behavior (i.e., pose complex restrictionson the desired solutions)

Allow easier user integration in the plan generation process(mixed initiative planning; MIP)

Communicate plans on different levels of abstraction

Incorporate task abstraction in plan explanations

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 9 / 73

Page 22: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Overview Part I

Theoretical Foundations

Introduction

Problem DefinitionComputational Complexity of the Plan Existence Problem

General HTN PlanningHTN Planning with Task InsertionTotally Ordered HTN PlanningRestricting Recursion (Acyclic, Regular, Tail-recursive)

Expressivity Analysis

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 10 / 73

Page 23: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

HTN Planning vs. Classical Planning

“HTN planners differ from classical planners in what they plan for andhow they plan for it. In an HTN planner, the objective is not to achieve aset of goals but instead to perform some set of tasks.”

(Ghallab, Nau, and Traverso; Automated Planning: Theory and Practice)

Main differences to classical planning problems:

It’s not about generating some goal state! The goal is find arefinement of the initial task(s), not to satisfy some goal description

There is no arbitrary task insertion: to alter task networks, we needto decompose compound tasks using their pre-defined methods

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 11 / 73

Page 24: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

HTN Planning vs. Classical Planning

“HTN planners differ from classical planners in what they plan for andhow they plan for it. In an HTN planner, the objective is not to achieve aset of goals but instead to perform some set of tasks.”

(Ghallab, Nau, and Traverso; Automated Planning: Theory and Practice)

Main differences to classical planning problems:

It’s not about generating some goal state! The goal is find arefinement of the initial task(s), not to satisfy some goal description

There is no arbitrary task insertion: to alter task networks, we needto decompose compound tasks using their pre-defined methods

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 11 / 73

Page 25: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

HTN Planning vs. Classical Planning

“HTN planners differ from classical planners in what they plan for andhow they plan for it. In an HTN planner, the objective is not to achieve aset of goals but instead to perform some set of tasks.”

(Ghallab, Nau, and Traverso; Automated Planning: Theory and Practice)

Main differences to classical planning problems:

It’s not about generating some goal state! The goal is find arefinement of the initial task(s), not to satisfy some goal description

There is no arbitrary task insertion: to alter task networks, we needto decompose compound tasks using their pre-defined methods

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 11 / 73

Page 26: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

Problem Definition & Solution Criteria

P = (V ,P, δ,C,M, sI , cI)

V a set of state variables

P a set of primitive task namesδ : P → (2V )3 the task name mappingC a set of compound task namescI ∈ C the initial taskM ⊆ C × 2TN the methodssI ⊆ V the initial state

A solution task network tn must:

be a refinement of cI ,only contain primitive tasks, andhave an executable linearization.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 12 / 73

Page 27: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

Problem Definition & Solution Criteria

primitivetasks

compoundtasks

P = (V ,P, δ,C,M, sI , cI)

V a set of state variablesP a set of primitive task namesδ : P → (2V )3 the task name mappingC a set of compound task names

cI ∈ C the initial taskM ⊆ C × 2TN the methodssI ⊆ V the initial state

A solution task network tn must:

be a refinement of cI ,only contain primitive tasks, andhave an executable linearization.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 12 / 73

Page 28: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

Problem Definition & Solution Criteria

cI

P = (V ,P, δ,C,M, sI , cI)

V a set of state variablesP a set of primitive task namesδ : P → (2V )3 the task name mappingC a set of compound task namescI ∈ C the initial task

M ⊆ C × 2TN the methodssI ⊆ V the initial state

A solution task network tn must:

be a refinement of cI ,

only contain primitive tasks, andhave an executable linearization.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 12 / 73

Page 29: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

Problem Definition & Solution Criteria

cI

P = (V ,P, δ,C,M, sI , cI)

V a set of state variablesP a set of primitive task namesδ : P → (2V )3 the task name mappingC a set of compound task namescI ∈ C the initial taskM ⊆ C × 2TN the methods

sI ⊆ V the initial state

A solution task network tn must:

be a refinement of cI ,only contain primitive tasks, and

have an executable linearization.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 12 / 73

Page 30: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

Problem Definition & Solution Criteria

cI

P = (V ,P, δ,C,M, sI , cI)

V a set of state variablesP a set of primitive task namesδ : P → (2V )3 the task name mappingC a set of compound task namescI ∈ C the initial taskM ⊆ C × 2TN the methods

sI ⊆ V the initial state

A solution task network tn must:

be a refinement of cI ,only contain primitive tasks, and

have an executable linearization.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 12 / 73

Page 31: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

Problem Definition & Solution Criteria

cI

P = (V ,P, δ,C,M, sI , cI)

V a set of state variablesP a set of primitive task namesδ : P → (2V )3 the task name mappingC a set of compound task namescI ∈ C the initial taskM ⊆ C × 2TN the methods

sI ⊆ V the initial state

A solution task network tn must:

be a refinement of cI ,only contain primitive tasks, and

have an executable linearization.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 12 / 73

Page 32: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

Problem Definition & Solution Criteria

cI

P = (V ,P, δ,C,M, sI , cI)

V a set of state variablesP a set of primitive task namesδ : P → (2V )3 the task name mappingC a set of compound task namescI ∈ C the initial taskM ⊆ C × 2TN the methods

sI ⊆ V the initial state

A solution task network tn must:

be a refinement of cI ,only contain primitive tasks, and

have an executable linearization.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 12 / 73

Page 33: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

Problem Definition & Solution Criteria

cI

P = (V ,P, δ,C,M, sI , cI)

V a set of state variablesP a set of primitive task namesδ : P → (2V )3 the task name mappingC a set of compound task namescI ∈ C the initial taskM ⊆ C × 2TN the methods

sI ⊆ V the initial state

A solution task network tn must:

be a refinement of cI ,only contain primitive tasks, and

have an executable linearization.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 12 / 73

Page 34: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

Problem Definition & Solution Criteria

cI

P = (V ,P, δ,C,M, sI , cI)

V a set of state variablesP a set of primitive task namesδ : P → (2V )3 the task name mappingC a set of compound task namescI ∈ C the initial taskM ⊆ C × 2TN the methods

sI ⊆ V the initial state

A solution task network tn must:

be a refinement of cI ,only contain primitive tasks, and

have an executable linearization.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 12 / 73

Page 35: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

Problem Definition & Solution Criteria

cI

P = (V ,P, δ,C,M, sI , cI)

V a set of state variablesP a set of primitive task namesδ : P → (2V )3 the task name mappingC a set of compound task namescI ∈ C the initial taskM ⊆ C × 2TN the methods

sI ⊆ V the initial state

A solution task network tn must:

be a refinement of cI ,only contain primitive tasks, and

have an executable linearization.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 12 / 73

Page 36: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

Problem Definition & Solution Criteria

cI

sI

P = (V ,P, δ,C,M, sI , cI)

V a set of state variablesP a set of primitive task namesδ : P → (2V )3 the task name mappingC a set of compound task namescI ∈ C the initial taskM ⊆ C × 2TN the methodssI ⊆ V the initial state

A solution task network tn must:

be a refinement of cI ,only contain primitive tasks, and

have an executable linearization.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 12 / 73

Page 37: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

Problem Definition & Solution Criteria

cI

sI

P = (V ,P, δ,C,M, sI , cI)

V a set of state variablesP a set of primitive task namesδ : P → (2V )3 the task name mappingC a set of compound task namescI ∈ C the initial taskM ⊆ C × 2TN the methodssI ⊆ V the initial state

A solution task network tn must:

be a refinement of cI ,only contain primitive tasks, andhave an executable linearization.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 12 / 73

Page 38: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

Problem Definition & Solution Criteria (Cont’d)

More formally:

For the sake of simplicity, we present a ground formalism, butmost results exist for lifted planning as well

Task network: tn = (T ,≺, α) consists of:T , a possibly empty set of tasks or task identifier symbols≺, a partial order on the tasksα : T → P∪C, the task mapping function

Primitive task names are mapped to their tuples by the task namemapping δ : P → (2V )3

A task network is called executable if there exists an executablelinearization of its tasks

Let p be a primitive task (name) and δ(p) = (prec, add , del).Then, p is called executable in state s ∈ 2V iff prec ⊆ s.Its application to s results into the state (s \ del) ∪ add .Executability of task sequences defined analogously

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 13 / 73

Page 39: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

Problem Definition & Solution Criteria (Cont’d)

More formally:

For the sake of simplicity, we present a ground formalism, butmost results exist for lifted planning as wellTask network: tn = (T ,≺, α) consists of:

T , a possibly empty set of tasks or task identifier symbols≺, a partial order on the tasksα : T → P∪C, the task mapping function

Primitive task names are mapped to their tuples by the task namemapping δ : P → (2V )3

A task network is called executable if there exists an executablelinearization of its tasks

Let p be a primitive task (name) and δ(p) = (prec, add , del).Then, p is called executable in state s ∈ 2V iff prec ⊆ s.Its application to s results into the state (s \ del) ∪ add .Executability of task sequences defined analogously

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 13 / 73

Page 40: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

Problem Definition & Solution Criteria (Cont’d)

More formally:

For the sake of simplicity, we present a ground formalism, butmost results exist for lifted planning as wellTask network: tn = (T ,≺, α) consists of:

T , a possibly empty set of tasks or task identifier symbols≺, a partial order on the tasksα : T → P∪C, the task mapping function

Primitive task names are mapped to their tuples by the task namemapping δ : P → (2V )3

A task network is called executable if there exists an executablelinearization of its tasks

Let p be a primitive task (name) and δ(p) = (prec, add , del).Then, p is called executable in state s ∈ 2V iff prec ⊆ s.Its application to s results into the state (s \ del) ∪ add .Executability of task sequences defined analogously

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 13 / 73

Page 41: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

Problem Definition & Solution Criteria (Cont’d)

More formally:

For the sake of simplicity, we present a ground formalism, butmost results exist for lifted planning as wellTask network: tn = (T ,≺, α) consists of:

T , a possibly empty set of tasks or task identifier symbols≺, a partial order on the tasksα : T → P∪C, the task mapping function

Primitive task names are mapped to their tuples by the task namemapping δ : P → (2V )3

A task network is called executable if there exists an executablelinearization of its tasks

Let p be a primitive task (name) and δ(p) = (prec, add , del).Then, p is called executable in state s ∈ 2V iff prec ⊆ s.Its application to s results into the state (s \ del) ∪ add .Executability of task sequences defined analogously

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 13 / 73

Page 42: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

Problem Definition & Solution Criteria (Cont’d)

More formally:

A decomposition method m ∈ M is a tuple m = (c, tnm) with acompound task c and task network tnm = (Tm,≺m, αm)

Let tn = (T ,≺, α) be a task network, t ∈ T a task identifier, andα(t) = c a compound task to be decomposed by m = (c, tnm).We assume T ∩ Tm = ∅.Then, the application of m to tn results into the task networktn′ = ((T \ {t}) ∪ Tm,≺ ∪≺m ∪ ≺X , α ∪ αm)|(T\{t})∪Tm with:

≺X :={(t ′, t ′′) | (t ′, t) ∈ ≺, t ′′ ∈ Tm} ∪{(t ′′, t ′) | (t, t ′) ∈ ≺, t ′′ ∈ Tm}

where (X1, . . . , xn)|Y restricts the sets Xi to elements in Y

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 13 / 73

Page 43: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

Problem Definition & Solution Criteria (Cont’d)

More formally:

A decomposition method m ∈ M is a tuple m = (c, tnm) with acompound task c and task network tnm = (Tm,≺m, αm)

Let tn = (T ,≺, α) be a task network, t ∈ T a task identifier, andα(t) = c a compound task to be decomposed by m = (c, tnm).We assume T ∩ Tm = ∅.Then, the application of m to tn results into the task networktn′ = ((T \ {t}) ∪ Tm,≺ ∪≺m ∪ ≺X , α ∪ αm)|(T\{t})∪Tm with:

≺X :={(t ′, t ′′) | (t ′, t) ∈ ≺, t ′′ ∈ Tm} ∪{(t ′′, t ′) | (t, t ′) ∈ ≺, t ′′ ∈ Tm}

where (X1, . . . , xn)|Y restricts the sets Xi to elements in Y

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 13 / 73

Page 44: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

Problem Definition & Solution Criteria (Cont’d)

More formally:

A task network tn is a solution if and only if:

There is a sequence of decomposition methods m that transformscI into tn,tn contains only primitive tasks, andthe (still partially ordered) task network tn admits an executablelinearization t of its tasks.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 13 / 73

Page 45: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

Problem Definition & Solution Criteria (Cont’d)

More formally:

A task network tn is a solution if and only if:There is a sequence of decomposition methods m that transformscI into tn,tn contains only primitive tasks, and

the (still partially ordered) task network tn admits an executablelinearization t of its tasks.

cI

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 13 / 73

Page 46: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Basic Problem Definition

Problem Definition & Solution Criteria (Cont’d)

More formally:

A task network tn is a solution if and only if:There is a sequence of decomposition methods m that transformscI into tn,tn contains only primitive tasks, andthe (still partially ordered) task network tn admits an executablelinearization t of its tasks.

cI

sI

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 13 / 73

Page 47: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Formalization Choices in HTN Planning

Overview

Which formalization choices do exist?Which impact do they have?

Initial task network vs. a single initial task

Adding a goal description

Adding state constraints

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 14 / 73

Page 48: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Formalization Choices in HTN Planning

Overview

Which formalization choices do exist?Which impact do they have?

Initial task network vs. a single initial task

Adding a goal description

Adding state constraints

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 14 / 73

Page 49: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Formalization Choices in HTN Planning

Overview

Which formalization choices do exist?Which impact do they have?

Initial task network vs. a single initial task

Adding a goal description

Adding state constraints

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 14 / 73

Page 50: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Formalization Choices in HTN Planning

Overview

Which formalization choices do exist?Which impact do they have?

Initial task network vs. a single initial task

Adding a goal description

Adding state constraints

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 14 / 73

Page 51: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Formalization Choices in HTN Planning

Impact of Initial Task Network

Recap: P = (V ,P, δ,C,M, sI , cI) describes an HTN planning problemas described before.

Let P? = (V ,P, δ,C,M, sI , tnI) be an HTN planning problem withinitial task network tnI .

Then, a task network tn is a solution if and only if:

There is a sequence of decomposition methods m thattransforms tnI into tn,

tn contains only primitive tasks, and

the (still partially ordered) task network tn admits an executablelinearization t of its tasks.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 15 / 73

Page 52: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Formalization Choices in HTN Planning

Impact of Initial Task Network

Recap: P = (V ,P, δ,C,M, sI , cI) describes an HTN planning problemas described before.

Let P? = (V ,P, δ,C,M, sI , tnI) be an HTN planning problem withinitial task network tnI .

Then, a task network tn is a solution if and only if:

There is a sequence of decomposition methods m thattransforms tnI into tn,

tn contains only primitive tasks, and

the (still partially ordered) task network tn admits an executablelinearization t of its tasks.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 15 / 73

Page 53: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Formalization Choices in HTN Planning

Impact of Initial Task Network (Cont’d)

Theorem: Initial task networks can be compiled away.

Proof:

Let P? = (V ,P, δ,C,M, sI , tnI) be an HTN planning problem withinitial task network tnI .

Then, there is an HTN planning problem P ′ = (V ,P, δ,C′,M′, sI , cI)with the same set of solutions:

Let C′ := C ∪ {cI} and M ′ := M ∪ {(cI , tnI)}.

Identical solution set is obvious.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 16 / 73

Page 54: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Formalization Choices in HTN Planning

Impact of Initial Task Network (Cont’d)

Theorem: Initial task networks can be compiled away.

Proof:

Let P? = (V ,P, δ,C,M, sI , tnI) be an HTN planning problem withinitial task network tnI .

Then, there is an HTN planning problem P ′ = (V ,P, δ,C′,M′, sI , cI)with the same set of solutions:

Let C′ := C ∪ {cI} and M ′ := M ∪ {(cI , tnI)}.

Identical solution set is obvious.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 16 / 73

Page 55: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Formalization Choices in HTN Planning

Impact of Goal Description

Recap: P = (V ,P, δ,C,M, sI , cI) describes an HTN planning problemas described before.

Let P? = (V ,P, δ,C,M, sI , cI , g) be an HTN planning problem withgoal description g ⊆ V .

Then, a task network tn is a solution if and only if:

There is a sequence of decomposition methods m thattransforms cI into tn,

tn contains only primitive tasks,

the (still partially ordered) task network tn admits an executablelinearization t of its tasks, and

the task sequence t generates a goal state s ⊇ g.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 17 / 73

Page 56: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Formalization Choices in HTN Planning

Impact of Goal Description

Recap: P = (V ,P, δ,C,M, sI , cI) describes an HTN planning problemas described before.

Let P? = (V ,P, δ,C,M, sI , cI , g) be an HTN planning problem withgoal description g ⊆ V .

Then, a task network tn is a solution if and only if:

There is a sequence of decomposition methods m thattransforms cI into tn,

tn contains only primitive tasks,

the (still partially ordered) task network tn admits an executablelinearization t of its tasks, and

the task sequence t generates a goal state s ⊇ g.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 17 / 73

Page 57: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Formalization Choices in HTN Planning

Impact of Goal Description (Cont’d)

Theorem: Goal descriptions can be compiled away.

Proof:

Let P? = (V ,P, δ,C,M, sI , cI , g) be an HTN planning problem withgoal description.

Then, there is an HTN planning problem P ′ = (V ,P′, δ′,C,M, sI , tnI)with the same set of solutions:

Here, tnI contains two tasks: cI followed by a new primitive task p withno effects and g as precondition, δ(p) = (g, ∅, ∅).

Then, the initial task network in P ′ can be compiled away as before.

Identical solution set is obvious.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 18 / 73

Page 58: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Formalization Choices in HTN Planning

Impact of Goal Description (Cont’d)

Theorem: Goal descriptions can be compiled away.

Proof:

Let P? = (V ,P, δ,C,M, sI , cI , g) be an HTN planning problem withgoal description.

Then, there is an HTN planning problem P ′ = (V ,P′, δ′,C,M, sI , tnI)with the same set of solutions:

Here, tnI contains two tasks: cI followed by a new primitive task p withno effects and g as precondition, δ(p) = (g, ∅, ∅).

Then, the initial task network in P ′ can be compiled away as before.

Identical solution set is obvious.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 18 / 73

Page 59: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Formalization Choices in HTN Planning

Impact of Goal Description (Cont’d)

Theorem: Goal descriptions can be compiled away.

Proof:

Let P? = (V ,P, δ,C,M, sI , cI , g) be an HTN planning problem withgoal description.

Then, there is an HTN planning problem P ′ = (V ,P′, δ′,C,M, sI , tnI)with the same set of solutions:

Here, tnI contains two tasks: cI followed by a new primitive task p withno effects and g as precondition, δ(p) = (g, ∅, ∅).

Then, the initial task network in P ′ can be compiled away as before.

Identical solution set is obvious.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 18 / 73

Page 60: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Formalization Choices in HTN Planning

State Constraints in HTN Planning

State constraints have been introduced in the HTN formalization byErol et al. (1994):

(l, t), the literal l holds immediately before task t

(t, l), the literal l holds immediately after task t

(t, l, t ′), the literal l holds in all states between t and t ′

In case t , resp. t ′, are compound, a constraint (l, t) is, upondecomposition, translated to (l, first[t1, . . . , tn]), where the ti are allsub tasks of t . ((t, l) and (t, l, t ′) are handled analogously.)

Notably: Erol et al.’s formalization specifies a boolean constraintformula, in which state, variable, and ordering constraints can bespecified with negations and disjunctions.

No compilation known yet.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 19 / 73

Page 61: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Formalization Choices in HTN Planning

State Constraints in HTN Planning

State constraints have been introduced in the HTN formalization byErol et al. (1994):

(l, t), the literal l holds immediately before task t

(t, l), the literal l holds immediately after task t

(t, l, t ′), the literal l holds in all states between t and t ′

In case t , resp. t ′, are compound, a constraint (l, t) is, upondecomposition, translated to (l, first[t1, . . . , tn]), where the ti are allsub tasks of t . ((t, l) and (t, l, t ′) are handled analogously.)

Notably: Erol et al.’s formalization specifies a boolean constraintformula, in which state, variable, and ordering constraints can bespecified with negations and disjunctions.

No compilation known yet.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 19 / 73

Page 62: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Formalization Choices in HTN Planning

State Constraints in HTN Planning

State constraints have been introduced in the HTN formalization byErol et al. (1994):

(l, t), the literal l holds immediately before task t

(t, l), the literal l holds immediately after task t

(t, l, t ′), the literal l holds in all states between t and t ′

In case t , resp. t ′, are compound, a constraint (l, t) is, upondecomposition, translated to (l, first[t1, . . . , tn]), where the ti are allsub tasks of t . ((t, l) and (t, l, t ′) are handled analogously.)

Notably: Erol et al.’s formalization specifies a boolean constraintformula, in which state, variable, and ordering constraints can bespecified with negations and disjunctions.

No compilation known yet.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 19 / 73

Page 63: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Formalization Choices in HTN Planning

State Constraints in HTN Planning

State constraints have been introduced in the HTN formalization byErol et al. (1994):

(l, t), the literal l holds immediately before task t

(t, l), the literal l holds immediately after task t

(t, l, t ′), the literal l holds in all states between t and t ′

In case t , resp. t ′, are compound, a constraint (l, t) is, upondecomposition, translated to (l, first[t1, . . . , tn]), where the ti are allsub tasks of t . ((t, l) and (t, l, t ′) are handled analogously.)

Notably: Erol et al.’s formalization specifies a boolean constraintformula, in which state, variable, and ordering constraints can bespecified with negations and disjunctions.

No compilation known yet.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 19 / 73

Page 64: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Overview Part I

Theoretical Foundations

Introduction

Problem DefinitionComputational Complexity of the Plan Existence Problem

General HTN PlanningHTN Planning with Task InsertionTotally Ordered HTN PlanningRestricting Recursion (Acyclic, Regular, Tail-recursive)

Expressivity Analysis

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 20 / 73

Page 65: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Introduction

Definition & Motivation

The HTN plan existence problem is defined as follows:

Given an HTN planning problem P , does P possess a solution?

Motivation for studying this problem

Deeper problem understanding

Development of problem relaxations (heuristics)and specialized algorithms

Development of problem compilations

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 21 / 73

Page 66: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Introduction

Definition & Motivation

The HTN plan existence problem is defined as follows:

Given an HTN planning problem P , does P possess a solution?

Motivation for studying this problem

Deeper problem understanding

Development of problem relaxations (heuristics)and specialized algorithms

Development of problem compilations

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 21 / 73

Page 67: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Introduction

Definition & Motivation

The HTN plan existence problem is defined as follows:

Given an HTN planning problem P , does P possess a solution?

Motivation for studying this problem

Deeper problem understanding

Development of problem relaxations (heuristics)and specialized algorithms

Development of problem compilations

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 21 / 73

Page 68: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Introduction

Definition & Motivation

The HTN plan existence problem is defined as follows:

Given an HTN planning problem P , does P possess a solution?

Motivation for studying this problem

Deeper problem understanding

Development of problem relaxations (heuristics)and specialized algorithms

Development of problem compilations

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 21 / 73

Page 69: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Complexity of the General Case

Overview Part I

Theoretical Foundations

Introduction

Problem DefinitionComputational Complexity of the Plan Existence Problem

General HTN PlanningHTN Planning with Task InsertionTotally Ordered HTN PlanningRestricting Recursion (Acyclic, Regular, Tail-recursive)

Expressivity Analysis

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 22 / 73

Page 70: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Complexity of the General Case

Undecidability Proof

Theorem: HTN planning is undedicable.

Proof:

Reduction from the language intersection problem of two context-freegrammars: given G and G′, is there a word ω in both languagesL(G) ∩ L(G′)?

Construct an HTN planning problem P that has a solution if andonly if the correct answer is yesTranslate the production rules to decomposition methods. Thatway only words in L(G) and L(G′) can be producedAny solution tn contains the word ω – encoded as actionsequence – twice: once produced by G and once produced byG′. The action encodings ensure that no other task networks areexecutable

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 23 / 73

Page 71: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Complexity of the General Case

Undecidability Proof

Theorem: HTN planning is undedicable.

Proof:

Reduction from the language intersection problem of two context-freegrammars: given G and G′, is there a word ω in both languagesL(G) ∩ L(G′)?

Construct an HTN planning problem P that has a solution if andonly if the correct answer is yes

Translate the production rules to decomposition methods. Thatway only words in L(G) and L(G′) can be producedAny solution tn contains the word ω – encoded as actionsequence – twice: once produced by G and once produced byG′. The action encodings ensure that no other task networks areexecutable

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 23 / 73

Page 72: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Complexity of the General Case

Undecidability Proof

Theorem: HTN planning is undedicable.

Proof:

Reduction from the language intersection problem of two context-freegrammars: given G and G′, is there a word ω in both languagesL(G) ∩ L(G′)?

Construct an HTN planning problem P that has a solution if andonly if the correct answer is yesTranslate the production rules to decomposition methods. Thatway only words in L(G) and L(G′) can be produced

Any solution tn contains the word ω – encoded as actionsequence – twice: once produced by G and once produced byG′. The action encodings ensure that no other task networks areexecutable

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 23 / 73

Page 73: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Complexity of the General Case

Undecidability Proof

Theorem: HTN planning is undedicable.

Proof:

Reduction from the language intersection problem of two context-freegrammars: given G and G′, is there a word ω in both languagesL(G) ∩ L(G′)?

Construct an HTN planning problem P that has a solution if andonly if the correct answer is yesTranslate the production rules to decomposition methods. Thatway only words in L(G) and L(G′) can be producedAny solution tn contains the word ω – encoded as actionsequence – twice: once produced by G and once produced byG′. The action encodings ensure that no other task networks areexecutable

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 23 / 73

Page 74: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Complexity of the General Case

Undecidability Proof (Cont’d)

Theorem: HTN planning is undedicable.

Proof: (Cont’d, by example)

Let G = (

non-terminalsymbols︷ ︸︸ ︷

Γ = {H,Q},

terminalsymbols︷ ︸︸ ︷

Σ = {a, b},

productionrules︷︸︸︷R ,

startsymbol︷︸︸︷

H ) andG′ = (Γ′ = {D, F},Σ′ = {a, b}, R′,D).

Production rules R: H 7→ aQb Q 7→ aQ | bQ | a | bProduction rules R′: D 7→ aFD | ab F 7→ a | b

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 24 / 73

Page 75: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Complexity of the General Case

Undecidability Proof (Cont’d)

Theorem: HTN planning is undedicable.

Proof: (Cont’d, by example)

P = (V ,

C︷ ︸︸ ︷{H,Q,D, F},

P︷ ︸︸ ︷{a, b, a′, b′}, δ,M,

initial state︷ ︸︸ ︷{vturn:G}, tnI ,

goal description︷ ︸︸ ︷{vturn:G} )

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 24 / 73

Page 76: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Complexity of the General Case

Undecidability Proof (Cont’d)

Theorem: HTN planning is undedicable.

Proof: (Cont’d, by example)

P = (V ,

C︷ ︸︸ ︷{H,Q,D, F},

P︷ ︸︸ ︷{a, b, a′, b′}, δ,M,

initial state︷ ︸︸ ︷{vturn:G}, tnI ,

goal description︷ ︸︸ ︷{vturn:G} )

V = {vturn:G, vturn:G′} ∪ {va, vb}

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 24 / 73

Page 77: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Complexity of the General Case

Undecidability Proof (Cont’d)

Theorem: HTN planning is undedicable.

Proof: (Cont’d, by example)

P = (V ,

C︷ ︸︸ ︷{H,Q,D, F},

P︷ ︸︸ ︷{a, b, a′, b′}, δ,M,

initial state︷ ︸︸ ︷{vturn:G}, tnI ,

goal description︷ ︸︸ ︷{vturn:G} )

V = {vturn:G, vturn:G′} ∪ {va, vb}δ = {(a, ({vturn:G}, {vturn:G′ , va}, {vturn:G})),

(b, ({vturn:G}, {vturn:G′ , vb}, {vturn:G})),

(a′, ({vturn:G′ , va}, {vturn:G}, {vturn:G′ , va})),

(b′, ({vturn:G′ , vb}, {vturn:G}, {vturn:G′ , vb}))}

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 24 / 73

Page 78: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Complexity of the General Case

Undecidability Proof (Cont’d)

Theorem: HTN planning is undedicable.

Proof: (Cont’d, by example)

P = (V ,

C︷ ︸︸ ︷{H,Q,D, F},

P︷ ︸︸ ︷{a, b, a′, b′}, δ,M,

initial state︷ ︸︸ ︷{vturn:G}, tnI ,

goal description︷ ︸︸ ︷{vturn:G} )

V = {vturn:G, vturn:G′} ∪ {va, vb}δ = {(a, ({vturn:G}, {vturn:G′ , va}, {vturn:G})),

(b, ({vturn:G}, {vturn:G′ , vb}, {vturn:G})),

(a′, ({vturn:G′ , va}, {vturn:G}, {vturn:G′ , va})),

(b′, ({vturn:G′ , vb}, {vturn:G}, {vturn:G′ , vb}))}M = M(G) ∪M(G′) (translated production rules of G′ and G′)

tnI = ({t, t ′}︸ ︷︷ ︸T

, ∅︸︷︷︸≺

, {(t,H), (t ′,D)}︸ ︷︷ ︸α

)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 24 / 73

Page 79: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Problem Classes

Overview

Which properties make the plan existence problem easier?

Task insertion,

Total order of all task networks,Recursion. Methods are:

acyclic: no recursionregular: only one compound task, which is the last onetail-recursive: arbitrary many compound tasks, only the last one isrecursive

non-hierarchical

acyclic

regular

unrestrictive recursive

tail-recursive

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 25 / 73

Page 80: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Problem Classes

Overview

Which properties make the plan existence problem easier?

Task insertion,

Total order of all task networks,

Recursion. Methods are:acyclic: no recursionregular: only one compound task, which is the last onetail-recursive: arbitrary many compound tasks, only the last one isrecursive

non-hierarchical

acyclic

regular

unrestrictive recursive

tail-recursive

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 25 / 73

Page 81: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Problem Classes

Overview

Which properties make the plan existence problem easier?

Task insertion,

Total order of all task networks,Recursion. Methods are:

acyclic: no recursionregular: only one compound task, which is the last onetail-recursive: arbitrary many compound tasks, only the last one isrecursive

non-hierarchical

acyclic

regular

unrestrictive recursive

tail-recursive

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 25 / 73

Page 82: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Problem Classes

Overview

Which properties make the plan existence problem easier?

Task insertion,

Total order of all task networks,Recursion. Methods are:

acyclic: no recursion

regular: only one compound task, which is the last onetail-recursive: arbitrary many compound tasks, only the last one isrecursive

non-hierarchical

acyclic

regular

unrestrictive recursive

tail-recursive

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 25 / 73

Page 83: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Problem Classes

Overview

Which properties make the plan existence problem easier?

Task insertion,

Total order of all task networks,Recursion. Methods are:

acyclic: no recursionregular: only one compound task, which is the last one

tail-recursive: arbitrary many compound tasks, only the last one isrecursive

non-hierarchical

acyclic

regular

unrestrictive recursive

tail-recursive

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 25 / 73

Page 84: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Problem Classes

Overview

Which properties make the plan existence problem easier?

Task insertion,

Total order of all task networks,Recursion. Methods are:

acyclic: no recursionregular: only one compound task, which is the last onetail-recursive: arbitrary many compound tasks, only the last one isrecursive

non-hierarchical

acyclic

regular

unrestrictive recursive

tail-recursive

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 25 / 73

Page 85: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Problem Classes

Overview

Which properties make the plan existence problem easier?

Task insertion,

Total order of all task networks,Recursion. Methods are:

acyclic: no recursionregular: only one compound task, which is the last onetail-recursive: arbitrary many compound tasks, only the last one isrecursive

non-hierarchical

acyclic

regular

unrestrictive recursive

tail-recursive

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 25 / 73

Page 86: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Plan Existence Problem of TIHTN Planning

Overview Part I

Theoretical Foundations

Introduction

Problem DefinitionComputational Complexity of the Plan Existence Problem

General HTN PlanningHTN Planning with Task InsertionTotally Ordered HTN PlanningRestricting Recursion (Acyclic, Regular, Tail-recursive)

Expressivity Analysis

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 26 / 73

Page 87: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Plan Existence Problem of TIHTN Planning

Problem Definition

In HTN planning with task insertion, TIHTN planning, tasks may beadded arbitrarily to task networks (not just via decomposition):

Let P? = (V ,P, δ,C,M, sI , cI) be a TIHTN planning problem.

Then, a task network tn is a solution if and only if:

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 27 / 73

Page 88: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Plan Existence Problem of TIHTN Planning

Problem Definition

In HTN planning with task insertion, TIHTN planning, tasks may beadded arbitrarily to task networks (not just via decomposition):

Let P? = (V ,P, δ,C,M, sI , cI) be a TIHTN planning problem.

Then, a task network tn is a solution if and only if:

There is a sequence of decomposition methods m and taskinsertions that transforms cI into tn,

tn contains only primitive tasks, and

the (still partially ordered) task network tn admits an executablelinearization t of its tasks.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 27 / 73

Page 89: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Plan Existence Problem of TIHTN Planning

Problem Definition

In HTN planning with task insertion, TIHTN planning, tasks may beadded arbitrarily to task networks (not just via decomposition):

Let P? = (V ,P, δ,C,M, sI , cI) be a TIHTN planning problem.

Then, a task network tn is a solution if and only if:

There is a sequence of decomposition methods m thattransforms cI into tn′,

tn ⊇ tn′ contains all tasks and orderings of tn′,

tn contains only primitive tasks, and

the (still partially ordered) task network tn admits an executablelinearization t of its tasks.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 27 / 73

Page 90: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Plan Existence Problem of TIHTN Planning

Motivation

Benefits of allowing task insertion:

Task insertion plus goal description fully subsumes classicalplanning (while allowing task hierarchies as well)

Task insertion makes the modeling process easier: certain partscan be left to the planner

Task insertion makes the problem computationally easier (can beexploited for heuristics)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 28 / 73

Page 91: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Plan Existence Problem of TIHTN Planning

Motivation

Benefits of allowing task insertion:

Task insertion plus goal description fully subsumes classicalplanning (while allowing task hierarchies as well)

Task insertion makes the modeling process easier: certain partscan be left to the planner

Task insertion makes the problem computationally easier (can beexploited for heuristics)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 28 / 73

Page 92: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Plan Existence Problem of TIHTN Planning

Motivation

Benefits of allowing task insertion:

Task insertion plus goal description fully subsumes classicalplanning (while allowing task hierarchies as well)

Task insertion makes the modeling process easier: certain partscan be left to the planner

Task insertion makes the problem computationally easier (can beexploited for heuristics)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 28 / 73

Page 93: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Plan Existence Problem of TIHTN Planning

Influence of Task Insertion

H

D′

a Q b

D′

a b Q b

D′

a b a b

D′

a b a b

a′ F ′ D′

a b a b

a′ b′ D′

a b a b

a′ b′ a′ b′

decomposition: D′

decomposition: F ′

decomposition: D′

decomposition: Q

decomposition: Q

a a b

D′

a a b

a′ b′

decomposition: D′

decomposition: Q

decomposition: H

tnI (initial task network)

tn1

tn2

tn3

tn4

tn5

tn6

tn7

tn8

Recap: A task network is asolution if it contains the sameword ω twice.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 29 / 73

Page 94: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Plan Existence Problem of TIHTN Planning

Influence of Task Insertion

H

D′

a Q b

D′

a b Q b

D′

a b a b

D′

a b a b

a′ F ′ D′

a b a b

a′ b′ D′

a b a b

a′ b′ a′ b′

decomposition: D′

decomposition: F ′

decomposition: D′

decomposition: Q

decomposition: Q

a a b

D′

a a b

a′ b′

decomposition: D′

decomposition: Q

decomposition: H

tnI (initial task network)

tn1

tn2

tn3

tn4

tn5

tn6

tn7

tn8

Recap: A task network is asolution if it contains the sameword ω twice.

Task network tn6 is a solution!

a b a b

a′ b′ a′ b′

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 29 / 73

Page 95: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Plan Existence Problem of TIHTN Planning

Influence of Task Insertion

H

D′

a Q b

D′

a b Q b

D′

a b a b

D′

a b a b

a′ F ′ D′

a b a b

a′ b′ D′

a b a b

a′ b′ a′ b′

decomposition: D′

decomposition: F ′

decomposition: D′

decomposition: Q

decomposition: Q

a a b

D′

a a b

a′ b′

decomposition: D′

decomposition: Q

decomposition: H

tnI (initial task network)

tn1

tn2

tn3

tn4

tn5

tn6

tn7

tn8

Recap: A task network is asolution if it contains the sameword ω twice.

Task network tn8 is no solution!

a a b

a′ b′

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 29 / 73

Page 96: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Plan Existence Problem of TIHTN Planning

Influence of Task Insertion

H

D′

a Q b

D′

a b Q b

D′

a b a b

D′

a b a b

a′ F ′ D′

a b a b

a′ b′ D′

a b a b

a′ b′ a′ b′

decomposition: D′

decomposition: F ′

decomposition: D′

decomposition: Q

decomposition: Q

a a b

D′

a a b

a′ b′

decomposition: D′

decomposition: Q

decomposition: H

a b a b

a′ b′ a′ b′

task insertion:b, a′, b′

tnI (initial task network)

tn1

tn2

tn3

tn4

tn5

tn6

tn7

tn8

Recap: A task network is asolution if it contains the sameword ω twice.

Influence of task insertion:

a a b

a′ b′

tn8

a b a b

a′ b′ a′ b′

tn6

task insertion:b, a′, b′

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 29 / 73

Page 97: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Plan Existence Problem of TIHTN Planning

Influence of Task Insertion

H

D′

a Q b

D′

a b Q b

D′

a b a b

D′

a b a b

a′ F ′ D′

a b a b

a′ b′ D′

a b a b

a′ b′ a′ b′

decomposition: D′

decomposition: F ′

decomposition: D′

decomposition: Q

decomposition: Q

a a b

D′

a a b

a′ b′

decomposition: D′

decomposition: Q

decomposition: H

a b a b

a′ b′ a′ b′

task insertion:b, a′, b′

tnI (initial task network)

tn1

tn2

tn3

tn4

tn5

tn6

tn7

tn8

Recap: A task network is asolution if it contains the sameword ω twice.

Observation:

In TIHTN planning, recursion isnot required.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 29 / 73

Page 98: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Plan Existence Problem of TIHTN Planning

Eliminating Recursion

H

D′

a Q b

D′

a b Q b

D′

a b a b

D′

a b a b

a′ F ′ D′

a b a b

a′ b′ D′

a b a b

a′ b′ a′ b′

decomposition: D′

decomposition: F ′

decomposition: D′

decomposition: Q

decomposition: Q

tnI

tn1

tn2

tn3

tn4

tn5

tn6

decomposition: H Theorem: TIHTN planning is in NEXPTIME

Idea: Restrict to acyclic decompositions, fill the rest withtask insertion, and verify.

cI

H

a Q

b Q

a

b

D

a′ F

b′

D

a′ b′

cI

H

a Q

a

b

D

a′ b′

Remove cyclic decompositionsof Q and D

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 30 / 73

Page 99: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Plan Existence Problem of TIHTN Planning

Eliminating Recursion

H

D′

a Q b

D′

a b Q b

D′

a b a b

D′

a b a b

a′ F ′ D′

a b a b

a′ b′ D′

a b a b

a′ b′ a′ b′

decomposition: D′

decomposition: F ′

decomposition: D′

decomposition: Q

decomposition: Q

tnI

tn1

tn2

tn3

tn4

tn5

tn6

decomposition: H Theorem: TIHTN planning is in NEXPTIME

1. Step: Guess an acyclic decomposition:

The guessed decomposition tree describes at mostb|C|+1 decompositions.

(C = set of compound tasks)(b = size of largest task network in the model)

Verify in O(b|C|+1) whether the tree describes a correctsequence of decompositions.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 30 / 73

Page 100: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Plan Existence Problem of TIHTN Planning

Eliminating Recursion

H

D′

a Q b

D′

a b Q b

D′

a b a b

D′

a b a b

a′ F ′ D′

a b a b

a′ b′ D′

a b a b

a′ b′ a′ b′

decomposition: D′

decomposition: F ′

decomposition: D′

decomposition: Q

decomposition: Q

tnI

tn1

tn2

tn3

tn4

tn5

tn6

decomposition: H Theorem: TIHTN planning is in NEXPTIME

2. Step: Guess the actions and orderings to be inserted.

The (guessed) decomposition tree results into a tasknetwork with at most ≤ b|C|+1 tasks.

Between each two actions, at most 2|V | actions need tobe inserted to achieve the next precondition.

(|V | = number of state variables)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 30 / 73

Page 101: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Totally Ordered HTN Planning

Overview Part I

Theoretical Foundations

Introduction

Problem DefinitionComputational Complexity of the Plan Existence Problem

General HTN PlanningHTN Planning with Task InsertionTotally Ordered HTN PlanningRestricting Recursion (Acyclic, Regular, Tail-recursive)

Expressivity Analysis

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 31 / 73

Page 102: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Totally Ordered HTN Planning

Problem Definition

An HTN planning problem P = (V ,P, δ,C,M, sI , cI) is called totallyordered if:

All decomposition methods are totally ordered, i.e., for eachm ∈ M, m = (c, tn), tn is a totally ordered task network.

In case P uses an initial task network tnI rather than an initialtask cI , then tnI needs to be totally ordered as well.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 32 / 73

Page 103: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Totally Ordered HTN Planning

Problem Definition

An HTN planning problem P = (V ,P, δ,C,M, sI , cI) is called totallyordered if:

All decomposition methods are totally ordered, i.e., for eachm ∈ M, m = (c, tn), tn is a totally ordered task network.

In case P uses an initial task network tnI rather than an initialtask cI , then tnI needs to be totally ordered as well.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 32 / 73

Page 104: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Totally Ordered HTN Planning

Computational Complexity

Theorem: Totally ordered HTN planning is in EXPTIME

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 33 / 73

Page 105: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Totally Ordered HTN Planning

Computational Complexity

Theorem: Totally ordered HTN planning is in EXPTIME

Intuition:

Since plans are totally ordered, the only means of choosing theright refinement for a given compound task is to produce asuitable successor state

. . .

. . . set of totally ordered

primitive refinements

There are only finitely many states that can be produced by therefinements of a given compound task

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 33 / 73

Page 106: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Totally Ordered HTN Planning

Computational Complexity

Theorem: Totally ordered HTN planning is in EXPTIME

Intuition:

Since plans are totally ordered, the only means of choosing theright refinement for a given compound task is to produce asuitable successor state

. . .

. . . set of totally ordered

primitive refinements

There are only finitely many states that can be produced by therefinements of a given compound task

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 33 / 73

Page 107: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Totally Ordered HTN Planning

Computational Complexity

Theorem: Totally ordered HTN planning is in EXPTIME

Proof:

Create a table 2V × (C ∪ P)× 2V × {>,⊥, ?} to store:

s, p, s′, x with x ∈ {>,⊥} to express whether the primitive task pis applicable in s creating a state satisfying s′

s, c, s′, x with x ∈ {>,⊥} to express whether the compound taskc has a primitive refinement that is applicable in s creating a statesatisfying s′

Algorithm:

Initialize the table (with all states and tasks) with value ?Perform bottom-up approach: start with all primitive tasks, thencontinue with all compound tasks that admit a primitive refinementContinue as long as at least one value ? is changed

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 33 / 73

Page 108: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Totally Ordered HTN Planning

Computational Complexity

Theorem: Totally ordered HTN planning is in EXPTIME

Proof:

Create a table 2V × (C ∪ P)× 2V × {>,⊥, ?} to store:s, p, s′, x with x ∈ {>,⊥} to express whether the primitive task pis applicable in s creating a state satisfying s′

s, c, s′, x with x ∈ {>,⊥} to express whether the compound taskc has a primitive refinement that is applicable in s creating a statesatisfying s′

Algorithm:

Initialize the table (with all states and tasks) with value ?Perform bottom-up approach: start with all primitive tasks, thencontinue with all compound tasks that admit a primitive refinementContinue as long as at least one value ? is changed

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 33 / 73

Page 109: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Totally Ordered HTN Planning

Computational Complexity

Theorem: Totally ordered HTN planning is in EXPTIME

Proof:

Create a table 2V × (C ∪ P)× 2V × {>,⊥, ?} to store:s, p, s′, x with x ∈ {>,⊥} to express whether the primitive task pis applicable in s creating a state satisfying s′

s, c, s′, x with x ∈ {>,⊥} to express whether the compound taskc has a primitive refinement that is applicable in s creating a statesatisfying s′

Algorithm:

Initialize the table (with all states and tasks) with value ?Perform bottom-up approach: start with all primitive tasks, thencontinue with all compound tasks that admit a primitive refinementContinue as long as at least one value ? is changed

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 33 / 73

Page 110: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Totally Ordered HTN Planning

Computational Complexity

Theorem: Totally ordered HTN planning is in EXPTIME

Proof:

Create a table 2V × (C ∪ P)× 2V × {>,⊥, ?} to store:s, p, s′, x with x ∈ {>,⊥} to express whether the primitive task pis applicable in s creating a state satisfying s′

s, c, s′, x with x ∈ {>,⊥} to express whether the compound taskc has a primitive refinement that is applicable in s creating a statesatisfying s′

Algorithm:Initialize the table (with all states and tasks) with value ?

Perform bottom-up approach: start with all primitive tasks, thencontinue with all compound tasks that admit a primitive refinementContinue as long as at least one value ? is changed

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 33 / 73

Page 111: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Totally Ordered HTN Planning

Computational Complexity

Theorem: Totally ordered HTN planning is in EXPTIME

Proof:

Create a table 2V × (C ∪ P)× 2V × {>,⊥, ?} to store:s, p, s′, x with x ∈ {>,⊥} to express whether the primitive task pis applicable in s creating a state satisfying s′

s, c, s′, x with x ∈ {>,⊥} to express whether the compound taskc has a primitive refinement that is applicable in s creating a statesatisfying s′

Algorithm:Initialize the table (with all states and tasks) with value ?Perform bottom-up approach: start with all primitive tasks, thencontinue with all compound tasks that admit a primitive refinement

Continue as long as at least one value ? is changed

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 33 / 73

Page 112: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Totally Ordered HTN Planning

Computational Complexity

Theorem: Totally ordered HTN planning is in EXPTIME

Proof:

Create a table 2V × (C ∪ P)× 2V × {>,⊥, ?} to store:s, p, s′, x with x ∈ {>,⊥} to express whether the primitive task pis applicable in s creating a state satisfying s′

s, c, s′, x with x ∈ {>,⊥} to express whether the compound taskc has a primitive refinement that is applicable in s creating a statesatisfying s′

Algorithm:Initialize the table (with all states and tasks) with value ?Perform bottom-up approach: start with all primitive tasks, thencontinue with all compound tasks that admit a primitive refinementContinue as long as at least one value ? is changed

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 33 / 73

Page 113: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Acyclic Planning Problems

Overview Part I

Theoretical Foundations

Introduction

Problem DefinitionComputational Complexity of the Plan Existence Problem

General HTN PlanningHTN Planning with Task InsertionTotally Ordered HTN PlanningRestricting Recursion (Acyclic, Regular, Tail-recursive)

Expressivity Analysis

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 34 / 73

Page 114: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Acyclic Planning Problems

Problem Definition

An HTN planning problem is called called acyclic if no compound taskcan reach itself via decomposition.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 35 / 73

Page 115: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Acyclic Planning Problems

Computational Complexity

Theorem: Acyclic HTN planning is in NEXPTIME.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 36 / 73

Page 116: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Acyclic Planning Problems

Computational Complexity

Theorem: Acyclic HTN planning is in NEXPTIME.

Proof:

Do the same as for TIHTN problems, but without the task insertionpart:

Guess at most b|C|+1 decompositions.(C = set of compound tasks)(b = size of largest task network in the model)

Verify in O(b|C|+1) whether the decompositions can be applied insequence

Guess a linearization of the resulting task network

Verify applicability of resulting linearization in O(b|C|+1)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 36 / 73

Page 117: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Acyclic Planning Problems

Computational Complexity

Theorem: Acyclic HTN planning is in NEXPTIME.

Proof:

Do the same as for TIHTN problems, but without the task insertionpart:

Guess at most b|C|+1 decompositions.(C = set of compound tasks)(b = size of largest task network in the model)

Verify in O(b|C|+1) whether the decompositions can be applied insequence

Guess a linearization of the resulting task network

Verify applicability of resulting linearization in O(b|C|+1)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 36 / 73

Page 118: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Acyclic Planning Problems

Computational Complexity

Theorem: Acyclic HTN planning is in NEXPTIME.

Proof:

Do the same as for TIHTN problems, but without the task insertionpart:

Guess at most b|C|+1 decompositions.(C = set of compound tasks)(b = size of largest task network in the model)

Verify in O(b|C|+1) whether the decompositions can be applied insequence

Guess a linearization of the resulting task network

Verify applicability of resulting linearization in O(b|C|+1)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 36 / 73

Page 119: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Acyclic Planning Problems

Computational Complexity

Theorem: Acyclic HTN planning is in NEXPTIME.

Proof:

Do the same as for TIHTN problems, but without the task insertionpart:

Guess at most b|C|+1 decompositions.(C = set of compound tasks)(b = size of largest task network in the model)

Verify in O(b|C|+1) whether the decompositions can be applied insequence

Guess a linearization of the resulting task network

Verify applicability of resulting linearization in O(b|C|+1)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 36 / 73

Page 120: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Acyclic Planning Problems

Computational Complexity

Theorem: Acyclic HTN planning is in NEXPTIME.

Proof:

Do the same as for TIHTN problems, but without the task insertionpart:

Guess at most b|C|+1 decompositions.(C = set of compound tasks)(b = size of largest task network in the model)

Verify in O(b|C|+1) whether the decompositions can be applied insequence

Guess a linearization of the resulting task network

Verify applicability of resulting linearization in O(b|C|+1)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 36 / 73

Page 121: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Overview Part I

Theoretical Foundations

Introduction

Problem DefinitionComputational Complexity of the Plan Existence Problem

General HTN PlanningHTN Planning with Task InsertionTotally Ordered HTN PlanningRestricting Recursion (Acyclic, Regular, Tail-recursive)

Expressivity Analysis

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 37 / 73

Page 122: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Problem Definition

A task network tn = (T ,≺, α) is called regular if

at most one task in T is compound andif t ∈ T is a compound task, then it is the last task in tn, i.e., allother tasks t ′ ∈ T are ordered before t .

A method (c, tn) is called regular if tn is regular.

A planning problem is called regular if all methods are regular.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 38 / 73

Page 123: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Problem Definition

A task network tn = (T ,≺, α) is called regular ifat most one task in T is compound and

if t ∈ T is a compound task, then it is the last task in tn, i.e., allother tasks t ′ ∈ T are ordered before t .

A method (c, tn) is called regular if tn is regular.

A planning problem is called regular if all methods are regular.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 38 / 73

Page 124: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Problem Definition

A task network tn = (T ,≺, α) is called regular ifat most one task in T is compound andif t ∈ T is a compound task, then it is the last task in tn, i.e., allother tasks t ′ ∈ T are ordered before t .

A method (c, tn) is called regular if tn is regular.

A planning problem is called regular if all methods are regular.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 38 / 73

Page 125: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Problem Definition

A task network tn = (T ,≺, α) is called regular ifat most one task in T is compound andif t ∈ T is a compound task, then it is the last task in tn, i.e., allother tasks t ′ ∈ T are ordered before t .

A method (c, tn) is called regular if tn is regular.

A planning problem is called regular if all methods are regular.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 38 / 73

Page 126: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Problem Definition

A task network tn = (T ,≺, α) is called regular ifat most one task in T is compound andif t ∈ T is a compound task, then it is the last task in tn, i.e., allother tasks t ′ ∈ T are ordered before t .

A method (c, tn) is called regular if tn is regular.

A planning problem is called regular if all methods are regular.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 38 / 73

Page 127: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Computational Complexity

Theorem: Regular problems are in PSPACE.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 39 / 73

Page 128: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Computational Complexity

Theorem: Regular problems are in PSPACE.

Proof:

Rely on progression search

Until the compound task gets decomposed, all primitive taskshave been “progressed away”

That way, the size of any task network is bounded by the size ofthe largest task network in the model

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 39 / 73

Page 129: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Excursion: HTN Progression Search

s A B

C

Always progress tasks that are a possibly first task in the network

Here, these are the tasks A and C.In case the chosen task to progress next is:

primitive: apply it and progress the statecompound: decompose it

More details in Part II of this tutorial

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 40 / 73

Page 130: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Excursion: HTN Progression Search

s A B

C

Always progress tasks that are a possibly first task in the network

Here, these are the tasks A and C.

In case the chosen task to progress next is:

primitive: apply it and progress the statecompound: decompose it

More details in Part II of this tutorial

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 40 / 73

Page 131: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Excursion: HTN Progression Search

s A B

C

Always progress tasks that are a possibly first task in the network

Here, these are the tasks A and C.In case the chosen task to progress next is:

primitive: apply it and progress the statecompound: decompose it

More details in Part II of this tutorial

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 40 / 73

Page 132: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Excursion: HTN Progression Search

s A B

C

s′ B

C

Always progress tasks that are a possibly first task in the network

Here, these are the tasks A and C.In case the chosen task to progress next is:

primitive: apply it and progress the state

compound: decompose it

More details in Part II of this tutorial

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 40 / 73

Page 133: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Excursion: HTN Progression Search

s A B

C

Always progress tasks that are a possibly first task in the network

Here, these are the tasks A and C.In case the chosen task to progress next is:

primitive: apply it and progress the statecompound: decompose it

More details in Part II of this tutorial

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 40 / 73

Page 134: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Excursion: HTN Progression Search

s A B

C

s BA

Always progress tasks that are a possibly first task in the network

Here, these are the tasks A and C.In case the chosen task to progress next is:

primitive: apply it and progress the statecompound: decompose it

More details in Part II of this tutorial

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 40 / 73

Page 135: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Excursion: HTN Progression Search

s A B

C

s BA

Always progress tasks that are a possibly first task in the network

Here, these are the tasks A and C.In case the chosen task to progress next is:

primitive: apply it and progress the statecompound: decompose it

More details in Part II of this tutorial

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 40 / 73

Page 136: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Excursion: HTN Progression Search

s A B

C

s BA

Always progress tasks that are a possibly first task in the network

Here, these are the tasks A and C.In case the chosen task to progress next is:

primitive: apply it and progress the statecompound: decompose it

More details in Part II of this tutorial

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 40 / 73

Page 137: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Computational Complexity

Theorem: Regular problems are in PSPACE.

Proof:

Rely on progression search

Until the compound task gets decomposed, all primitive taskshave been “progressed away”

That way, the size of any task network is bounded by the size ofthe largest task network in the model

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 41 / 73

Page 138: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Computational Complexity

Theorem: Regular problems are in PSPACE.

Proof:

Rely on progression search

Until the compound task gets decomposed, all primitive taskshave been “progressed away”

That way, the size of any task network is bounded by the size ofthe largest task network in the model

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 41 / 73

Page 139: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Computational Complexity

Theorem: Regular problems are in PSPACE.

Proof:

Rely on progression search

Until the compound task gets decomposed, all primitive taskshave been “progressed away”

That way, the size of any task network is bounded by the size ofthe largest task network in the model

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 41 / 73

Page 140: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Computational Complexity

Theorem: Regular problems are in PSPACE.

Note:

Every STRIPS problem PSTRIPS can be canonically expressed by atotally ordered regular HTN problem P :

The actions in PSTRIPS are primitive tasks in PThere is just one compound task X generating all possible actionsequences: for all p ∈ P, we have a method mapping X to pfollowed by X

For the base case, we have a method mapping X to an artificialprimitive task encoding the goal description

The initial task is X

(This also shows the hardness of the problem.)Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 41 / 73

Page 141: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Computational Complexity

Theorem: Regular problems are in PSPACE.

Note:

Every STRIPS problem PSTRIPS can be canonically expressed by atotally ordered regular HTN problem P :

The actions in PSTRIPS are primitive tasks in P

There is just one compound task X generating all possible actionsequences: for all p ∈ P, we have a method mapping X to pfollowed by X

For the base case, we have a method mapping X to an artificialprimitive task encoding the goal description

The initial task is X

(This also shows the hardness of the problem.)Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 41 / 73

Page 142: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Computational Complexity

Theorem: Regular problems are in PSPACE.

Note:

Every STRIPS problem PSTRIPS can be canonically expressed by atotally ordered regular HTN problem P :

The actions in PSTRIPS are primitive tasks in PThere is just one compound task X generating all possible actionsequences: for all p ∈ P, we have a method mapping X to pfollowed by X

For the base case, we have a method mapping X to an artificialprimitive task encoding the goal description

The initial task is X

(This also shows the hardness of the problem.)Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 41 / 73

Page 143: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Computational Complexity

Theorem: Regular problems are in PSPACE.

Note:

Every STRIPS problem PSTRIPS can be canonically expressed by atotally ordered regular HTN problem P :

The actions in PSTRIPS are primitive tasks in PThere is just one compound task X generating all possible actionsequences: for all p ∈ P, we have a method mapping X to pfollowed by X

For the base case, we have a method mapping X to an artificialprimitive task encoding the goal description

The initial task is X

(This also shows the hardness of the problem.)Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 41 / 73

Page 144: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Regular Problems

Computational Complexity

Theorem: Regular problems are in PSPACE.

Note:

Every STRIPS problem PSTRIPS can be canonically expressed by atotally ordered regular HTN problem P :

The actions in PSTRIPS are primitive tasks in PThere is just one compound task X generating all possible actionsequences: for all p ∈ P, we have a method mapping X to pfollowed by X

For the base case, we have a method mapping X to an artificialprimitive task encoding the goal description

The initial task is X

(This also shows the hardness of the problem.)Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 41 / 73

Page 145: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Overview Part I

Theoretical Foundations

Introduction

Problem DefinitionComputational Complexity of the Plan Existence Problem

General HTN PlanningHTN Planning with Task InsertionTotally Ordered HTN PlanningRestricting Recursion (Acyclic, Regular, Tail-recursive)

Expressivity Analysis

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 42 / 73

Page 146: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Informal Problem Definition

Informally, tail-recursive problems look as follows:

limited recursion for all tasks in all methods

non-last tasks have a more restricted recursion

Formally, the restrictions on recursion are defined in terms of so-calledstratifications.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 43 / 73

Page 147: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Informal Problem Definition

Informally, tail-recursive problems look as follows:

limited recursion for all tasks in all methods

non-last tasks have a more restricted recursion

Formally, the restrictions on recursion are defined in terms of so-calledstratifications.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 43 / 73

Page 148: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Stratifications

A stratification is defined as follows:

A set ≤ ⊆ C × C is called a stratification if it is a total preorder(i.e., reflexive, transitive, and total)

We call any inclusion-maximal subset of C a stratum of ≤ if for allx , y ∈ C both (x , y) ∈ ≤ and (y , x) ∈ ≤ hold.

The height of a stratification is the number of its strata.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 44 / 73

Page 149: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Stratifications: Example

Stratifications: (Non-)Examples

A B C D

E

S3S2

S1

(a) Relation ≤a.

A B

C D

E

S3

S2

S1

(b) Stratification ≤b.

A B

C D

E

S3

S2

S1

(c) Stratification ≤c .

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 45 / 73

Page 150: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Stratifications: Example

Stratifications: (Non-)Examples

A B C D

E

S3S2

S1

(a) Relation ≤a.

A B

C D

E

S3

S2

S1

(b) Stratification ≤b.

A B

C D

E

S3

S2

S1

(c) Stratification ≤c .

≤a = {(A,B), (B,A), (C,D), (D,C), (E ,B), (E ,C)}≤a is not a stratification, as it is not total

≤b = {(A,B), (B,A), (C,D), (D,C), (E ,B), (E ,C), (C,A)}∗

≤c = {(A,B), (B,A), (C,D), (D,C), (E ,B), (E ,C), (A,C)}∗

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 45 / 73

Page 151: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Stratifications: Example

Stratifications: (Non-)Examples

A B C D

E

S3S2

S1

(a) Relation ≤a.

A B

C D

E

S3

S2

S1

(b) Stratification ≤b.

A B

C D

E

S3

S2

S1

(c) Stratification ≤c .

≤a = {(A,B), (B,A), (C,D), (D,C), (E ,B), (E ,C)}≤b = {(A,B), (B,A), (C,D), (D,C), (E ,B), (E ,C), (C,A)}∗

≤c = {(A,B), (B,A), (C,D), (D,C), (E ,B), (E ,C), (A,C)}∗

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 45 / 73

Page 152: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Stratifications

A stratification is defined as follows:

A set ≤ ⊆ C × C is called a stratification if it is a total preorder(i.e., reflexive, transitive, and total)

We call any inclusion-maximal subset of C a stratum of ≤ if for allx , y ∈ C both (x , y) ∈ ≤ and (y , x) ∈ ≤ hold.

The height of a stratification is the number of its strata.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 46 / 73

Page 153: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Stratifications

A stratification is defined as follows:

A set ≤ ⊆ C × C is called a stratification if it is a total preorder(i.e., reflexive, transitive, and total)

We call any inclusion-maximal subset of C a stratum of ≤ if for allx , y ∈ C both (x , y) ∈ ≤ and (y , x) ∈ ≤ hold.

The height of a stratification is the number of its strata.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 46 / 73

Page 154: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Stratifications

A stratification is defined as follows:

A set ≤ ⊆ C × C is called a stratification if it is a total preorder(i.e., reflexive, transitive, and total)

We call any inclusion-maximal subset of C a stratum of ≤ if for allx , y ∈ C both (x , y) ∈ ≤ and (y , x) ∈ ≤ hold.

The height of a stratification is the number of its strata.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 46 / 73

Page 155: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Stratifications: Example

Stratifications: (Non-)Examples

A B C D

E

S3S2

S1

(a) Relation ≤a.

A B

C D

E

S3

S2

S1

(b) Stratification ≤b.

A B

C D

E

S3

S2

S1

(c) Stratification ≤c .

S1 = {E}, S2 = {A,B}, and S3 = {C,D} are strata

≤b and ≤c have a height of 3.

If we add, e.g., an edge from E to D in ≤c , i.e., the tuple (D,E),then we only have a single stratification with height 1.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 47 / 73

Page 156: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Stratifications: Example

Stratifications: (Non-)Examples

A B C D

E

S3S2

S1

(a) Relation ≤a.

A B

C D

E

S3

S2

S1

(b) Stratification ≤b.

A B

C D

E

S3

S2

S1

(c) Stratification ≤c .

S1 = {E}, S2 = {A,B}, and S3 = {C,D} are strata

≤b and ≤c have a height of 3.

If we add, e.g., an edge from E to D in ≤c , i.e., the tuple (D,E),then we only have a single stratification with height 1.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 47 / 73

Page 157: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Stratifications: Example

Stratifications: (Non-)Examples

A B C D

E

S3S2

S1

(a) Relation ≤a.

A B

C D

E

S3

S2

S1

(b) Stratification ≤b.

A B

C D

E

S3

S2

S1

(c) Stratification ≤c .

S1 = {E}, S2 = {A,B}, and S3 = {C,D} are strata

≤b and ≤c have a height of 3.

If we add, e.g., an edge from E to D in ≤c , i.e., the tuple (D,E),then we only have a single stratification with height 1.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 47 / 73

Page 158: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Problem Definition

An HTN problem P is called tail-recursive if there is a stratification ≤on the compound tasks C of P with the following property:

For all methods (c, (T ,≺, α)) ∈ M holds:

If there is a last task t ∈ T that is compound (i.e., α(t) ∈ C andfor all t ′ 6= t holds (t ′, t) ∈ ≺), then (α(t), c) ∈ ≤For any non-last task t ∈ T with α(t) ∈ C it holds (α(t), c) ∈ ≤and (c, α(t)) /∈ ≤

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 48 / 73

Page 159: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Problem Definition

An HTN problem P is called tail-recursive if there is a stratification ≤on the compound tasks C of P with the following property:

For all methods (c, (T ,≺, α)) ∈ M holds:

If there is a last task t ∈ T that is compound (i.e., α(t) ∈ C andfor all t ′ 6= t holds (t ′, t) ∈ ≺), then (α(t), c) ∈ ≤

For any non-last task t ∈ T with α(t) ∈ C it holds (α(t), c) ∈ ≤and (c, α(t)) /∈ ≤

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 48 / 73

Page 160: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Problem Definition

An HTN problem P is called tail-recursive if there is a stratification ≤on the compound tasks C of P with the following property:

For all methods (c, (T ,≺, α)) ∈ M holds:

If there is a last task t ∈ T that is compound (i.e., α(t) ∈ C andfor all t ′ 6= t holds (t ′, t) ∈ ≺), then (α(t), c) ∈ ≤This means: the last task (if one exists) is at most as hard as thedecomposed task c

For any non-last task t ∈ T with α(t) ∈ C it holds (α(t), c) ∈ ≤and (c, α(t)) /∈ ≤

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 48 / 73

Page 161: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Problem Definition

An HTN problem P is called tail-recursive if there is a stratification ≤on the compound tasks C of P with the following property:

For all methods (c, (T ,≺, α)) ∈ M holds:

If there is a last task t ∈ T that is compound (i.e., α(t) ∈ C andfor all t ′ 6= t holds (t ′, t) ∈ ≺), then (α(t), c) ∈ ≤This means: the last task (if one exists) is at most as hard as thedecomposed task c

For any non-last task t ∈ T with α(t) ∈ C it holds (α(t), c) ∈ ≤and (c, α(t)) /∈ ≤

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 48 / 73

Page 162: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Problem Definition

An HTN problem P is called tail-recursive if there is a stratification ≤on the compound tasks C of P with the following property:

For all methods (c, (T ,≺, α)) ∈ M holds:

If there is a last task t ∈ T that is compound (i.e., α(t) ∈ C andfor all t ′ 6= t holds (t ′, t) ∈ ≺), then (α(t), c) ∈ ≤This means: the last task (if one exists) is at most as hard as thedecomposed task c

For any non-last task t ∈ T with α(t) ∈ C it holds (α(t), c) ∈ ≤and (c, α(t)) /∈ ≤This means: any non-last task is easier (on a lower stratum) thanthe decomposed task c

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 48 / 73

Page 163: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Computational Complexity

Theorem: Tail-recursive problems are in EXPSPACE.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 49 / 73

Page 164: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Computational Complexity

Theorem: Tail-recursive problems are in EXPSPACE.

Proof:

Rely on progression search (more details in Part II)

Until the last task gets decomposed, all tasks ordered before ithave been “progressed away”Only the decomposition of a last task might let the currentstratification height unchangedThe decomposition of non-last tasks results into tasks of strictlylower stratumFrom this, we can calculate a progression bound – a maximalsize of task network created under progressionWe get k ·mh as progression bound, where k is size of the initialtask network, m is the size of the largest method,and h is the stratification height

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 49 / 73

Page 165: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Computational Complexity

Theorem: Tail-recursive problems are in EXPSPACE.

Proof:

Rely on progression search (more details in Part II)Until the last task gets decomposed, all tasks ordered before ithave been “progressed away”

Only the decomposition of a last task might let the currentstratification height unchangedThe decomposition of non-last tasks results into tasks of strictlylower stratumFrom this, we can calculate a progression bound – a maximalsize of task network created under progressionWe get k ·mh as progression bound, where k is size of the initialtask network, m is the size of the largest method,and h is the stratification height

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 49 / 73

Page 166: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Computational Complexity

Theorem: Tail-recursive problems are in EXPSPACE.

Proof:

Rely on progression search (more details in Part II)Until the last task gets decomposed, all tasks ordered before ithave been “progressed away”Only the decomposition of a last task might let the currentstratification height unchanged

The decomposition of non-last tasks results into tasks of strictlylower stratumFrom this, we can calculate a progression bound – a maximalsize of task network created under progressionWe get k ·mh as progression bound, where k is size of the initialtask network, m is the size of the largest method,and h is the stratification height

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 49 / 73

Page 167: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Computational Complexity

Theorem: Tail-recursive problems are in EXPSPACE.

Proof:

Rely on progression search (more details in Part II)Until the last task gets decomposed, all tasks ordered before ithave been “progressed away”Only the decomposition of a last task might let the currentstratification height unchangedThe decomposition of non-last tasks results into tasks of strictlylower stratum

From this, we can calculate a progression bound – a maximalsize of task network created under progressionWe get k ·mh as progression bound, where k is size of the initialtask network, m is the size of the largest method,and h is the stratification height

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 49 / 73

Page 168: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Computational Complexity

Theorem: Tail-recursive problems are in EXPSPACE.

Proof:

Rely on progression search (more details in Part II)Until the last task gets decomposed, all tasks ordered before ithave been “progressed away”Only the decomposition of a last task might let the currentstratification height unchangedThe decomposition of non-last tasks results into tasks of strictlylower stratumFrom this, we can calculate a progression bound – a maximalsize of task network created under progression

We get k ·mh as progression bound, where k is size of the initialtask network, m is the size of the largest method,and h is the stratification height

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 49 / 73

Page 169: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Computational Complexity: Example

Example:

following initial task network of size 3:

0 5

4

Using a method with last task increases the size,

and a task with the same stratification height remains(!),

but “this can not increase the size arbitrarily”, because the tasksordered before it have to be progressed away before theremaining task can be decomposed again.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 50 / 73

Page 170: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Computational Complexity: Example

Example:

following initial task network of size 3:

0 5

4

3 0

2

10

4

Using a method with last task increases the size,

and a task with the same stratification height remains(!),

but “this can not increase the size arbitrarily”, because the tasksordered before it have to be progressed away before theremaining task can be decomposed again.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 50 / 73

Page 171: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Computational Complexity: Example

Example:

following initial task network of size 3:

0 5

4

3 0

2

10

4

0 5

3 0

2

Using a method without last task increases the size,but “such decompositions” can only finitely often (limited by thestratification height).

Using a method with last task increases the size,and a task with the same stratification height remains(!),but “this can not increase the size arbitrarily”, because the tasksordered before it have to be progressed away before theremaining task can be decomposed again.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 50 / 73

Page 172: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Computational Complexity: Example

Example:

following initial task network of size 3:

0 5

4

3 0

2

10

4

0 5

10

4

Using a method with last task increases the size,

and a task with the same stratification height remains(!),

but “this can not increase the size arbitrarily”, because the tasksordered before it have to be progressed away before theremaining task can be decomposed again.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 50 / 73

Page 173: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Computational Complexity: Example

Example:

following initial task network of size 3:

0 5

4

3 0

2

10

4

0 5

10

4

Using a method with last task increases the size,

and a task with the same stratification height remains(!),

but “this can not increase the size arbitrarily”, because the tasksordered before it have to be progressed away before theremaining task can be decomposed again.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 50 / 73

Page 174: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Computational Complexity: Example

Example:

following initial task network of size 3:

0 5

4

3 0

2

10

4

0 5

10

4

Using a method with last task increases the size,

and a task with the same stratification height remains(!),

but “this can not increase the size arbitrarily”, because the tasksordered before it have to be progressed away before theremaining task can be decomposed again.

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 50 / 73

Page 175: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Tail-recursive Problems

Computational Complexity

Theorem: Tail-recursive problems are in EXPSPACE.

Proof:

Rely on progression search (more details in Part II)Until the last task gets decomposed, all tasks ordered before ithave been “progressed away”Only the decomposition of a last task might let the currentstratification height unchangedThe decomposition of non-last tasks results into tasks of strictlylower stratumFrom this, we can calculate a progression bound – a maximalsize of task network created under progressionWe get k ·mh as progression bound, where k is size of the initialtask network, m is the size of the largest method,and h is the stratification height

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 51 / 73

Page 176: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Complexity Results

Overview for Task Insertion

When task insertion is allowed:Recursion does not contribute to the hardness of the problemAdditional actions can be added by task insertion rather than byrelying on recursive decomposition

TIHTN Planning is NEXPTIME-complete (only membership wasshown)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 52 / 73

Page 177: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Complexity Results

Overview for Task Insertion

When task insertion is allowed:Recursion does not contribute to the hardness of the problemAdditional actions can be added by task insertion rather than byrelying on recursive decomposition

TIHTN Planning is NEXPTIME-complete (only membership wasshown)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 52 / 73

Page 178: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Complexity Results

Overview for Standard HTN Planning

HTN planning is in general undecidable

HTN planning is also semi-decidable (not shown, but trivial)

Acyclic HTN problems are NEXPTIME-complete (onlymembership was shown)

Regular HTN problems are PSPACE-complete

Tail-recursive HTN problems are EXPSPACE-complete (onlymembership was shown)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 53 / 73

Page 179: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Complexity Results

Overview for Standard HTN Planning

HTN planning is in general undecidable

HTN planning is also semi-decidable (not shown, but trivial)

Acyclic HTN problems are NEXPTIME-complete (onlymembership was shown)

Regular HTN problems are PSPACE-complete

Tail-recursive HTN problems are EXPSPACE-complete (onlymembership was shown)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 53 / 73

Page 180: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Complexity Results

Overview for Standard HTN Planning

HTN planning is in general undecidable

HTN planning is also semi-decidable (not shown, but trivial)

Acyclic HTN problems are NEXPTIME-complete (onlymembership was shown)

Regular HTN problems are PSPACE-complete

Tail-recursive HTN problems are EXPSPACE-complete (onlymembership was shown)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 53 / 73

Page 181: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Complexity Results

Overview for Standard HTN Planning

HTN planning is in general undecidable

HTN planning is also semi-decidable (not shown, but trivial)

Acyclic HTN problems are NEXPTIME-complete (onlymembership was shown)

Regular HTN problems are PSPACE-complete

Tail-recursive HTN problems are EXPSPACE-complete (onlymembership was shown)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 53 / 73

Page 182: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Complexity Results

Overview for Standard HTN Planning

HTN planning is in general undecidable

HTN planning is also semi-decidable (not shown, but trivial)

Acyclic HTN problems are NEXPTIME-complete (onlymembership was shown)

Regular HTN problems are PSPACE-complete

Tail-recursive HTN problems are EXPSPACE-complete (onlymembership was shown)

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 53 / 73

Page 183: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Overview Part I

Theoretical Foundations

Introduction

Problem DefinitionComputational Complexity of the Plan Existence Problem

General HTN PlanningHTN Planning with Task InsertionTotally Ordered HTN PlanningRestricting Recursion (Acyclic, Regular, Tail-recursive)

Expressivity Analysis

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 54 / 73

Page 184: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Motivation

Expressivity of Planning Formalisms

Question:

What can be expressed with the planning formalism at hand?

How does behavior describable with a formalism look like?

Answer so far:

It is PSPACE-complete (undecidable) to find a STRIPS (HTN)plan

Better answer:

Formalism A can be compiled into formalism B (under severalrestrictions on compilation size and/or runtime)

Gives an intuition on the relative expressivity

Answer regarding STRIPS and HTN planning would be:(in general) impossible

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 55 / 73

Page 185: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Motivation

Expressivity of Planning Formalisms

Question:

What can be expressed with the planning formalism at hand?

How does behavior describable with a formalism look like?

Answer so far:

It is PSPACE-complete (undecidable) to find a STRIPS (HTN)plan

Better answer:

Formalism A can be compiled into formalism B (under severalrestrictions on compilation size and/or runtime)

Gives an intuition on the relative expressivity

Answer regarding STRIPS and HTN planning would be:(in general) impossible

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 55 / 73

Page 186: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Motivation

Expressivity of Planning Formalisms

Question:

What can be expressed with the planning formalism at hand?

How does behavior describable with a formalism look like?

Answer so far:

It is PSPACE-complete (undecidable) to find a STRIPS (HTN)plan

Better answer:

Formalism A can be compiled into formalism B (under severalrestrictions on compilation size and/or runtime)

Gives an intuition on the relative expressivity

Answer regarding STRIPS and HTN planning would be:(in general) impossible

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 55 / 73

Page 187: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Motivation

Expressivity of Planning Formalisms

Question:

What can be expressed with the planning formalism at hand?

How does behavior describable with a formalism look like?

Answer so far:

It is PSPACE-complete (undecidable) to find a STRIPS (HTN)plan

Better answer:

Formalism A can be compiled into formalism B (under severalrestrictions on compilation size and/or runtime)

Gives an intuition on the relative expressivity

Answer regarding STRIPS and HTN planning would be:(in general) impossible

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 55 / 73

Page 188: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Motivation

Expressivity of Planning Formalisms

In the next slides:Provide a measure that allows more insightsinto the structures that can be represented

Consider the small STRIPS planning problemgiven at the right, P shall be delivered at BModel is a compact representation for a space of statesActions define state transitionsInitial state and goal definition specifies a set of (transition)sequences we are interested in{〈pickup(T ,P,A),move(T ,A,B), drop(T ,P,B)〉,〈pickup(T ,P,A), drop(T ,P,A), pickup(T ,P,A),move(T ,A,B), drop(T ,P,B)〉,〈pickup(T ,P,A),move(T ,A,B),move(T ,B,A),move(T ,A,B), drop(T ,P,B)〉,〈move(T ,A,B),move(T ,B,A), pickup(T ,P,A),move(T ,A,B), drop(T ,P,B)〉, . . . }

→ The planning problem is a compact representation for a(possibly infinite) set of sequences

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 56 / 73

ö A 4

B

P T

Page 189: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Motivation

Expressivity of Planning Formalisms

In the next slides:Provide a measure that allows more insightsinto the structures that can be represented

Consider the small STRIPS planning problemgiven at the right, P shall be delivered at B

Model is a compact representation for a space of statesActions define state transitionsInitial state and goal definition specifies a set of (transition)sequences we are interested in{〈pickup(T ,P,A),move(T ,A,B), drop(T ,P,B)〉,〈pickup(T ,P,A), drop(T ,P,A), pickup(T ,P,A),move(T ,A,B), drop(T ,P,B)〉,〈pickup(T ,P,A),move(T ,A,B),move(T ,B,A),move(T ,A,B), drop(T ,P,B)〉,〈move(T ,A,B),move(T ,B,A), pickup(T ,P,A),move(T ,A,B), drop(T ,P,B)〉, . . . }

→ The planning problem is a compact representation for a(possibly infinite) set of sequences

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 56 / 73

ö A 4

B

P T

Page 190: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Motivation

Expressivity of Planning Formalisms

In the next slides:Provide a measure that allows more insightsinto the structures that can be represented

Consider the small STRIPS planning problemgiven at the right, P shall be delivered at BModel is a compact representation for a space of statesActions define state transitionsInitial state and goal definition specifies a set of (transition)sequences we are interested in

{〈pickup(T ,P,A),move(T ,A,B), drop(T ,P,B)〉,〈pickup(T ,P,A), drop(T ,P,A), pickup(T ,P,A),move(T ,A,B), drop(T ,P,B)〉,〈pickup(T ,P,A),move(T ,A,B),move(T ,B,A),move(T ,A,B), drop(T ,P,B)〉,〈move(T ,A,B),move(T ,B,A), pickup(T ,P,A),move(T ,A,B), drop(T ,P,B)〉, . . . }

→ The planning problem is a compact representation for a(possibly infinite) set of sequences

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 56 / 73

ö A 4

B

P T

Page 191: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Motivation

Expressivity of Planning Formalisms

In the next slides:Provide a measure that allows more insightsinto the structures that can be represented

Consider the small STRIPS planning problemgiven at the right, P shall be delivered at BModel is a compact representation for a space of statesActions define state transitionsInitial state and goal definition specifies a set of (transition)sequences we are interested in{〈pickup(T ,P,A),move(T ,A,B), drop(T ,P,B)〉,〈pickup(T ,P,A), drop(T ,P,A), pickup(T ,P,A),move(T ,A,B), drop(T ,P,B)〉,〈pickup(T ,P,A),move(T ,A,B),move(T ,B,A),move(T ,A,B), drop(T ,P,B)〉,〈move(T ,A,B),move(T ,B,A), pickup(T ,P,A),move(T ,A,B), drop(T ,P,B)〉, . . . }

→ The planning problem is a compact representation for a(possibly infinite) set of sequences

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 56 / 73

ö A 4

B

P T

Page 192: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Motivation

Expressivity of Planning Formalisms

In the next slides:Provide a measure that allows more insightsinto the structures that can be represented

Consider the small STRIPS planning problemgiven at the right, P shall be delivered at BModel is a compact representation for a space of statesActions define state transitionsInitial state and goal definition specifies a set of (transition)sequences we are interested in{〈pickup(T ,P,A),move(T ,A,B), drop(T ,P,B)〉,〈pickup(T ,P,A), drop(T ,P,A), pickup(T ,P,A),move(T ,A,B), drop(T ,P,B)〉,〈pickup(T ,P,A),move(T ,A,B),move(T ,B,A),move(T ,A,B), drop(T ,P,B)〉,〈move(T ,A,B),move(T ,B,A), pickup(T ,P,A),move(T ,A,B), drop(T ,P,B)〉, . . . }

→ The planning problem is a compact representation for a(possibly infinite) set of sequences

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 56 / 73

ö A 4

B

P T

Page 193: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Motivation

Comparison to Formal Languages

PlanningProblem

Set of Solutions

FormalGrammar

Set of Words(Language)

?

Actions of a problem form the (terminal) symbols of a languageSolution criteria define valid wordsSet of solutions forms the language of the problem

→ Which languages can be expressed using a certain formalism?

Question (given before):

What can be expressed with the planning formalism at hand?

Answer:

STRIPS can represent (a subset of the) regular languages

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 57 / 73

Page 194: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Motivation

Comparison to Formal Languages

PlanningProblem

Set of Solutions

FormalGrammar

Set of Words(Language)

?

Actions of a problem form the (terminal) symbols of a languageSolution criteria define valid wordsSet of solutions forms the language of the problem

→ Which languages can be expressed using a certain formalism?

Question (given before):

What can be expressed with the planning formalism at hand?

Answer:

STRIPS can represent (a subset of the) regular languages

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 57 / 73

Page 195: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Motivation

Comparison to Formal Languages

PlanningProblem

Set of Solutions

FormalGrammar

Set of Words(Language)

?

Actions of a problem form the (terminal) symbols of a languageSolution criteria define valid wordsSet of solutions forms the language of the problem

→ Which languages can be expressed using a certain formalism?

Question (given before):

What can be expressed with the planning formalism at hand?

Answer:

STRIPS can represent (a subset of the) regular languages

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 57 / 73

Page 196: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Motivation

Comparison to Formal Languages

PlanningProblem

Set of Solutions

FormalGrammar

Set of Words(Language)

?

Actions of a problem form the (terminal) symbols of a languageSolution criteria define valid wordsSet of solutions forms the language of the problem

→ Which languages can be expressed using a certain formalism?

Question (given before):

What can be expressed with the planning formalism at hand?

Answer:

STRIPS can represent (a subset of the) regular languagesTutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 57 / 73

Page 197: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Motivation

Expressivity via Comparison to Formal Languages

Chomsky hierarchy as reference framework

Corresponding problems from planning and formal languagesPlan Existence and Emptiness ProblemPlan Verification and Word ProblemPlan Recognition and Prefix Problem

Representation blow-up is not consideredTheoretical approach to assess expressivityMeasures expressivity, not computational complexity

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 58 / 73

Page 198: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Motivation

Expressivity via Comparison to Formal Languages

Chomsky hierarchy as reference frameworkCorresponding problems from planning and formal languages

Plan Existence and Emptiness ProblemPlan Verification and Word ProblemPlan Recognition and Prefix Problem

Representation blow-up is not consideredTheoretical approach to assess expressivityMeasures expressivity, not computational complexity

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 58 / 73

Page 199: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Motivation

Expressivity via Comparison to Formal Languages

ST RIPSHT N−ACHT N−T I

REG

REG = SCE

CFL

CFL = HT N−ORDHT N−NOOPHT N

CSL

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 59 / 73

Page 200: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Language of STRIPS with Conditional Effects

Theorem: STRIPS with conditional effects (SCE) is equivalent to theregular languages

Proof: (to show)

For every SCE planning problem, there is an equivalent regularlanguage

For every regular language, there is a SCE problem generating it

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 60 / 73

Page 201: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Language of STRIPS with Conditional Effects

Theorem: STRIPS with conditional effects (SCE) is equivalent to theregular languages

Proof: (to show)

For every SCE planning problem, there is an equivalent regularlanguage

For every regular language, there is a SCE problem generating it

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 60 / 73

Page 202: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Language of STRIPS with Conditional Effects

Let P = (V ,A, s0, g) be a planning problemWe define a Deterministic Finite Automaton (Σ,S, d , i, F) with

Σ is its input alphabetS its set of statesd : S × Σ→ S its state-transition functioni its initial stateF its set of final states

We defineΣ = AS = 2V

i contains exactly the literals that hold in s0

Every state including the literals in g is included in F

d(s, a) =

{s′, iff (τ(a, s) ∧ γ(a, s) = s′)

undefined , else

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 61 / 73

Page 203: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Language of STRIPS with Conditional Effects

Let P = (V ,A, s0, g) be a planning problemWe define a Deterministic Finite Automaton (Σ,S, d , i, F) with

Σ is its input alphabetS its set of statesd : S × Σ→ S its state-transition functioni its initial stateF its set of final states

We defineΣ = AS = 2V

i contains exactly the literals that hold in s0

Every state including the literals in g is included in F

d(s, a) =

{s′, iff (τ(a, s) ∧ γ(a, s) = s′)

undefined , else

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 61 / 73

Page 204: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Language of STRIPS with Conditional Effects

Let (Σ,S, d , i, F) be a Deterministic Finite Automaton

We define a planning problem P = (V ,A, s0, g)

V = S ∪ {g} and g 6∈ Ss0 = {i}, g ∈ s0 iff i ∈ FA equals the alphabet Σ

∀a ∈ A : prec(a)

= ∅

add(a)

= {({s} → {s′}

∪ G′

) | d(s, a) = s′}

with G′ =

{{g}, if s′ ∈ F

∅, else

del(a)

= {(∅ → V)}

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 62 / 73

Page 205: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Language of STRIPS with Conditional Effects

Let (Σ,S, d , i, F) be a Deterministic Finite AutomatonWe define a planning problem P = (V ,A, s0, g)

V = S ∪ {g} and g 6∈ Ss0 = {i}, g ∈ s0 iff i ∈ FA equals the alphabet Σ

∀a ∈ A : prec(a)

= ∅

add(a)

= {({s} → {s′}

∪ G′

) | d(s, a) = s′}

with G′ =

{{g}, if s′ ∈ F

∅, else

del(a)

= {(∅ → V)}

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 62 / 73

Page 206: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Language of STRIPS with Conditional Effects

Let (Σ,S, d , i, F) be a Deterministic Finite AutomatonWe define a planning problem P = (V ,A, s0, g)

V = S ∪ {g} and g 6∈ S

s0 = {i}, g ∈ s0 iff i ∈ FA equals the alphabet Σ

∀a ∈ A : prec(a)

= ∅

add(a)

= {({s} → {s′}

∪ G′

) | d(s, a) = s′}

with G′ =

{{g}, if s′ ∈ F

∅, else

del(a)

= {(∅ → V)}

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 62 / 73

Page 207: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Language of STRIPS with Conditional Effects

Let (Σ,S, d , i, F) be a Deterministic Finite AutomatonWe define a planning problem P = (V ,A, s0, g)

V = S ∪ {g} and g 6∈ Ss0 = {i},

g ∈ s0 iff i ∈ FA equals the alphabet Σ

∀a ∈ A : prec(a)

= ∅

add(a)

= {({s} → {s′}

∪ G′

) | d(s, a) = s′}

with G′ =

{{g}, if s′ ∈ F

∅, else

del(a)

= {(∅ → V)}

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 62 / 73

Page 208: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Language of STRIPS with Conditional Effects

Let (Σ,S, d , i, F) be a Deterministic Finite AutomatonWe define a planning problem P = (V ,A, s0, g)

V = S ∪ {g} and g 6∈ Ss0 = {i}, g ∈ s0 iff i ∈ F

A equals the alphabet Σ

∀a ∈ A : prec(a)

= ∅

add(a)

= {({s} → {s′}

∪ G′

) | d(s, a) = s′}

with G′ =

{{g}, if s′ ∈ F

∅, else

del(a)

= {(∅ → V)}

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 62 / 73

Page 209: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Language of STRIPS with Conditional Effects

Let (Σ,S, d , i, F) be a Deterministic Finite AutomatonWe define a planning problem P = (V ,A, s0, g)

V = S ∪ {g} and g 6∈ Ss0 = {i}, g ∈ s0 iff i ∈ FA equals the alphabet Σ

∀a ∈ A : prec(a)

= ∅

add(a)

= {({s} → {s′}

∪ G′

) | d(s, a) = s′}

with G′ =

{{g}, if s′ ∈ F

∅, else

del(a)

= {(∅ → V)}

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 62 / 73

Page 210: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Language of STRIPS with Conditional Effects

Let (Σ,S, d , i, F) be a Deterministic Finite AutomatonWe define a planning problem P = (V ,A, s0, g)

V = S ∪ {g} and g 6∈ Ss0 = {i}, g ∈ s0 iff i ∈ FA equals the alphabet Σ

∀a ∈ A : prec(a)

= ∅

add(a)

= {({s} → {s′}

∪ G′

) | d(s, a) = s′}

with G′ =

{{g}, if s′ ∈ F

∅, else

del(a)

= {(∅ → V)}

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 62 / 73

Page 211: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Language of STRIPS with Conditional Effects

Let (Σ,S, d , i, F) be a Deterministic Finite AutomatonWe define a planning problem P = (V ,A, s0, g)

V = S ∪ {g} and g 6∈ Ss0 = {i}, g ∈ s0 iff i ∈ FA equals the alphabet Σ

∀a ∈ A : prec(a) = ∅add(a)

= {({s} → {s′}

∪ G′

) | d(s, a) = s′}

with G′ =

{{g}, if s′ ∈ F

∅, else

del(a)

= {(∅ → V)}

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 62 / 73

Page 212: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Language of STRIPS with Conditional Effects

Let (Σ,S, d , i, F) be a Deterministic Finite AutomatonWe define a planning problem P = (V ,A, s0, g)

V = S ∪ {g} and g 6∈ Ss0 = {i}, g ∈ s0 iff i ∈ FA equals the alphabet Σ

∀a ∈ A : prec(a) = ∅add(a) = {({s} → {s′}

∪ G′

) | d(s, a) = s′}

with G′ =

{{g}, if s′ ∈ F

∅, else

del(a)

= {(∅ → V)}

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 62 / 73

Page 213: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Language of STRIPS with Conditional Effects

Let (Σ,S, d , i, F) be a Deterministic Finite AutomatonWe define a planning problem P = (V ,A, s0, g)

V = S ∪ {g} and g 6∈ Ss0 = {i}, g ∈ s0 iff i ∈ FA equals the alphabet Σ

∀a ∈ A : prec(a) = ∅add(a) = {({s} → {s′} ∪ G′) | d(s, a) = s′}

with G′ =

{{g}, if s′ ∈ F

∅, else

del(a)

= {(∅ → V)}

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 62 / 73

Page 214: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Language of STRIPS with Conditional Effects

Let (Σ,S, d , i, F) be a Deterministic Finite AutomatonWe define a planning problem P = (V ,A, s0, g)

V = S ∪ {g} and g 6∈ Ss0 = {i}, g ∈ s0 iff i ∈ FA equals the alphabet Σ

∀a ∈ A : prec(a) = ∅add(a) = {({s} → {s′} ∪ G′) | d(s, a) = s′}

with G′ =

{{g}, if s′ ∈ F

∅, else

del(a)

= {(∅ → V)}

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 62 / 73

Page 215: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Language of STRIPS with Conditional Effects

Let (Σ,S, d , i, F) be a Deterministic Finite AutomatonWe define a planning problem P = (V ,A, s0, g)

V = S ∪ {g} and g 6∈ Ss0 = {i}, g ∈ s0 iff i ∈ FA equals the alphabet Σ

∀a ∈ A : prec(a) = ∅add(a) = {({s} → {s′} ∪ G′) | d(s, a) = s′}

with G′ =

{{g}, if s′ ∈ F

∅, else

del(a) = {(∅ → V)}

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 62 / 73

Page 216: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Expressivity via Comparison to Formal Languages

ST RIPSHT N−ACHT N−T I

REG

REG = SCE

CFL

CFL = HT N−ORDHT N−NOOPHT N

CSL

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 63 / 73

Page 217: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Expressivity via Comparison to Formal Languages

ST RIPSHT N−ACHT N−T I

REG

REG = SCECFL

CFL = HT N−ORDHT N−NOOPHT N

CSL

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 63 / 73

Page 218: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Totally Ordered HTN Planning Problems

Decomposition in totally ordered HTN planning problems is verysimilar to rule application in context-free grammars

A

B Dc A 7→ BcD

The encoding of (totally ordered) HTN decomposition as(context-free) grammar rules and vice versa is straightforward

Constraints introduced by preconditions and effects can betreated via intersection with a regular language

→ HT N−ORD = CFL

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 64 / 73

Page 219: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Totally Ordered HTN Planning Problems

Decomposition in totally ordered HTN planning problems is verysimilar to rule application in context-free grammars

A

B Dc A 7→ BcD

The encoding of (totally ordered) HTN decomposition as(context-free) grammar rules and vice versa is straightforward

Constraints introduced by preconditions and effects can betreated via intersection with a regular language

→ HT N−ORD = CFL

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 64 / 73

Page 220: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Totally Ordered HTN Planning Problems

Decomposition in totally ordered HTN planning problems is verysimilar to rule application in context-free grammars

A

B Dc A 7→ BcD

The encoding of (totally ordered) HTN decomposition as(context-free) grammar rules and vice versa is straightforward

Constraints introduced by preconditions and effects can betreated via intersection with a regular language

→ HT N−ORD = CFL

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 64 / 73

Page 221: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Expressivity via Comparison to Formal Languages

ST RIPSHT N−ACHT N−T I

REG

REG = SCECFL

CFL = HT N−ORDHT N−NOOPHT N

CSL

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 65 / 73

Page 222: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Expressivity via Comparison to Formal Languages

ST RIPSHT N−ACHT N−T I

REG

REG = SCE

CFL

CFL = HT N−ORD

HT N−NOOPHT N

CSL

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 65 / 73

Page 223: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Expressivity via Comparison to Formal Languages

ST RIPSHT N−AC

HT N−T I

REG

REG = SCE

CFL

CFL = HT N−ORD

HT N−NOOPHT N

CSL

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 65 / 73

Page 224: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Expressivity via Comparison to Formal Languages

ST RIPS

HT N−ACHT N−T I

REG

REG = SCE

CFL

CFL = HT N−ORD

HT N−NOOPHT N

CSL

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 65 / 73

Page 225: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Expressivity via Comparison to Formal Languages

ST RIPSHT N−ACHT N−T I

REG

REG = SCE

CFL

CFL = HT N−ORD

HT N−NOOPHT N

CSL

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 65 / 73

Page 226: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Noop HTN Planning Problems

Subtasks of the problem’s methods may be partially ordered

First class we look at:

HT N−NOOP – actions have no preconditions and effects

Can a partially ordered method be transfered to a set of totallyordered methods?

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 66 / 73

Page 227: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Noop HTN Planning Problems

Subtasks of the problem’s methods may be partially ordered

First class we look at:

HT N−NOOP – actions have no preconditions and effects

Can a partially ordered method be transfered to a set of totallyordered methods?

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 66 / 73

Page 228: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Noop HTN Planning Problems

Subtasks of the problem’s methods may be partially ordered

First class we look at:

HT N−NOOP – actions have no preconditions and effects

Can a partially ordered method be transfered to a set of totallyordered methods?

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 66 / 73

Page 229: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Noop HTN Planning Problems

HTN GrammarE

F G

a b c d

E 7→ FG

E 7→ GF

F 7→ ab

G 7→ cd

Word 1 cdab X Word 2 acbd X

ab||cd {abcd} ∪ {cdab}

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 67 / 73

Page 230: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Noop HTN Planning Problems

HTN GrammarE

F G

a b c d

E 7→ FG

E 7→ GF

F 7→ ab

G 7→ cd

Word 1 cdab

X Word 2 acbd X

ab||cd {abcd} ∪ {cdab}

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 67 / 73

Page 231: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Noop HTN Planning Problems

HTN GrammarE

F G

a b c d

E 7→ FG

E 7→ GF

F 7→ ab

G 7→ cd

Word 1 cdab X

Word 2 acbd X

ab||cd {abcd} ∪ {cdab}

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 67 / 73

Page 232: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Noop HTN Planning Problems

HTN GrammarE

F G

a b c d

E 7→ FG

E 7→ GF

F 7→ ab

G 7→ cd

Word 1 cdab X Word 2 acbd

X

ab||cd {abcd} ∪ {cdab}

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 67 / 73

Page 233: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Noop HTN Planning Problems

HTN GrammarE

F G

a b c d

E 7→ FG

E 7→ GF

F 7→ ab

G 7→ cd

Word 1 cdab X Word 2 acbd X

ab||cd {abcd} ∪ {cdab}

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 67 / 73

Page 234: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Noop HTN Planning Problems

HTN GrammarE

F G

a b c d

E 7→ FG

E 7→ GF

F 7→ ab

G 7→ cd

Word 1 cdab X Word 2 acbd X

ab||cd {abcd} ∪ {cdab}

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 67 / 73

Page 235: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Noop HTN Planning Problems

The HTN depicted below generates the language anbn||cmdm

Using the Pumping Lemma for context-free languages, it can beshown that this language is not context-free

→ CFL (HT N−NOOP

E

F

F

G

Ga b c da b c d

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 68 / 73

Page 236: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Noop HTN Planning Problems

The HTN depicted below generates the language anbn||cmdm

Using the Pumping Lemma for context-free languages, it can beshown that this language is not context-free

→ CFL (HT N−NOOPE

F

F

G

Ga b c da b c d

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 68 / 73

Page 237: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Expressivity via Comparison to Formal Languages

ST RIPSHT N−ACHT N−T I

REG

REG = SCE

CFL

CFL = HT N−ORD

HT N−NOOPHT N

CSL

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 69 / 73

Page 238: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Expressivity via Comparison to Formal Languages

ST RIPSHT N−ACHT N−T I

REG

REG = SCE

CFL

CFL = HT N−ORDHT N−NOOP

HT N

CSL

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 69 / 73

Page 239: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Full HTN Planning Problems

For every HTN there is a linear space-bounded Turing machinethat decides its word problem

→ HT N ⊆ CSL

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 70 / 73

Page 240: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Full HTN Planning Problems

For every HTN there is a linear space-bounded Turing machinethat decides its word problem

→ HT N ⊆ CSL

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 70 / 73

Page 241: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Expressivity via Comparison to Formal Languages

ST RIPSHT N−ACHT N−T I

REG

REG = SCE

CFL

CFL = HT N−ORDHT N−NOOP

HT N

CSL

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 71 / 73

Page 242: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Expressivity via Comparison to Formal Languages

ST RIPSHT N−ACHT N−T I

REG

REG = SCE

CFL

CFL = HT N−ORDHT N−NOOPHT NCSL

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 71 / 73

Page 243: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Expressivity via Comparison to Formal Languages

Chomsky hierarchy as reference frameworkCorresponding problems from planning and formal languages

Plan Existence and Emptiness ProblemPlan Verification and Word ProblemPlan Recognition and Prefix Problem

Representation blow-up is not consideredTheoretical approach to assess expressivityMeasures expressivity, not computational complexity

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 72 / 73

Page 244: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Expressivity via Comparison to Formal Languages

Chomsky hierarchy as reference frameworkCorresponding problems from planning and formal languages

Plan Existence and Emptiness ProblemPlan Verification and Word ProblemPlan Recognition and Prefix Problem

Representation blow-up is not consideredTheoretical approach to assess expressivityMeasures expressivity, not computational complexity

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 72 / 73

Page 245: Tutorial: An Introduction to Hierarchical Task Network ... · Single-agent Just one kind of action! Planning: Offline Usually ground and via progression search Solutions are action

About the Tutorial Introduction Problem Formalization Plan Existence Problem Expressivity Analysis

Analysis of Common Planning Formalisms

Thank You for Your Attention!

Thank you for your attention!

Are there questions?

Tutorial: An Introduction to Hierarchical Task Network (HTN) Planning June 25th, ICAPS 2018 (Delft) 73 / 73