168
Timeline-based Planning: Theory and Practice Andrea Orlandini and Alessandro Umbrico ISTC-CNR, Rome, Italy Nicola Gigante and Angelo Montanari University of Udine, Italy IJCAI 2019 Macao, China August 12, 2019

Timeline-based Planning: Theory and Practice

  • Upload
    others

  • View
    11

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Timeline-based Planning: Theory and Practice

Timeline-based Planning:

Theory and Practice

Andrea Orlandini and Alessandro UmbricoISTC-CNR, Rome, ItalyNicola Gigante and Angelo MontanariUniversity of Udine, Italy

IJCAI 2019Macao, China

August 12, 2019

Page 2: Timeline-based Planning: Theory and Practice

2

Automated planning

Automated planning is one of the most studied fields of AI.

Most planning languages (e.g., PDDL) are action-based:the foundational concepts are those of state and action

actions are executed to affect the statea plan is a sequence of actions that, when executed from a givenstarting point, reach a state satisfying a given goal

Page 3: Timeline-based Planning: Theory and Practice

3

Timeline-based planning

Timeline-based planning is a different approach to AI planning originallyintroduced in the context of planning and scheduling of space operations.

Muscettola (1994)Nicola Muscettola (1994). “HSTS: Integrating Planning and Scheduling.” In: Intelligent Scheduling.Ed. by Monte Zweben and Mark S. Fox. Morgan Kaufmann. Chap. 6, pp. 169–212

Page 4: Timeline-based Planning: Theory and Practice

4

Goals of the tutorial

Providing a general introduction to timeline-based planning,with a focus on recent developments.

Page 5: Timeline-based Planning: Theory and Practice

5

Timeline of the tutorial

1 IntroductionContext and motivationsTimelinesFlexible timelinesTimelines in practice: PLATINUm

2 Expressiveness and ComplexityExpressivenessComplexity

3 Timeline-based planning with uncertainty

4 Timelines and temporal logic

5 Timeline-based planning overdense temporal domains

6 Conclusions

Page 6: Timeline-based Planning: Theory and Practice

6

Organizers

AndreA Orlandini ResearcherNational Research Council of Italy (CNR-ISTC)Planning and Execution, Robotics, Human-Robot Interaction.

Alessandro Umbrico Associate ResearcherNational Research Council of Italy (CNR-ISTC)Planning and Execution, KnowledgeRepresentation and Reasoning, Robotics.

Nicola Gigante Postdoctoral researcherUniversity of Udine, Italy.Temporal Reasoning in AI, Temporal Logic,Formal Methods

Angelo Montanari Full ProfessorUniversity of Udine, Italy.Temporal Logics, Formal Methods, Synthesis.

Special GuestAmedeo Cesta Research Director

National Research Council of Italy (CNR-ISTC)Planning and Scheduling, Cognitive Systems,Constraint Reasoning, AI Applications.

Page 7: Timeline-based Planning: Theory and Practice

7

Introduction

Page 8: Timeline-based Planning: Theory and Practice

8

Timeline-based planning (2)

Timeline-based planning is an approach to planning mostly focused ontemporal reasoning:

no clear separation between actions, states, and goals;planning problems are modeled as systems made of a number ofindependent, but interacting, components;components are described by state variables;the timelines describe their evolution over time;the evolution of the system is governed by a set oftemporal constraints called synchronization rules.

Page 9: Timeline-based Planning: Theory and Practice

9

Why timelines?

Timeline-based planning systems shine when:modeling and reasoning about systems made of many components,rather than the behavior of a single agentapproaching problems where temporal reasoning is predominantthe planning process needs to be integrated with plan execution

Page 10: Timeline-based Planning: Theory and Practice

10

Timelines and space exploration

Timeline-based planning was born in the space operations field, and hasbeen (and still is) used in actual mission planning and scheduling systems,both on-board and on-ground.

HSTS (Muscettola 1994) APSI-TRF (A. Cesta et al. 2009)EUROPA (Barreiro et al. 2012) GOAC (Fratini et al. 2011)ASPEN (S. Chien et al. 2000)

Page 11: Timeline-based Planning: Theory and Practice

11

Space exploration missions

Example - Rosetta

GoalReach the comet 67P/Churyumov–Gerasimenko and study it.

Some data:Project started in 1993Launched in 2004Travelled 6.4 billion kilometers in ten yearssix fly-bysReached the comet and dropped a lander on its surfaceorbited the comet for two years afterwardsESA mission, science operations planned with NASA’s ASPEN system

S. A. Chien et al. (2015)Steve A. Chien, Rabideau, Tran, Troesch, Doubleday, Nespoli, Perez Ayucar, Costa Sitja, Vallat, Geiger,Altobelli, Fernandez, Vallejo, Andres, and Kueppers (2015). “Activity-Based Scheduling of ScienceCampaigns for the Rosetta Orbiter.” In: Proc. of IJCAI 2015, pp. 4416–4422

Page 12: Timeline-based Planning: Theory and Practice

12

Space exploration missions

Example - Mars Express

GoalReach and orbit around Mars, performing a set of scientific measurements

Some data:Launched in 2003Reached Mars six months laterStill in active operation (prospected until 2020)Discovered liquid underglacial water lake in 2018ESA mission operated at ESOC in Darmstadt

Amedeo Cesta et al. (2007)Amedeo Cesta, Gabriella Cortellessa, Michel Denis, Alessandro Donati, Simone Fratini, Angelo Oddi,Nicola Policella, Erhard Rabenau, and Jonathan Schulster (2007). “Mexar2: AI Solves MissionPlanner Problems.” In: IEEE Intelligent Systems 22.4, pp. 12–19

Page 13: Timeline-based Planning: Theory and Practice

13

Space exploration missions

Challenges of mission planning

Mission planning poses many challenges:

Many teams of scientists compete on Earth for the use of the manyinstruments mounted on the spacecraftEach instrument has its own operating conditionsmemory is limited, data has to be transmitted back to Earthas soon as possibletransmission can only occur when:

a ground station is visiblethe antenna is pointed towards Earththere is enough energy

data transmission is also needed to upload new plansmaintanance and diagnostics operations have to be performed regularly

Page 14: Timeline-based Planning: Theory and Practice

13

Space exploration missions

Challenges of mission planning

Mission planning poses many challenges:

Temporal reasoningUse of resourcesHandling of temporal uncertainty during plan execution

Page 15: Timeline-based Planning: Theory and Practice

14

Almost 30 years of Timelines...

Muscettola, Smith, Cesta, D’Aloisi ICRA 91

Muscettola, Smith, Cesta, D’Aloisi IEEE Control Systems 92

Cesta Oddi AIxIA 95

Cesta Stella ECP 97

Cesta Oddi Smith J. Heuristics 02

Cesta et al ECAI 06 (MEXAR)

Cesta et al IEEE IntelliSys 07 (MEXAR2)

Donati et al SpaceOps 08 (APSI)

Cesta Fratini Pecora IEA/AIE 08 (APSI-TRF)

Cesta et al ECAI 08 (RAXEM)

Fratini et al ASTRA 11 (APSI GOAC)

Cesta et al AIxIA 15 (EPSL)

Cialdea et al ACTA INFORMATICA 16

Umbrico et al AIxIA 17 (PLATINUm)

Umbrico et al ICAPS 18 (PLATINUm Res)

Muscettola CMU RI 94 (HSTS)

Pell et al SPIE 96 (REMOTE AGENT)

Muscettola et al AIJ 98

Smith et al KER 00 (EUROPA)

Muscettola et al IWPSS 02 (IDEA)

Frank & Jonsson Constraints 03

Bedraix-Weiss et al ICAPS 04 (EUROPA 2)

Bernardini & Smith, Phd Thesis/KEPS 08

McGann, Py, Rajan AMAAS 07 (T-REX)

... many successful deployments ...

Sherwood et al IEEE Aerospace 98 (ASPEN)

Knight et al IEEE Intelligent Systems 01 (CASPER)

Chien et al AAMAS 04 (EO-1 ASE)

... many successful deployments ...

Chien et al IJCAI 15 (ROSETTA)

…and many others …

Page 16: Timeline-based Planning: Theory and Practice

15

Timeline-based modeling languages

The many different systems come with different concrete modelinglanguages:

DDL.3 (APSI-TRF)NDDL (EUROPA,PLATINUm)AML (ASPEN)

SYNCHRONIZE RoverCont ro l le r . rover {

VALUE TakeSample ( ? loc , ? f i l e ) {

cd0 NavContro l ler . nav . At ( ? loc0 ) ;cd1 Ins t rPos . i n s t _pos i t i on . Unstowed ( ) ;cd2 InstrOp . ins t_operat ion . Sampling ( ? loc2 ) ;

DURING [0 , + INF ] [ 0 , + INF ] cd0 ;CONTAINS [0 , + INF ] [ 0 , + INF ] cd1 ;CONTAINS [0 , + INF ] [ 0 , + INF ] cd2 ;

cd2 DURING [0 , + INF ] [ 0 , + INF ] cd1 ;

? loc0 = ? loc ;? loc2 = ? loc ;

}}

The recent ANML language includes both action-based and timeline-basedelements (Smith et al. 2008).

Page 17: Timeline-based Planning: Theory and Practice

16

Timeline-based modeling languages (2)

The language spectrum is too broad to cover them all here.

Instead, we consider a simpler formal language that captures the mostimportant features of most concrete timeline-based modeling languages.

Cialdea Mayer et al. (2016)Marta Cialdea Mayer, Andrea Orlandini, and Alessandro Umbrico (2016). “Planning and Executionwith Flexible Timelines: a Formal Account.” In: Acta Informatica 53.6-8, pp. 649–680

Page 18: Timeline-based Planning: Theory and Practice

17

Running example

Mars orbiter

Toy example of a Mars orbiter doing scientific measurements:1 Three “pointing modes”: Mars, Slewing, Earth2 Four “activities”: Science, Communication, Maintenance, Idle3 Temporal constraints:

Scientific measurements can be done only when pointing to MarsCommunication can happen:

only when pointing to Earthonly when a receiving ground station is visible

4 Goals:Perform at least a given number of scientific measurements

Page 19: Timeline-based Planning: Theory and Practice

17

Running example

Mars orbiter

Toy example of a Mars orbiter doing scientific measurements:1 Three “pointing modes”: Mars, Slewing, Earth2 Four “activities”: Science, Communication, Maintenance, Idle3 Temporal constraints:

Scientific measurements can be done only when pointing to MarsCommunication can happen:

only when pointing to Earthonly when a receiving ground station is visible

4 Goals:Perform at least a given number of scientific measurements

Page 20: Timeline-based Planning: Theory and Practice

17

Running example

Mars orbiter

Toy example of a Mars orbiter doing scientific measurements:1 Three “pointing modes”: Mars, Slewing, Earth2 Four “activities”: Science, Communication, Maintenance, Idle3 Temporal constraints:

Scientific measurements can be done only when pointing to MarsCommunication can happen:

only when pointing to Earthonly when a receiving ground station is visible

4 Goals:Perform at least a given number of scientific measurements

Page 21: Timeline-based Planning: Theory and Practice

17

Running example

Mars orbiter

Toy example of a Mars orbiter doing scientific measurements:1 Three “pointing modes”: Mars, Slewing, Earth2 Four “activities”: Science, Communication, Maintenance, Idle3 Temporal constraints:

Scientific measurements can be done only when pointing to MarsCommunication can happen:

only when pointing to Earthonly when a receiving ground station is visible

4 Goals:Perform at least a given number of scientific measurements

Page 22: Timeline-based Planning: Theory and Practice

17

Running example

Mars orbiter

Toy example of a Mars orbiter doing scientific measurements:1 Three “pointing modes”: Mars, Slewing, Earth2 Four “activities”: Science, Communication, Maintenance, Idle3 Temporal constraints:

Scientific measurements can be done only when pointing to MarsCommunication can happen:

only when pointing to Earthonly when a receiving ground station is visible

4 Goals:Perform at least a given number of scientific measurements

Page 23: Timeline-based Planning: Theory and Practice

17

Running example

Mars orbiter

Toy example of a Mars orbiter doing scientific measurements:1 Three “pointing modes”: Mars, Slewing, Earth2 Four “activities”: Science, Communication, Maintenance, Idle3 Temporal constraints:

Scientific measurements can be done only when pointing to MarsCommunication can happen:

only when pointing to Earthonly when a receiving ground station is visible

4 Goals:Perform at least a given number of scientific measurements

Page 24: Timeline-based Planning: Theory and Practice

17

Running example

Mars orbiter

zzz

Toy example of a Mars orbiter doing scientific measurements:1 Three “pointing modes”: Mars, Slewing, Earth2 Four “activities”: Science, Communication, Maintenance, Idle3 Temporal constraints:

Scientific measurements can be done only when pointing to MarsCommunication can happen:

only when pointing to Earthonly when a receiving ground station is visible

4 Goals:Perform at least a given number of scientific measurements

Page 25: Timeline-based Planning: Theory and Practice

18

Timeline-based planning problems

State variables

State variables represent the components of the system:

x = (Vx, Tx,Dx,γx)

domain

transition functionTx ∶ Vx → 2Vx

duration functionDx ∶ Vx → N × (N ∪ {+∞})

controllability tagγx ∶ Vx → {c,u}

We assume a discrete temporal domain.

Page 26: Timeline-based Planning: Theory and Practice

19

Timeline-based planning problems

State variables

Three variables in our example, xm (mode), xa (activity), and xv (visibility).

Slewing[1,+∞]

Earth[30, 30]

Mars[36, 58]

Comm[30, 50]

Idle[30,+∞]

Maintenance[50, 90]

Science[20, 60]

Visible[60, 100]

Not Visible[1, 100]

The tasks Communication, Visible, and Not Visible are uncontrollable.The xv variable is external.

Page 27: Timeline-based Planning: Theory and Practice

20

Timeline-based planning problems

Timelines

TxpEarth Slewing Mars Slewing Earth

TxaIdle Science Idle Comm Idle

TxvVisible Not Visible Visible

Timelines are sequences of tokens;time intervals where the variable holds a single valuetransitions respect Tx , durations respect Dx

Page 28: Timeline-based Planning: Theory and Practice

21

Timeline-based planning problems

Synchronisation rules

The interaction of the components is governed by the synchronization rules.

Example

Scientific measurements can be done only when pointing to Mars:

a[xa = Science] → ∃b[xp = Mars] . start(b) ≤ start(a) ∧ end(a) ≤ end(b)

for all tokens a where xa = Science,there is a token b where xp = Mars,such that a is contained in b.

Page 29: Timeline-based Planning: Theory and Practice

21

Timeline-based planning problems

Synchronisation rules

The interaction of the components is governed by the synchronization rules.

Example

Scientific measurements can be done only when pointing to Mars:

a[xa = Science] → ∃b[xp = Mars] . start(b) ≤ start(a) ∧ end(a) ≤ end(b)

for all tokens a where xa = Science,there is a token b where xp = Mars,such that a is contained in b.

Page 30: Timeline-based Planning: Theory and Practice

21

Timeline-based planning problems

Synchronisation rules

The interaction of the components is governed by the synchronization rules.

Example

Scientific measurements can be done only when pointing to Mars:

a[xa = Science] → ∃b[xp = Mars] . start(b) ≤ start(a) ∧ end(a) ≤ end(b)

for all tokens a where xa = Science,there is a token b where xp = Mars,such that a is contained in b.

Page 31: Timeline-based Planning: Theory and Practice

21

Timeline-based planning problems

Synchronisation rules

The interaction of the components is governed by the synchronization rules.

Example

Scientific measurements can be done only when pointing to Mars:

a[xa = Science] → ∃b[xp = Mars] . start(b) ≤ start(a) ∧ end(a) ≤ end(b)

for all tokens a where xa = Science,there is a token b where xp = Mars,such that a is contained in b.

Page 32: Timeline-based Planning: Theory and Practice

22

Syntax

Each rule has a fixed structure:

a[x = u] → ∃b[y = v] . ⟨body⟩ ∨ ∃c[z = w]d[k = r] . ⟨body⟩ ∨ . . .

triggerexistential statement

Page 33: Timeline-based Planning: Theory and Practice

23

Syntax (2)

The body is made of a conjunction of atomic temporal relations:

start(a) ≤[l,u] end(b)endpoint

token name

lower boundl ∈ N

upper boundu ∈ N ∪ {+∞}

Page 34: Timeline-based Planning: Theory and Practice

24

Other examples

Comm. can only happen when the ground station is visible:

a[xa = Comm] → ∃b[xv = Visible] . start(b) ≤ start(a) ∧ end(a) ≤ end(b)

The spacecraft can slew only during idle periods:

a[xm = Slewing] → ∃b[xa = Idle] . start(b) ≤ start(a) ∧ end(a) ≤ end(b)

Maintenance has to happen at most 200 time steps after a measurement:

a[xa = Science] → ∃b[xa = Maintenance] . end(a) ≤[0,200] start(b)

GoalAt least four scientific measurements must be performed:

⊤ → ∃b1[xa = Science]b2[xa = Science]b3[xa = Science]b4[xa = Science] .b1 ≠ b2 ≠ b3 ≠ b4

Page 35: Timeline-based Planning: Theory and Practice

25

Timeline-based planning problems

Without uncontrollable parts

Timeline-based planning problem

Given problem P = (SV, S), where SV is a set of state variables, and S is a setof rules over SV , find a set of timelines over SV that satisfy the rules in S.

Timeline-based planning problem with bounded horizon

Given problem P = (SV, S,H), where P = (SV, S) is a timeline-based planningproblem and H ≥ 0 is the bound on the solution plan horizon.

A solution plan is a set of timelines, one for each v ∈ SV , that satisfy all thesynchronization rules in S.

Page 36: Timeline-based Planning: Theory and Practice

26

Handling execution

Timeline-based plans have to be actually executed sooner or later:the executor has to start and stop the given tasks at the giventimepointsbut the interaction with the environment is difficult:

it may be impossible to guarantee the required precisionthe execution has to account for uncontrollable tasks

Hence plans have to support some flexibility in order to be executed.

Page 37: Timeline-based Planning: Theory and Practice

27

Flexible Timelines

Flexible timelines describe the required temporal flexibility.

FxmEarth

110 120

Slewing

140 150

Science

181 200

Slewing

215 233

Earth

TxmEarth

115

Slewing

148

Science

185

Slewing

220

Earth

The projection to concrete timings give us a scheduled timeline.

Page 38: Timeline-based Planning: Theory and Practice

28

Flexible Plans

A “good” projection must satisfy the synchronization rules of the problem.

Example

a[x = v] → ∃b[y = v ′]. end(a) ≤[0,0] start(b) ∨ end(a) ≤[5,10] start(b)

Fx. . . v

30 50

. . .

Tx. . . v . . .

Fy. . .

30 60

v ′ . . .

Ty. . . v ′ . . .

Not every pair of projections of x and y satisfies the rule.

The representation of flexible plans must discard invalid instances.

Page 39: Timeline-based Planning: Theory and Practice

28

Flexible Plans

A “good” projection must satisfy the synchronization rules of the problem.

Example

a[x = v] → ∃b[y = v ′]. end(a) ≤[0,0] start(b) ∨ end(a) ≤[5,10] start(b)

Fx. . . v

30 50

. . .

Tx. . . v . . .

Fy. . .

30 60

v ′ . . .

Ty. . . v ′ . . .

Not every pair of projections of x and y satisfies the rule.

The representation of flexible plans must discard invalid instances.

Page 40: Timeline-based Planning: Theory and Practice

28

Flexible Plans

A “good” projection must satisfy the synchronization rules of the problem.

Example

a[x = v] → ∃b[y = v ′]. end(a) ≤[0,0] start(b) ∨ end(a) ≤[5,10] start(b)

Fx. . . v

30 50

. . .

Tx. . . v . . .

Fy. . .

30 60

v ′ . . .

Ty. . . v ′ . . .

Not every pair of projections of x and y satisfies the rule.

The representation of flexible plans must discard invalid instances.

Page 41: Timeline-based Planning: Theory and Practice

28

Flexible Plans

A “good” projection must satisfy the synchronization rules of the problem.

Example

a[x = v] → ∃b[y = v ′]. end(a) ≤[0,0] start(b) ∨ end(a) ≤[5,10] start(b)

Fx. . . v

30 50

. . .

Tx. . . v . . .

Fy. . .

30 60

v ′ . . .

Ty. . . v ′ . . .

Not every pair of projections of x and y satisfies the rule.

The representation of flexible plans must discard invalid instances.

Page 42: Timeline-based Planning: Theory and Practice

29

Flexible Plans (2)

A set of temporal relations can be used to restrict the projections to asubset satisfying the problem’s rules.

Fx. . . v . . .

Tx. . . v . . .

Fy. . . v ′ . . .

Ty. . . v ′ . . .

Π1 = ({Fx, Fy}, {end(x) = start(y), . . . })

Page 43: Timeline-based Planning: Theory and Practice

29

Flexible Plans (2)

A set of temporal relations can be used to restrict the projections to asubset satisfying the problem’s rules.

Fx. . . v . . .

Tx. . . v . . .

Fy. . . v ′ . . .

Ty. . . v ′ . . .

Π2 = ({Fx, Fy}, {end(x) ≤[5,10] start(y), . . . })

Page 44: Timeline-based Planning: Theory and Practice

30

Flexible Plans (3)

Flexible plan

A flexible plan Π is a pair (FTL,R) whereFTL is a set of flexible timelinesR is a set of relations on tokens in FTL.

such that any set of projections of FTL satisfying R is guaranteed to satisfythe problem’s synchronization rules.

The plan Π = (FTL,R) identifies a set of valid projections.an instance of the flexible plan Π = (FTL,R) is a set of projections ofFTL satisfying every relation in Rvalid plans have at least one instancethe plan describes the relevant aspects of a possible way to satisfy theproblem’s rule, while keeping the temporal flexibility required for theexecution

Page 45: Timeline-based Planning: Theory and Practice

31

Controllability

A flexible plan describes a set of valid instances, but:different choices for the duration of uncontrollable tasks correspond todifferent instancesthe executor might not be able to know in advance which of suchinstances to pickcan we guarantee the execution of the plan regardless of theenvironment’s choices?

Page 46: Timeline-based Planning: Theory and Practice

32

Controllability (2)

A flexible plan Π = (FTL,R) is

weakly controllable if there is a valid instance for each environmentchoice of the duration of uncontrollable tasksstrongly controllable if there is one choice for the duration ofcontrollable tasks that suitably handle any environment’s choice.dynamically controllable if there is a dynamic execution strategy for Π– durations are decided on-the-fly based on past history

Concepts and terminology borrowed from the world of Simple Temporal

Networks with Uncertainty (Vidal and Fargier 1999).

Dynamic controllability is most often the desired property.

Page 47: Timeline-based Planning: Theory and Practice

33

Controllability (3)

How to get dynamically controllable flexible plans?

flexible plans can be represented by STNUsDC checking performed on STNUsreachability in networks of timed game automata

(Cialdea Mayer and Orlandini 2015).

Page 48: Timeline-based Planning: Theory and Practice

34

PLATINUm

Page 49: Timeline-based Planning: Theory and Practice

35

Expressiveness and Complexity

Page 50: Timeline-based Planning: Theory and Practice

36

Timeline-based planning: theoretical foundations

We have seen how timeline-based planning has been successfully employedin the last decades.Despite this, timelines have not been thoroghly studied,until recently, from a theoretical perspective:

computational complexity of timeline-based planning problems;expressiveness of modeling languages;comparison with PDDL-like action-based languages.

Page 51: Timeline-based Planning: Theory and Practice

37

Timeline-based planning: theoretical foundations (2)

Long-term goal

To provide a thorough theoretical understanding of the timeline-basedapproach to planning.

Page 52: Timeline-based Planning: Theory and Practice

38

The basic setting

The starting point is the formalization introduced earlier by Andrea. All thedetails can be found in the following resource.

Cialdea Mayer et al. (2016)Marta Cialdea Mayer, Andrea Orlandini, and Alessandro Umbrico (2016). “Planning and Executionwith Flexible Timelines: a Formal Account.” In: Acta Informatica 53.6-8, pp. 649–680

Page 53: Timeline-based Planning: Theory and Practice

39

Expressiveness

We started our study from the expressiveness side.How do these problems relate to the action-based counterparts?Which problems can be expressed with timelines vs. actions and vice versa?

Page 54: Timeline-based Planning: Theory and Practice

40

Temporal planning

Which is the right action-based counterpart?Temporal planning, in the form of PDDL with durative actions:

each action has a duration, possibly dependent on some precondition;actions can be executed concurrently and overlap in time.

Page 55: Timeline-based Planning: Theory and Practice

41

Assumptions

At first, we made a specific set of assumptions:no uncertainty;

news on uncertainty later in the tutorial;discrete time domain;

there are recent and ongoing developments on dense time domains as well.

Can we compactly (polynomially) encode a temporal planning problem Pinto a set S of rules?

Page 56: Timeline-based Planning: Theory and Practice

42

Critical syntactic elements

Timeline-based planning is a rich formalism.Many elements non-trivially affect expressiveness and complexity:

the bound on the solution horizon, accepted as part of the input;accepting unbounded temporal relations, such asstart(a) ≤[0,+∞] start(b);accepting tokens of unbounded length, i.e. variables x = (V, T,D,γ)where D(v) = (0,+∞) for some v ∈ V ;constrained syntactic structure of the synchronization rules:

fixed ∀∃ quantification schemeonly top-level disjunctionsno negation

Page 57: Timeline-based Planning: Theory and Practice

43

Timelines vs. Actions

PDDL is simpler. It turns out that timeline-based planning problems canfully capture temporal PDDL with:

no bound on the solution horizon;only tokens of bounded length;only bounded relations:

start(a) ≤[0,+∞] start(b)start(a) ≤[0,+∞] start(b)

Note: these restrictions are quite artificial, but they give us the smallest (yet)expressive enough instance of the problem.

TIME 2016Nicola Gigante, Angelo Montanari, Marta Cialdea Mayer, and Andrea Orlandini (2016). “Timelinesare Expressive Enough to Capture Action-Based Temporal Planning.” In: Proc. of the 23rdInternational Symposium on Temporal Representation and Reasoning, pp. 100–109

Page 58: Timeline-based Planning: Theory and Practice

44

Complexity of timeline-based planning

Computational complexity is another important theoretical property that wewanted to study.

Finding a solution plan for a temporal PDDL problem isEXPSPACE-complete.How about finding solution plans for a timeline-based planningproblem P = (SV, S)?

Page 59: Timeline-based Planning: Theory and Practice

45

Complexity of timeline-based planning (2)

The expressiveness results already give us a lower bound:finding solution plans for timeline-based planning problems isEXPSPACE-hard.

But is there a matching upper bound?

Page 60: Timeline-based Planning: Theory and Practice

46

Complexity

Admitting a bound on the horizon affects the complexity:if we admit unbounded relations, the problem is stillEXPSPACE-complete;with bounds to the solution horizon the complexity drops:NEXPTIME-complete;

ICAPS 17Nicola Gigante, Angelo Montanari, Marta Cialdea Mayer, and Andrea Orlandini (2017). “Complexity ofTimeline-based Planning.” In: Proc. of the 27th International Conference on Automated Planningand Scheduling, pages 116–124

Page 61: Timeline-based Planning: Theory and Practice

47

Complexity with unbounded horizon

The core of the complexity proof is a small-model result.

Theorem 1If a problem P has a solution, then a solution exists of length at most doublyexponential in the size of P.

Then, a nondeterministic procedure running in exponential space is used tofind the solution.

Page 62: Timeline-based Planning: Theory and Practice

48

Complexity with unbounded horizon

The nondeterministic decision procedure works as follows.

a solution of length 22nis nondeterministically guessed,

the solution is checked by sliding an exponential window over thesolution,

Page 63: Timeline-based Planning: Theory and Practice

48

Complexity with unbounded horizon

The nondeterministic decision procedure works as follows.

22n

a solution of length 22nis nondeterministically guessed,

the solution is checked by sliding an exponential window over thesolution,

Page 64: Timeline-based Planning: Theory and Practice

48

Complexity with unbounded horizon

The nondeterministic decision procedure works as follows.

22n

2n

a solution of length 22nis nondeterministically guessed,

the solution is checked by sliding an exponential window over thesolution,

Page 65: Timeline-based Planning: Theory and Practice

48

Complexity with unbounded horizon

The nondeterministic decision procedure works as follows.

22n

2n

a solution of length 22nis nondeterministically guessed,

the solution is checked by sliding an exponential window over thesolution,

Page 66: Timeline-based Planning: Theory and Practice

48

Complexity with unbounded horizon

The nondeterministic decision procedure works as follows.

22n

2n

a solution of length 22nis nondeterministically guessed,

the solution is checked by sliding an exponential window over thesolution,

Page 67: Timeline-based Planning: Theory and Practice

48

Complexity with unbounded horizon

The nondeterministic decision procedure works as follows.

22n

2n

a solution of length 22nis nondeterministically guessed,

the solution is checked by sliding an exponential window over thesolution,

Page 68: Timeline-based Planning: Theory and Practice

48

Complexity with unbounded horizon

The nondeterministic decision procedure works as follows.

22n

2n

a solution of length 22nis nondeterministically guessed,

the solution is checked by sliding an exponential window over thesolution,

Page 69: Timeline-based Planning: Theory and Practice

48

Complexity with unbounded horizon

The nondeterministic decision procedure works as follows.

22n

2n

a solution of length 22nis nondeterministically guessed,

the solution is checked by sliding an exponential window over thesolution,

Page 70: Timeline-based Planning: Theory and Practice

48

Complexity with unbounded horizon

The nondeterministic decision procedure works as follows.

22n

2n

a solution of length 22nis nondeterministically guessed,

the solution is checked by sliding an exponential window over thesolution,

Page 71: Timeline-based Planning: Theory and Practice

48

Complexity with unbounded horizon

The nondeterministic decision procedure works as follows.

22n

2n

checking the constraints inside of a single window can be done innondeterministic exponential time,

outside of the window, the whole history can be represented compactlywith exponential space(Theorem 1 follows)

Page 72: Timeline-based Planning: Theory and Practice

48

Complexity with unbounded horizon

The nondeterministic decision procedure works as follows.

22n

2n

checking the constraints inside of a single window can be done innondeterministic exponential time,outside of the window, the whole history can be represented compactlywith exponential space(Theorem 1 follows)

Page 73: Timeline-based Planning: Theory and Practice

49

Decomposition of synchronization rules

Let us take a deeper look at the core result.

Theorem 1If a problem P has a solution, then a solution exists of length at most doublyexponential in the size of P.

Page 74: Timeline-based Planning: Theory and Practice

50

Decomposition of synchronization rules (2)

The result comes from the following observation.Consider a rule:

a0[x0 = v0] → ∃a1[x1 = v1]a2[x2 = v2]a3[x3 = v3] .start(a0) ≤[0,4] start(a1) ∧ end(a1) ≤[0,+∞] start(a2)

∧ end(a2) ≤[3,6] end(a3)

We can see the rule as a graph:

start(a0) end(a0)

start(a1)end(a1) start(a2) end(a2)

start(a3) end(a3)

[0, 4]

[3, 6]

Page 75: Timeline-based Planning: Theory and Practice

50

Decomposition of synchronization rules (2)

The result comes from the following observation.Consider a rule:

a0[x0 = v0] → ∃a1[x1 = v1]a2[x2 = v2]a3[x3 = v3] .start(a0) ≤[0,4] start(a1) ∧ end(a1) ≤[0,+∞] start(a2)

∧ end(a2) ≤[3,6] end(a3)

We can see the rule as a graph:

start(a0) end(a0)

start(a1)end(a1) start(a2) end(a2)

start(a3) end(a3)

[0, 4]

[3, 6]

Page 76: Timeline-based Planning: Theory and Practice

50

Decomposition of synchronization rules (2)

The result comes from the following observation.Consider a rule:

a0[x0 = v0] → ∃a1[x1 = v1]a2[x2 = v2]a3[x3 = v3] .start(a0) ≤[0,4] start(a1) ∧ end(a1) ≤[0,+∞] start(a2)

∧ end(a2) ≤[3,6] end(a3)

We can see the rule as a graph:

start(a0) end(a0)

start(a1)end(a1) start(a2) end(a2)

start(a3) end(a3)

[0, 4]

[3, 6]

Page 77: Timeline-based Planning: Theory and Practice

51

Rule graphs

Rule graphs give a graph-theoretic representation of rules:bounded components identify events that happen “close” to each otherevents belonging to a single component cannot appear further that acertain exponential distance in any solutionthen, we have to keep track of the satisfaction of unbounded relationsonly between whole components.

Page 78: Timeline-based Planning: Theory and Practice

52

Matching records

Matching records use rule graphs to compactly represent all the importantinformation about a plan.

Plans Π are flattened into event sequences µ.

Given an event sequence µ representing a plan π:

[µ] = (ω, Γ ,∆)

recent historypast matchings

pending requests

Page 79: Timeline-based Planning: Theory and Practice

53

Matching records

Properties

Important properties of matching records:1 the size of [µ] is exponential in the size of the problem2 given [µ], we can decide in exponential time whether µ represent asolution plan for the problem

3 from [µ] and an event µ, we can build [µµ] in exponential time

Hence the small model result:if a plan is represented by more than a doubly exponential amount ofevents, two matching records must repeat;then, a shorter plan is obtained by cutting between the two repetitions.

Page 80: Timeline-based Planning: Theory and Practice

54

Complexity with unbounded horizon

The complexity of the problem follows:since EXPSPACE=NEXPSPACE, the entire procedure runs in exponentialspace;as already pointed out, EXPSPACE-hardness comes from theexpressiveness results;hence the problem is EXPSPACE-complete.

Page 81: Timeline-based Planning: Theory and Practice

55

Complexity with bounded horizon

22n

2n

With a bounded horizon, Theorem 1 still holds.

However, the given horizon bound is only exponential in the size of theinput.Hence exactly the same algorithm runs in nondeterministic exponential

time, hence the problem belongs to NEXPTIME;NEXPTIME-hardness proved by a reduction from the ExponentiallyBounded Corridor Tiling problem.

Page 82: Timeline-based Planning: Theory and Practice

55

Complexity with bounded horizon

k ∈ O(2n)

2n

With a bounded horizon, Theorem 1 still holds.However, the given horizon bound is only exponential in the size of theinput.Hence exactly the same algorithm runs in nondeterministic exponential

time, hence the problem belongs to NEXPTIME;NEXPTIME-hardness proved by a reduction from the ExponentiallyBounded Corridor Tiling problem.

Page 83: Timeline-based Planning: Theory and Practice

56

Distinctive features of timeline-based planning: a short recap

Four main parameters of the timeline-based planning problem:token duration:bounded

the duration of all tokens is bounded, even when itis not explicitly constrained by synchronization rules

unboundedthe duration of some token may be arbitrarily long(+∞ is taken as the maximum duration of the token)

temporal relations:

boundedany synchronization rule imposes a bound on the maximumdistance between the considered token’s endpoints

unboundedsome synchronization rule may allow the maximum distancebetween the considered token’s endpoints to be arbitrarily long

horizon:

bounded Hplanning problems commonly specify abound on the size of the solution plan

unbounded there is no bound on the size of the solution plan (if any)

plan:finite the solution plan is finite

recurrent the solution plan is infinite

Remark. Note that, by means of synchronization rules, we may force solutionplans to be infinite (trigger-less rules: ∃; triggered rules: ∀∃).

Page 84: Timeline-based Planning: Theory and Practice

57

An automata-theoretic approach to timeline-based planning

We now show how to reduce the finite (resp., recurrent) planning problemwith unbounded temporal relations, unbounded token duration, andunbounded horizon to the emptiness problem for non-deterministic finiteautomata (NFA) (resp., non-deterministic Büchi automata (NBA)).

The reduction consists of two main steps:we first build an NFA (resp., NBA) and show that it recognizes exactlythose finite (resp., infinite) words that represent solution plans for thegiven planning problem;then, we check the NFA (resp., NBA) for non-emptiness by solving asuitable reachability problem.

As it happens with the finite one, the recurrent planning problem isEXPSPACE-complete.For the sake of simplicity, we restrict our attention to the finite case.

Della Monica, Gigante, Montanari, and Sala (2018)Dario Della Monica, Nicola Gigante, Angelo Montanari, and Pietro Sala (2018). “A novelautomata-theoretic approach to timeline-based planning.” In: KR 2018

Page 85: Timeline-based Planning: Theory and Practice

58

The basic building blocks: blueprints

A blueprint is a possible instantiation of a synchronization rule, that is, apossible way of satisfying it.

0 1 2 3 4 5 6 7 8

|= a[y = ]→ ∃b[x = ].start(a) ≤[0,3] start(b)

We may have more than one instantiation for a single rule:

different temporal relations between pairs of tokens (the blue tokenoverlaps the green one, or the blue token is a prefix of the green one, orthe green token is a prefix of the blue one, or . . .);different values for the temporal distance between token’s endpoints(the green token starts 2 time units after the blue one, or the blue andthe green tokens start at the same time, or . . .).

Page 86: Timeline-based Planning: Theory and Practice

59

The basic building blocks: blueprints

How do we deal with unbounded temporal relations and tokens with

unbounded duration? In principle, we may have infinitely many differentinstatiations of a given synchronization rule.

0 1 2 3 4 5 6 7 8

|= a[y = ]→ ∃b[x = ].start(a) ≤[0,3] start(b)

Blueprints can be equipped with some special points that allow one to“stretch” them. In such a case, a blueprint represents a (possibly infinite) setof models that are equivalent modulo arbitrary finite replications of their“stretching points”.

0 1 2 3 4 4 4 5 6 6 7 8

|= a[y = ]→ ∃b[x = ].start(a) ≤[0,3] start(b)

Page 87: Timeline-based Planning: Theory and Practice

60

The basic building blocks: blueprints

To summarize, for any synchronization rule, we have that:

finitely many different temporal relations may hold between pairs of tokens;finitely many different values can be assigned to temporal distances inbounded temporal relations;finitely many different values can be assigned to tokens with boundedduration;unbounded temporal relations and tokens with unbounded duration arecompactly represented, that is, finitely described, by stretching points.

ConclusionA finite set of blueprints (each blueprint being a finite object) suffices tocapture all possible different models of a synchronization rule.

Page 88: Timeline-based Planning: Theory and Practice

61

Timelines as words

Timelines as wordsn timelines Tx1 , . . . , Txn are encoded as words on a finite alphabet of n-tuples:

Σ = (D(x1) ∪ {↺}) × . . . × (D(xn) ∪ {↺})

where↺ is a fresh special symbol that labels any point which is neither thestarting point nor the ending point of a token.

0( )xy

xy

1(

) 2(

) 3(

) 4(

) 5(

) 6(

) 7(

) 8(

) 9(

) 10(

) 11(

)

How do we check blueprints against such words?

Page 89: Timeline-based Planning: Theory and Practice

61

Timelines as words

Timelines as wordsn timelines Tx1 , . . . , Txn are encoded as words on a finite alphabet of n-tuples:

Σ = (D(x1) ∪ {↺}) × . . . × (D(xn) ∪ {↺})

where↺ is a fresh special symbol that labels any point which is neither thestarting point nor the ending point of a token.

0( )xy

xy

1(

) 2(

) 3(

) 4(

) 5(

) 6(

) 7(

) 8(

) 9(

) 10(

) 11(

)

How do we check blueprints against such words?

Page 90: Timeline-based Planning: Theory and Practice

62

The basic building blocks: viewpoints

0( )xy

xy

1(

) 2(

) 3(

) 4(

) 5(

) 6(

) 7(

) 8(

) 9(

) 10(

) 11(

)

0 1 2 3 4 5 6 7 8

Blueprints are equipped with a pointer that identifies its local state, that is,one of its points/positions.

the pair (blueprint, marked point) is called a viewpointviewpoints allow one to check specific portions of the timelines whileignoring the restsince the set of blueprints is finite and each blueprint consists of afinite number of points, there is a finite number of distinct viewpointsviewpoints allows one to check a blueprint against a word.

Page 91: Timeline-based Planning: Theory and Practice

62

The basic building blocks: viewpoints

0( )xy

xy

1(

) 2(

) 3(

) 4(

) 5(

) 6(

) 7(

) 8(

) 9(

) 10(

) 11(

)

0 1 2 3 4 5 6 7 8

Blueprints are equipped with a pointer that identifies its local state, that is,one of its points/positions.

the pair (blueprint, marked point) is called a viewpointviewpoints allow one to check specific portions of the timelines whileignoring the restsince the set of blueprints is finite and each blueprint consists of afinite number of points, there is a finite number of distinct viewpointsviewpoints allows one to check a blueprint against a word.

Page 92: Timeline-based Planning: Theory and Practice

62

The basic building blocks: viewpoints

0( )xy

xy

1(

) 2(

) 3(

) 4(

) 5(

) 6(

) 7(

) 8(

) 9(

) 10(

) 11(

)

0 1 2 3 4 5 6 7 8

Blueprints are equipped with a pointer that identifies its local state, that is,one of its points/positions.

the pair (blueprint, marked point) is called a viewpointviewpoints allow one to check specific portions of the timelines whileignoring the restsince the set of blueprints is finite and each blueprint consists of afinite number of points, there is a finite number of distinct viewpointsviewpoints allows one to check a blueprint against a word.

Page 93: Timeline-based Planning: Theory and Practice

62

The basic building blocks: viewpoints

0( )xy

xy

1(

) 2(

) 3(

) 4(

) 5(

) 6(

) 7(

) 8(

) 9(

) 10(

) 11(

)

0 1 2 3 4 5 6 7 8

Blueprints are equipped with a pointer that identifies its local state, that is,one of its points/positions.

the pair (blueprint, marked point) is called a viewpointviewpoints allow one to check specific portions of the timelines whileignoring the restsince the set of blueprints is finite and each blueprint consists of afinite number of points, there is a finite number of distinct viewpointsviewpoints allows one to check a blueprint against a word.

Page 94: Timeline-based Planning: Theory and Practice

62

The basic building blocks: viewpoints

0( )xy

xy

1(

) 2(

) 3(

) 4(

) 5(

) 6(

) 7(

) 8(

) 9(

) 10(

) 11(

)

0 1 2 3 4 5 6 7 8

Blueprints are equipped with a pointer that identifies its local state, that is,one of its points/positions.

the pair (blueprint, marked point) is called a viewpointviewpoints allow one to check specific portions of the timelines whileignoring the restsince the set of blueprints is finite and each blueprint consists of afinite number of points, there is a finite number of distinct viewpointsviewpoints allows one to check a blueprint against a word.

Page 95: Timeline-based Planning: Theory and Practice

62

The basic building blocks: viewpoints

0( )xy

xy

1(

) 2(

) 3(

) 4(

) 5(

) 6(

) 7(

) 8(

) 9(

) 10(

) 11(

)

0 1 2 3 4 5 6 7 8

Blueprints are equipped with a pointer that identifies its local state, that is,one of its points/positions.

the pair (blueprint, marked point) is called a viewpointviewpoints allow one to check specific portions of the timelines whileignoring the restsince the set of blueprints is finite and each blueprint consists of afinite number of points, there is a finite number of distinct viewpointsviewpoints allows one to check a blueprint against a word.

Page 96: Timeline-based Planning: Theory and Practice

62

The basic building blocks: viewpoints

0( )xy

xy

1(

) 2(

) 3(

) 4(

) 5(

) 6(

) 7(

) 8(

) 9(

) 10(

) 11(

)

0 1 2 3 4 5 6 7 8

Blueprints are equipped with a pointer that identifies its local state, that is,one of its points/positions.

the pair (blueprint, marked point) is called a viewpointviewpoints allow one to check specific portions of the timelines whileignoring the restsince the set of blueprints is finite and each blueprint consists of afinite number of points, there is a finite number of distinct viewpointsviewpoints allows one to check a blueprint against a word.

Page 97: Timeline-based Planning: Theory and Practice

62

The basic building blocks: viewpoints

0( )xy

xy

1(

) 2(

) 3(

) 4(

) 5(

) 6(

) 7(

) 8(

) 9(

) 10(

) 11(

)

0 1 2 3 4 5 6 7 8

Blueprints are equipped with a pointer that identifies its local state, that is,one of its points/positions.

the pair (blueprint, marked point) is called a viewpointviewpoints allow one to check specific portions of the timelines whileignoring the restsince the set of blueprints is finite and each blueprint consists of afinite number of points, there is a finite number of distinct viewpointsviewpoints allows one to check a blueprint against a word.

Page 98: Timeline-based Planning: Theory and Practice

62

The basic building blocks: viewpoints

0( )xy

xy

1(

) 2(

) 3(

) 4(

) 5(

) 6(

) 7(

) 8(

) 9(

) 10(

) 11(

)

0 1 2 3 4 5 6 7 8

Blueprints are equipped with a pointer that identifies its local state, that is,one of its points/positions.

the pair (blueprint, marked point) is called a viewpointviewpoints allow one to check specific portions of the timelines whileignoring the restsince the set of blueprints is finite and each blueprint consists of afinite number of points, there is a finite number of distinct viewpointsviewpoints allows one to check a blueprint against a word.

Page 99: Timeline-based Planning: Theory and Practice

62

The basic building blocks: viewpoints

0( )xy

xy

1(

) 2(

) 3(

) 4(

) 5(

) 6(

) 7(

) 8(

) 9(

) 10(

) 11(

)

0 1 2 3 4 5 6 7 8

Blueprints are equipped with a pointer that identifies its local state, that is,one of its points/positions.

the pair (blueprint, marked point) is called a viewpointviewpoints allow one to check specific portions of the timelines whileignoring the restsince the set of blueprints is finite and each blueprint consists of afinite number of points, there is a finite number of distinct viewpointsviewpoints allows one to check a blueprint against a word.

Page 100: Timeline-based Planning: Theory and Practice

62

The basic building blocks: viewpoints

0( )xy

xy

1(

) 2(

) 3(

) 4(

) 5(

) 6(

) 7(

) 8(

) 9(

) 10(

) 11(

)

0 1 2 3 4 5 6 7 8

Blueprints are equipped with a pointer that identifies its local state, that is,one of its points/positions.

the pair (blueprint, marked point) is called a viewpointviewpoints allow one to check specific portions of the timelines whileignoring the restsince the set of blueprints is finite and each blueprint consists of afinite number of points, there is a finite number of distinct viewpointsviewpoints allows one to check a blueprint against a word.

Page 101: Timeline-based Planning: Theory and Practice

62

The basic building blocks: viewpoints

0( )xy

xy

1(

) 2(

) 3(

) 4(

) 5(

) 6(

) 7(

) 8(

) 9(

) 10(

) 11(

)

0 1 2 3 4 5 6 7 8

Blueprints are equipped with a pointer that identifies its local state, that is,one of its points/positions.

the pair (blueprint, marked point) is called a viewpointviewpoints allow one to check specific portions of the timelines whileignoring the restsince the set of blueprints is finite and each blueprint consists of afinite number of points, there is a finite number of distinct viewpointsviewpoints allows one to check a blueprint against a word.

Page 102: Timeline-based Planning: Theory and Practice

62

The basic building blocks: viewpoints

0( )xy

xy

1(

) 2(

) 3(

) 4(

) 5(

) 6(

) 7(

) 8(

) 9(

) 10(

) 11(

)

0 1 2 3 4 5 6 7 8

COMPLE

TED

Blueprints are equipped with a pointer that identifies its local state, that is,one of its points/positions.

the pair (blueprint, marked point) is called a viewpointviewpoints allow one to check specific portions of the timelines whileignoring the restsince the set of blueprints is finite and each blueprint consists of afinite number of points, there is a finite number of distinct viewpointsviewpoints allows one to check a blueprint against a word.

Page 103: Timeline-based Planning: Theory and Practice

63

States as sets of viewpoints

The states of the NFA (resp., NBA) are sets of viewpoints.The transition function guarantees the correct synchronization of viewpointsaccording to the current symbol.Final states are states in which all the viewpoints are completed.

Page 104: Timeline-based Planning: Theory and Practice

64

States as sets of viewpoints (2)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 80 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 80 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

(

)

(

)(

)

(

)

(

)

(

)(

)(

)

During execution, we may observe two kinds of phenomenon.

Page 105: Timeline-based Planning: Theory and Practice

64

States as sets of viewpoints (2)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 80 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 80 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

(

)

(

)(

)

(

)

(

)

(

)(

)(

)

During execution, we may observe two kinds of phenomenon:

Confluence: two or more distinct viewpoints on the same blueprint inthe source state evolve into the same viewpoint in the target state.This is the case when in the source state they were associated withdistinct tokens, but, at a certain point, their “future” turns out to be thesame and they become indistinguishable.

Page 106: Timeline-based Planning: Theory and Practice

64

States as sets of viewpoints (2)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 80 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 80 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

(

)

(

)(

)

(

)

(

)

(

)(

)(

)

During execution, we may observe two kinds of phenomenon:

Splitting: a viewpoint in the source state evolves into two distinct

viewpoints in the target state.This is the case, for instance, when the same “past history” must be usedto fulfill two or more tokens that trigger the same synchronization rule.

Page 107: Timeline-based Planning: Theory and Practice

65

Viewpoints synchronization: success

0

( )xy

xy

1

(↺)2

(↺↺

)3

(↺

)4

(↺↺

)5

(↺↺

)6

(↺↺

)7

(↺)8

(↺↺

)9

(↺↺

)10

(↺

)11

(↺↺

)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

Page 108: Timeline-based Planning: Theory and Practice

65

Viewpoints synchronization: success

0

( )xy

xy

1

(↺)2

(↺↺

)3

(↺

)4

(↺↺

)5

(↺↺

)6

(↺↺

)7

(↺)8

(↺↺

)9

(↺↺

)10

(↺

)11

(↺↺

)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

Page 109: Timeline-based Planning: Theory and Practice

65

Viewpoints synchronization: success

0

( )xy

xy

1

(↺)2

(↺↺

)3

(↺

)4

(↺↺

)5

(↺↺

)6

(↺↺

)7

(↺)8

(↺↺

)9

(↺↺

)10

(↺

)11

(↺↺

)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

Page 110: Timeline-based Planning: Theory and Practice

65

Viewpoints synchronization: success

0

( )xy

xy

1

(↺)2

(↺↺

)3

(↺

)4

(↺↺

)5

(↺↺

)6

(↺↺

)7

(↺)8

(↺↺

)9

(↺↺

)10

(↺

)11

(↺↺

)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

Page 111: Timeline-based Planning: Theory and Practice

65

Viewpoints synchronization: success

0

( )xy

xy

1

(↺)2

(↺↺

)3

(↺

)4

(↺↺

)5

(↺↺

)6

(↺↺

)7

(↺)8

(↺↺

)9

(↺↺

)10

(↺

)11

(↺↺

)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

Page 112: Timeline-based Planning: Theory and Practice

65

Viewpoints synchronization: success

0

( )xy

xy

1

(↺)2

(↺↺

)3

(↺

)4

(↺↺

)5

(↺↺

)6

(↺↺

)7

(↺)8

(↺↺

)9

(↺↺

)10

(↺

)11

(↺↺

)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

Page 113: Timeline-based Planning: Theory and Practice

65

Viewpoints synchronization: success

0

( )xy

xy

1

(↺)2

(↺↺

)3

(↺

)4

(↺↺

)5

(↺↺

)6

(↺↺

)7

(↺)8

(↺↺

)9

(↺↺

)10

(↺

)11

(↺↺

)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

Page 114: Timeline-based Planning: Theory and Practice

65

Viewpoints synchronization: success

0

( )xy

xy

1

(↺)2

(↺↺

)3

(↺

)4

(↺↺

)5

(↺↺

)6

(↺↺

)7

(↺)8

(↺↺

)9

(↺↺

)10

(↺

)11

(↺↺

)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

Page 115: Timeline-based Planning: Theory and Practice

65

Viewpoints synchronization: success

0

( )xy

xy

1

(↺)2

(↺↺

)3

(↺

)4

(↺↺

)5

(↺↺

)6

(↺↺

)7

(↺)8

(↺↺

)9

(↺↺

)10

(↺

)11

(↺↺

)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

Page 116: Timeline-based Planning: Theory and Practice

65

Viewpoints synchronization: success

0

( )xy

xy

1

(↺)2

(↺↺

)3

(↺

)4

(↺↺

)5

(↺↺

)6

(↺↺

)7

(↺)8

(↺↺

)9

(↺↺

)10

(↺

)11

(↺↺

)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

Page 117: Timeline-based Planning: Theory and Practice

66

Viewpoints synchronization: failure

0

( )xy

xy

1

(↺)2

(↺↺

)3

(↺

)4

(↺↺

)5

(↺↺

)6

(↺↺

)7

(↺)8

(↺↺

)9

(↺↺

)10

(↺

)11

(↺↺

)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7

Page 118: Timeline-based Planning: Theory and Practice

66

Viewpoints synchronization: failure

0

( )xy

xy

1

(↺)2

(↺↺

)3

(↺

)4

(↺↺

)5

(↺↺

)6

(↺↺

)7

(↺)8

(↺↺

)9

(↺↺

)10

(↺

)11

(↺↺

)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7

Page 119: Timeline-based Planning: Theory and Practice

66

Viewpoints synchronization: failure

0

( )xy

xy

1

(↺)2

(↺↺

)3

(↺

)4

(↺↺

)5

(↺↺

)6

(↺↺

)7

(↺)8

(↺↺

)9

(↺↺

)10

(↺

)11

(↺↺

)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7

Page 120: Timeline-based Planning: Theory and Practice

66

Viewpoints synchronization: failure

0

( )xy

xy

1

(↺)2

(↺↺

)3

(↺

)4

(↺↺

)5

(↺↺

)6

(↺↺

)7

(↺)8

(↺↺

)9

(↺↺

)10

(↺

)11

(↺↺

)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7

Page 121: Timeline-based Planning: Theory and Practice

66

Viewpoints synchronization: failure

0

( )xy

xy

1

(↺)2

(↺↺

)3

(↺

)4

(↺↺

)5

(↺↺

)6

(↺↺

)7

(↺)8

(↺↺

)9

(↺↺

)10

(↺

)11

(↺↺

)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7

Page 122: Timeline-based Planning: Theory and Practice

66

Viewpoints synchronization: failure

0

( )xy

xy

1

(↺)2

(↺↺

)3

(↺

)4

(↺↺

)5

(↺↺

)6

(↺↺

)7

(↺)8

(↺↺

)9

(↺↺

)10

(↺

)11

(↺↺

)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7

Page 123: Timeline-based Planning: Theory and Practice

66

Viewpoints synchronization: failure

0

( )xy

xy

1

(↺)2

(↺↺

)3

(↺

)4

(↺↺

)5

(↺↺

)6

(↺↺

)7

(↺)8

(↺↺

)9

(↺↺

)10

(↺

)11

(↺↺

)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7

Page 124: Timeline-based Planning: Theory and Practice

66

Viewpoints synchronization: failure

0

( )xy

xy

1

(↺)2

(↺↺

)3

(↺

)4

(↺↺

)5

(↺↺

)6

(↺↺

)7

(↺)8

(↺↺

)9

(↺↺

)10

(↺

)11

(↺↺

)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7

Page 125: Timeline-based Planning: Theory and Practice

66

Viewpoints synchronization: failure

0

( )xy

xy

1

(↺)2

(↺↺

)3

(↺

)4

(↺↺

)5

(↺↺

)6

(↺↺

)7

(↺)8

(↺↺

)9

(↺↺

)10

(↺

)11

(↺↺

)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7

FAIL: REJECTEDRUN

Page 126: Timeline-based Planning: Theory and Practice

67

Complexity of the solution algorithm

The finite planning problem is reduced to the non-emptiness problem for anNFA A with O(22

n) states.

final state reachability in A can be performed on-the-fly and thus thesolution algorithm has EXPSPACE complexityin a very similar way, the recurrent planning problem can be reduced tothe non-emptiness problem for a Büchi automaton, and the solutionalgorithm has exactly the same complexity (the finite case can actuallybe viewed as a special case of the recurrent one).automata compactly represent all possible execution plans and theirmodularity makes the addition of constraints easy. Moreover, they allowone to benefit from (theoretical and practical) known results inautomata theory.Last but not least, thanks to such an encoding into automata, thesolution to many planning-related problems, like, for instance,minimality, boundedness, and synthesis / controllability, comes(almost) for free.

Acknowledgement. We would like to thank Pietro Sala, who produced a firstversion of the slides for his talk at KR 2018.

Page 127: Timeline-based Planning: Theory and Practice

68

Timeline-based planning with uncertainty

Page 128: Timeline-based Planning: Theory and Practice

69

Uncertainty

Most real-world scenarios demand to consider the unavoidable uncertaintythat comes from the interaction with the environment.

timeline-based planning systems handle temporal uncertainty very wellby means of flexible plans;once a flexible plan for a problem is found, different(weak/strong/dynamic) control strategies may be employed to handleits execution;we focus here on dynamically controllable flexible plans.

Page 129: Timeline-based Planning: Theory and Practice

70

Uncertainty (2)

We recently extended our results to timeline-based planning with uncertainty.

In doing that we addressed two issues of flexible plans:1 general nondeterminsm;2 unnecessary replanning.

Page 130: Timeline-based Planning: Theory and Practice

71

General nondeterminsm

The focus on temporal uncertainty means flexible plans cannot representstrategies involving non-temporal choices.

However, general nondeterminism may arise from problems thatapparently involve only temporal uncertainty.

Page 131: Timeline-based Planning: Theory and Practice

72

General nondeterminism (2)

Suppose x = (V, T,γ,D) with V = {0, 1, 2} and γ(0) = u, and D(0) = [0, 10],and consider:

a[x = 0] → ∃b[x = 1] . start(a) ≤[1,5] end(a) ∧ end(a) ≤[0,0] start(b)∨ ∃c[x = 2] . start(a) ≤[6,10] end(a) ∧ end(a) ≤[0,0] start(c)

In words: if x = 0 lasts between 1 and 5 units, x = 1 must follow, otherwise,x = 2 must follow.

no flexible plan can represent the strategy needed to satisfy this rulehence this kind of problems have no way to represent their solutions

Page 132: Timeline-based Planning: Theory and Practice

73

Unnecessary replanning

Flexible plans are sequential in nature:the flexible plans and their control strategy rely on some informationabout the behavior of external variables, up to temporal flexibility;what if, during execution, the observation turns out to be wrong?some systems detect the mismatch and perform a re-planning phase;however, re-planning is may be unfeasible in real-time scenarios.

Page 133: Timeline-based Planning: Theory and Practice

74

Uncertainty

Hence a few questions arise:can timeline-based systems handle general nondeterminism?can we avoid the re-planning phase?what is the complexity of finding a strategy for these problems?

Page 134: Timeline-based Planning: Theory and Practice

75

Game-theoretic approach

We propose to approach timeline-based planning with uncertainty ingame-theoretic terms.

We define the timeline-based planning game as atwo-player game;the controller tries to satisfy the given set ofsynchronization rules;the environment plays arbitrarily.

Page 135: Timeline-based Planning: Theory and Practice

76

Timeline-based games

A timeline-based game is a tuple G = (SVC, SVE, S,D).Two players, Charlie (the controller) andEve (the environment);players play by starting and ending tokens, building a plan;Charlie can start tokens for variables in SVC ,Eve those for variable in SVE ;Charlie decides when to stop controllable tokens, whileEve decides when to stop uncontrollable ones;Charlie tries to satisfy the set S of system rules,whatever the behavior of Eve;both players are assumed to play as to satisfy the set D of domain rules.

Page 136: Timeline-based Planning: Theory and Practice

77

Strategies

We want to guarantee the existence of a winning strategy for Charlie.a strategy is a function σ that given a partial plan gives the next move ofthe player (i.e. which token to start/end, if any).a strategy σ is admissible if any play played according to σ willeventually satisfy D.a strategy σC for Charlie is winning if, for any admissible strategy σE forEve, any play played according to σC and σE is going to satisfy S ∪ D.

Page 137: Timeline-based Planning: Theory and Practice

78

Example

Suppose two variables x and y can take the values go and stop.x ∈ SVC , y ∈ SVECharlie can play stop only when Eve plays stop as well.We can win because Eve must play stop sooner or later

S ={a[x = stop] → ∃b[y = stop] . end(b) = start(a)}⊤ → ∃a[x = stop] . ⊤

D = { ⊤ → ∃a[y = stop] . ⊤ }

ygo go go go stop

xgo go go go stop

Page 138: Timeline-based Planning: Theory and Practice

79

Advantages

Charlie has a winning strategy if he can play to satisfy the rules no matterwhat Eve does, supposing rules in D are satisfied.

a general form of nondeterminism is handled in this way,not only temporal uncertaintyno need for re-planning: the winning strategy already handles anyscenariogreater modeling flexibility: domain rules allow to describe complexinteractions between the agent and the environmentstrictly more general than the approach based on dynamicallycontrollable flexible plansbut how hard is it to find such a strategy?

Page 139: Timeline-based Planning: Theory and Practice

80

Finding a winning strategy

The decision procedure is based on ATL* model-checking over concurrentgame structures (Rajeev Alur et al. 2002):

concurrent game structures (CGS) are a general formalism to representmulti-agent concurrent systems.Alternating-time Temporal Logic (ATL) and its generalization ATL*, areinterpreted over CGSs;ATL and ATL* are similar to CTL and CTL*, but branching modalitiesquantify over paths played according to specific strategies of a specificset of players;

Page 140: Timeline-based Planning: Theory and Practice

81

Finding a winning strategy (2)

A doubly exponential sized (turn-based synchronous) CGS can be built torepresent the game;

nodes are partial plans, edges labeled by players moves;particular attention to guarantee a finite state space;states where D and S are satisfied are labelled, respectively, byproposition letters d and w;The winning condition is then encoded in ATL* as follows:

φ ≡ ⟨⟨1⟩⟩(Fd→ Fw)

Model-checking a fixed-size ATL* formula over a CGS can be done inpolynomial time, hence the 2EXPTIME complexity.

Page 141: Timeline-based Planning: Theory and Practice

82

Making the state space finite

Abstractly, the state space of the game is infinite:each synchronization rule can in principle be affected by anythinghappening arbitrarily far in the past or in the futurebut we do not really need to keep track of all the historymatching records allow us to represent compactly the game history

we can decide if µ satisfies the rules looking only at [µ];given a round ρ of the game we can build [ρ(µ)] from [µ];

then, states of the game are all the possible [µ]size of [µ] is exponential, hence the state space is doubly exponential.

Page 142: Timeline-based Planning: Theory and Practice

83

Hardness

The 2EXPTIME upper bound is strict:deciding the existence of winning strategies is 2EXPTIME-complete!hardness proved by reduction from domino tiling games (Chlebus 1986)same idea of the reduction of the plan existence problem from coridortiling games, adapted to the two-player setting

Page 143: Timeline-based Planning: Theory and Practice

84

Timeline-based planning games wrap-up

Game-theoretic approach to timeline-based planning with uncertainty

More general than the current approach based on flexible plansHandles temporal uncertainty and general nondeterminism uniformlyFinding winning strategies is 2EXPTIME-complete

Page 144: Timeline-based Planning: Theory and Practice

85

Timelines and temporal logic

Page 145: Timeline-based Planning: Theory and Practice

86

Logical characterization of planning problems

In the next step we wanted to capture timeline-based planning problemswith a well-behaved logical language.Why?

Logical characterizations are available bothfor STRIPS-like planning (Cialdea Mayer, Limongelli, et al. 2007) and fortemporal planning (Cimatti et al. 2017).Easier to compare the expressiveness of different languages if they arereduced to commonly known logics.Easier to think of the synthesis of controllers if the specificationlanguage is a well-defined logical formalism.

Page 146: Timeline-based Planning: Theory and Practice

87

The result

We devised a new logic, that we called TPTLb+P, showing that:its satisfiability problem is EXPSPACE-complete, andit can capture the restricted kind of timeline-based planning problemstudied in (Gigante et al. 2016):

given a problem P, there is a TPTLb+Pformula φPsuch that φP is satisfiable iff there is a solution plan for P.

Della Monica, Gigante, Montanari, Sala, and Sciavicco (2017)Dario Della Monica, Nicola Gigante, Angelo Montanari, Pietro Sala, and Guido Sciavicco (2017).“Bounded Timed Propositional Temporal Logic with Past Captures Timeline-based Planning withBounded Constraints.” In: Proc. of the 26th International Joint Conference on Artificial Intelligence.pages 1008–1014

Page 147: Timeline-based Planning: Theory and Practice

88

Timed Propositional Temporal Logic

The TPTL logic was originally introduced for the verificationof real-time systems (R. Alur and Henzinger 1994).

φ ∶= p ∣¬φ1 ∣φ1 ∨ φ2 ∣

freeze quantifier↓Ì ÒÒÒÒÒÒÐÒÒÒÒÒÒÎ

x.φ1 ∣

timed constraintsc∈Z↓Ì ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÐ ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒ Î

x ≤ y + c ∣ x ≤ c

∣ Xφ1 ∣φ1 U φ2Í ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÑÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒ Ï

↑Linear Temporal Logictemporal operators

Formulae are interpreted over timed words (σ, τ),i.e., each state σi is associated with a timestamp τi.

Page 148: Timeline-based Planning: Theory and Practice

88

Timed Propositional Temporal Logic

The TPTL logic was originally introduced for the verificationof real-time systems (R. Alur and Henzinger 1994).

φ ∶= p ∣¬φ1 ∣φ1 ∨ φ2 ∣

freeze quantifier↓Ì ÒÒÒÒÒÒÐÒÒÒÒÒÒÎ

x.φ1 ∣

timed constraintsc∈Z↓Ì ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÐ ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒ Î

x ≤ y + c ∣ x ≤ c

∣ Xφ1 ∣φ1 U φ2Í ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÑÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒ Ï

↑Linear Temporal Logictemporal operators

The freeze quantifier binds the timestamp of the current state to a variable,used in the evaluation of the timed constraints.

Page 149: Timeline-based Planning: Theory and Practice

88

Timed Propositional Temporal Logic

The TPTL logic was originally introduced for the verificationof real-time systems (R. Alur and Henzinger 1994).

φ ∶= p ∣¬φ1 ∣φ1 ∨ φ2 ∣

freeze quantifier↓Ì ÒÒÒÒÒÒÐÒÒÒÒÒÒÎ

x.φ1 ∣

timed constraintsc∈Z↓Ì ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÐ ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒ Î

x ≤ y + c ∣ x ≤ c

∣ Xφ1 ∣φ1 U φ2Í ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÑÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒ Ï

↑Linear Temporal Logictemporal operators

The satisfiability problem for TPTL is EXPSPACE-complete.

Page 150: Timeline-based Planning: Theory and Practice

89

Why TPTL?

The freeze quantifier and timed constraints allow one tocompactly express constraints of this kind:

a

b

c

[0, 5] [0, 5]

[0, 7]

a[. . .] → ∃b[. . .]c[. . .] . start(a) ≤[0,5] start(b) ∧ start(b) ≤[0,5] start(c) ∧start(a) ≤[0,7] start(c)

G ta.(pa → F tb.(pb ∧ tb ≤ ta + 5 ∧F tc.(pc ∧ tc ≤ tb + 5 ∧ tc ≤ ta + 7)))

Page 151: Timeline-based Planning: Theory and Practice

89

Why TPTL?

The freeze quantifier and timed constraints allow one tocompactly express constraints of this kind:

a

b

c

[0, 5] [0, 5]

[0, 7]

b[. . .] → ∃a[. . .]c[. . .] . start(a) ≤[0,5] start(b) ∧ start(b) ≤[0,5] start(c) ∧start(a) ≤[0,7] start(c)

But what if the trigger was token b?

Page 152: Timeline-based Planning: Theory and Practice

90

TPTL with Past

We need past operators to encode synchronization rules,which can talk about future and past interchangeably.

φ ∶= p ∣¬φ1 ∣φ1 ∨ φ2 ∣

freeze quantifier↓Ì ÒÒÒÒÒÒÐÒÒÒÒÒÒÎ

x.φ1 ∣

timed constraintsc∈Z↓Ì ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÐ ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒ Î

x ≤ y + c ∣ x ≤ c

∣ Xφ1 ∣φ1 U φ2 ∣ Yφ1 ∣φ1 S φ2Í ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÑÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÏ

↑future (X, U ) and past (Y, S)

temporal operators

Unfortunately, past operators make the satisfiability problem become non elementary.

Page 153: Timeline-based Planning: Theory and Practice

90

TPTL with Past

We need past operators to encode synchronization rules,which can talk about future and past interchangeably.

φ ∶= p ∣¬φ1 ∣φ1 ∨ φ2 ∣

freeze quantifier↓Ì ÒÒÒÒÒÒÐÒÒÒÒÒÒÎ

x.φ1 ∣

timed constraintsc∈Z↓Ì ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÐ ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒ Î

x ≤ y + c ∣ x ≤ c

∣ Xφ1 ∣φ1 U φ2 ∣ Yφ1 ∣φ1 S φ2Í ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÑÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÏ

↑future (X, U ) and past (Y, S)

temporal operators

Why? Together with the freeze quantifier, we can simulatefirst-order existential quantification.

∃xφ(x) ≡ y. F x.P z.(y = z ∧φ(x))

Page 154: Timeline-based Planning: Theory and Practice

90

Bounded TPTL with Past

To recover an acceptable complexity while being still able to use past operators, werestricted the temporal operators with a bound w.

φ ∶= p ∣¬φ1 ∣φ1 ∨ φ2 ∣

freeze quantifier↓Ì ÒÒÒÒÒÒÐÒÒÒÒÒÒÎ

x.φ1 ∣

timed constraintsc∈Z↓Ì ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÐ ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒ Î

x ≤ y + c ∣ x ≤ c

∣ Xw φ1 ∣φ1 Uw φ2 ∣ Yw φ1 ∣φ1 Sw φ2Í ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÑÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÏ

↑MTL-like temporal operators

w∈N∪{∞}

The bound limits the timestamp of the states,e.g., X5φ holds at state σi iff φ holds at σi+1 and τi+1 − τi ≤ 5.

Page 155: Timeline-based Planning: Theory and Practice

90

Bounded TPTL with Past

To recover an acceptable complexity while being still able to use past operators, werestricted the temporal operators with a bound w.

φ ∶= p ∣¬φ1 ∣φ1 ∨ φ2 ∣

freeze quantifier↓Ì ÒÒÒÒÒÒÐÒÒÒÒÒÒÎ

x.φ1 ∣

timed constraintsc∈Z↓Ì ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÐ ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒ Î

x ≤ y + c ∣ x ≤ c

∣ Xw φ1 ∣φ1 Uw φ2 ∣ Yw φ1 ∣φ1 Sw φ2Í ÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÑÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÒÏ

↑MTL-like temporal operators

w∈N∪{∞}

The bound can be omitted (i.e., w =∞) only if the underlying formulae are closed, i.e.,they do not refer to variables quantified outside.

Page 156: Timeline-based Planning: Theory and Practice

91

TPTLb+PExample

Now the previous example can be encoded in both cases:

a

b

c

[0, 5] [0, 5]

[0, 7]

a[. . .] → ∃b[. . .]c[. . .] . start(a) ≤[0,5] start(b) ∧ start(b) ≤[0,5] start(c)∧start(a) ≤[0,7] start(c)

G ta.(pa → F10 P10 tb.(pb ∧ F10 P10 tc.(pc ∧tb ≤ ta + 5 ∧ tc ≤ tb + 5 ∧ tc ≤ ta + 7)))

Page 157: Timeline-based Planning: Theory and Practice

92

The encoding

Thus, the encoding generally works this way. Given a rule:

a[x = v] → ∃b[y = v ′]c[z = v ′′] . C

Globally, whenever the head of some rule is satisfied, we look for theneeded events across the entire model, with bounded temporaloperators.

It is essential here to disallow unbounded atoms in rules.

Once the correct events have been identified, we constrain theirposition and distances using timed constraints.

Page 158: Timeline-based Planning: Theory and Practice

93

Complexity of TPTLb+P

The complexity of TPTLb+Pis proved by adapting the original tableau method

provided by R. Alur and Henzinger for TPTL.In turn, a clever adaptation of the classic graph-shaped tableau for LTL;simply adding past operators does not work, as the tableau becomespotentially infinite;the bounds on TPTLb+Ptemporal operators allow to adapt the idea andsupport past operators.

Page 159: Timeline-based Planning: Theory and Practice

94

Timeline-based planning over

dense temporal domains

Page 160: Timeline-based Planning: Theory and Practice

95

Timeline-based planning over dense temporal domains

In timeline-based planning, the temporal domain is commonly assumed tobe discrete (the natural numbers), the dense case being dealt with by forcingan artificial discretization of it.

In a recent work, Bozzelli et al. address decidability and complexity issuesfor timeline-based planning over dense temporal domains without resortingto any form of discretization.

The emerging picture is as follows:

the general problem is undecidable even when a single state variable isinvolved (a reduction from the halting problem for Minsky two-countermachines) (Bozzelli, Molinari, Montanari, and Peron 2018b);

decidability (NP-completeness) can be recovered by restricting totrigger-less synchronization rules only (Bozzelli, Molinari, Montanari,Peron, and Woeginger 2018).

Page 161: Timeline-based Planning: Theory and Practice

96

Timeline-based planning over dense temporal domains (2)

The middle ground in between undecidability and NP-completeness hasbeen explored as well (Bozzelli, Molinari, Montanari, and Peron 2018a).

decidability and non-primitive recursive hardness can be proved byadmitting synchronization rules with a trigger, but (i) forcing them toimpose constraints only in the future with respect to the trigger and (ii)constraining non-trigger tokens to appear at most once in theconstraints set by the rule – future simple rules (a reduction to thedecidable existential model checking problem for Timed Automataagainst Metric Temporal Logic over finite timed words);

EXPSPACE-completeness can be achieved by further avoiding singularintervals;

PSPACE-completeness can be obtained by admitting only intervals ofthe forms [0,a] and [b,+∞].

Very recently, it has been shown that the problem remains undecidable ifonly condition (i) is imposed on trigger rules – future rules (Bozzelli,Montanari, and Peron 2019, unpublished).

Page 162: Timeline-based Planning: Theory and Practice

97

Conclusions

Page 163: Timeline-based Planning: Theory and Practice

98

Conclusions

Work is being done on the theoretical foundations oftimeline-based planning.

Work done:expressiveness of the formalism with regards to action-based languages;computational complexity of the problem;logical characterization of the problem (timeline and temporal logic);game-theoretic approach for handling uncertainty;timeline-based planning over dense temporal domains.

Page 164: Timeline-based Planning: Theory and Practice

98

Conclusions

Work is being done on the theoretical foundations oftimeline-based planning.

Planned work:synthesis of controllers for timeline-based games;multi-player (i.e., multi-agent) version of timeline-based games;distributed version of timeline-based games;additional expressiveness results with regards to more expressivevariants of PDDL and other common paradigms (e.g., resourcemanagement);timeline-based planning, inherently-interval properties, and intervaltemporal logic.

Page 165: Timeline-based Planning: Theory and Practice

99

Thank youQuestions?

Page 166: Timeline-based Planning: Theory and Practice

100

Bibliography

Alur, R. and T. A. Henzinger (1994). “A Really Temporal Logic.” In: Journal of the ACM 41.1, pp. 181–204. doi:10.1145/174644.174651. url: http://doi.acm.org/10.1145/174644.174651.

Alur, Rajeev, Thomas A. Henzinger, and Orna Kupferman (2002). “Alternating-time Temporal Logic.” In: Journal of theACM 49.5, pp. 672–713.

Barreiro, Javier, Matthew Boyce, Minh Do, Jeremy Frank, Michael Iatauro, Tatiana Kichkaylo, Paul Morris, James Ong,Emilio Remolina, Tristan Smith, and David Smith (2012). “EUROPA: A Platform for AI Planning, Scheduling,Constraint Programming, and Optimization.” In: Prof. of the 4th International Competition on KnowledgeEngineering for Planning and Scheduling.

Bozzelli, Laura, Alberto Molinari, Angelo Montanari, and Adriano Peron (2018a). “Complexity of Timeline-BasedPlanning over Dense Temporal Domains: Exploring the Middle Ground.” In: Proceedings Ninth InternationalSymposium on Games, Automata, Logics, and Formal Verification, GandALF 2018, Saarbrücken, Germany, 26-28thSeptember 2018. Ed. by Andrea Orlandini and Martin Zimmermann. Vol. 277. EPTCS, pp. 191–205. doi:10.4204/EPTCS.277.14. url: https://doi.org/10.4204/EPTCS.277.14.

— (2018b). “Decidability and Complexity of Timeline-Based Planning over Dense Temporal Domains.” In: Principlesof Knowledge Representation and Reasoning: Proceedings of the Sixteenth International Conference, KR 2018,Tempe, Arizona, 30 October - 2 November 2018. Ed. by Michael Thielscher, Francesca Toni, and Frank Wolter. AAAIPress, pp. 627–628. isbn: 978-1-57735-803-9. url:https://aaai.org/ocs/index.php/KR/KR18/paper/view/17995.

Bozzelli, Laura, Alberto Molinari, Angelo Montanari, Adriano Peron, and Gerhard J. Woeginger (2018).“Timeline-Based Planning over Dense Temporal Domains with Trigger-less Rules is NP-Complete.” In:Proceedings of the 19th Italian Conference on Theoretical Computer Science, Urbino, Italy, September 18-20, 2018.Ed. by Alessandro Aldini and Marco Bernardo. Vol. 2243. CEUR Workshop Proceedings. CEUR-WS.org, pp. 116–127.url: http://ceur-ws.org/Vol-2243/paper11.pdf.

Cesta, A., G. Cortellessa, S. Fratini, and A. Oddi (2009). “Developing an End-to-End Planning Application from aTimeline Representation Framework.” In: Proc. of the 21st Conference on Innovative Applications of ArtificialIntelligence (IAAI-09), pp. 66–71.

Cesta, Amedeo, Gabriella Cortellessa, Michel Denis, Alessandro Donati, Simone Fratini, Angelo Oddi, Nicola Policella,Erhard Rabenau, and Jonathan Schulster (2007). “Mexar2: AI Solves Mission Planner Problems.” In: IEEEIntelligent Systems 22.4, pp. 12–19.

Page 167: Timeline-based Planning: Theory and Practice

101

Bibliography (2)

Chien, S., G. Rabideau, R. Knight, R. Sherwood, B. Engelhardt, D. Mutz, T. Estlin, B. Smith, F. Fisher, T. Barrett,G. Stebbins, and D. Tran (2000). “ASPEN - Automated Planning and Scheduling for Space Mission Operations.” In:Proc. of the 8th International Conference on Space Operations.

Chien, Steve A., Rabideau, Tran, Troesch, Doubleday, Nespoli, Perez Ayucar, Costa Sitja, Vallat, Geiger, Altobelli,Fernandez, Vallejo, Andres, and Kueppers (2015). “Activity-Based Scheduling of Science Campaigns for theRosetta Orbiter.” In: Proc. of IJCAI 2015, pp. 4416–4422.

Chlebus, Bogdan S. (1986). “Domino-Tiling Games.” In: Journal of Computer and System Sciences 32.3, pp. 374–392.doi: 10.1016/0022-0000(86)90036-X.

Cialdea Mayer, Marta, Carla Limongelli, Andrea Orlandini, and Valentina Poggioni (2007). “Linear Temporal Logic asan Executable Semantics for Planning Languages.” In: Journal of Logic, Language and Information 16.1, pp. 63–89.

Cialdea Mayer, Marta and Andrea Orlandini (2015). “An Executable Semantics of Flexible Plans in Terms of TimedGame Automata.” In: Proc. of the 22nd International Symposium on Temporal Representation and Reasoning,pp. 160–169.

Cialdea Mayer, Marta, Andrea Orlandini, and Alessandro Umbrico (2016). “Planning and Execution with FlexibleTimelines: a Formal Account.” In: Acta Informatica 53.6-8, pp. 649–680.

Cimatti, A., A. Micheli, and M. Roveri (2017). “Validating Domains and Plans for Temporal Planning via Encoding intoInfinite-State Linear Temporal Logic.” In: Proc. of the 31st AAAI Conference on Artificial Intelligence, pp. 3547–3554.

Della Monica, Dario, Nicola Gigante, Angelo Montanari, and Pietro Sala (2018). “A novel automata-theoreticapproach to timeline-based planning.” In: KR 2018.

Della Monica, Dario, Nicola Gigante, Angelo Montanari, Pietro Sala, and Guido Sciavicco (2017). “Bounded TimedPropositional Temporal Logic with Past Captures Timeline-based Planning with Bounded Constraints.” In: Proc.of the 26th International Joint Conference on Artificial Intelligence. pages 1008–1014.

Fratini, Simone, Amedeo Cesta, Riccardo De Benedictis, Andrea Orlandini, and Riccardo Rasconi (2011). “APSI-BasedDeliberation in Goal Oriente Autonomous Controllers.” In: Proceedings of the 11th Workshop on Advanced SpaceTechnologies for Robotics and Automation.

Gigante, Nicola, Angelo Montanari, Marta Cialdea Mayer, and Andrea Orlandini (2016). “Timelines are ExpressiveEnough to Capture Action-Based Temporal Planning.” In: Proc. of the 23rd International Symposium on TemporalRepresentation and Reasoning, pp. 100–109.

Page 168: Timeline-based Planning: Theory and Practice

102

Bibliography (3)

Gigante, Nicola, Angelo Montanari, Marta Cialdea Mayer, and Andrea Orlandini (2017). “Complexity of Timeline-basedPlanning.” In: Proc. of the 27th International Conference on Automated Planning and Scheduling, pages 116–124.

Muscettola, Nicola (1994). “HSTS: Integrating Planning and Scheduling.” In: Intelligent Scheduling. Ed. byMonte Zweben and Mark S. Fox. Morgan Kaufmann. Chap. 6, pp. 169–212.

Smith, David E., Jeremy Frank, and William Cushing (2008). “The ANML Language.” In: Proceedinsgs of the ICAPS 2008Workshop on Knowledge Engineering for Planning and Scheduling.

Vidal, Thierry and Hélène Fargier (1999). “Handling contingency in temporal constraint networks: from consistencyto controllabilities.” In: Journal of Experimental and Theoretical Artificial Intelligence 11.1, pp. 23–45. doi:10.1080/095281399146607.