Temporal Planning Planning with Temporal and Concurrent Actions.

Slides:



Advertisements
Similar presentations
Language for planning problems
Advertisements

Biointelligence Lab School of Computer Sci. & Eng.
Foundations of Constraint Processing Temporal Constraints Networks 1Topic Foundations of Constraint Processing CSCE421/821, Spring
Partial Order Reduction: Main Idea
SAT-Based Planning Using Propositional SAT- Solvers to Search for Plans.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Time Constraints in Planning Sudhan Kanitkar
1 Partial Order Reduction. 2 Basic idea P1P1 P2P2 P3P3 a1a1 a2a2 a3a3 a1a1 a1a1 a2a2 a2a2 a2a2 a2a2 a3a3 a3a3 a3a3 a3a3 a1a1 a1a1 3 independent processes.
MCS 312: NP Completeness and Approximation algorithms Instructor Neelima Gupta
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Automated Planning Introduction and Overview. Automated Planning: Introduction and Overview 2 Literature Malik Ghallab, Dana Nau, and Paolo Traverso.
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
Introduction to Symmetry Handbook of Constraint Programming, Chapter 10 Presentation by: Robert Woodward Advanced CP, Fall
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
Firewall Policy Queries Author: Alex X. Liu, Mohamed G. Gouda Publisher: IEEE Transaction on Parallel and Distributed Systems 2009 Presenter: Chen-Yu Chang.
Chapter 4: Stochastic Processes Poisson Processes and Markov Chains
Existential Graphs and Davis-Putnam April 3, 2002 Bram van Heuveln Department of Cognitive Science.
Data Flow Analysis Compiler Design Nov. 8, 2005.
Propositional Calculus Math Foundations of Computer Science.
Linear Systems The definition of a linear equation given in Chapter 1 can be extended to more variables; any equation of the form for real numbers.
Relations Chapter 9.
©Silberschatz, Korth and Sudarshan7.1Database System Concepts Chapter 7: Relational Database Design First Normal Form Pitfalls in Relational Database Design.
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
State-Space Search and the STRIPS Planner Searching for a Path through a Graph of Nodes Representing World States.
Chapter 9. Chapter Summary Relations and Their Properties Representing Relations Equivalence Relations Partial Orderings.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Chapter 9. Section 9.1 Binary Relations Definition: A binary relation R from a set A to a set B is a subset R ⊆ A × B. Example: Let A = { 0, 1,2 } and.
LDK R Logics for Data and Knowledge Representation ClassL (part 3): Reasoning with an ABox 1.
Equations, Inequalities, and Mathematical Models 1.2 Linear Equations
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Chapter 8 Relations 歐亞書局.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
A Logic of Partially Satisfied Constraints Nic Wilson Cork Constraint Computation Centre Computer Science, UCC.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Mathematical Preliminaries
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
第 1 6 章 谓词演算中的归结. 2 Outline Unification Predicate-Calculus Resolution Completeness and Soundness Converting Arbitrary wffs to Clause Form Using Resolution.
LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 9 Boolean Algebras and Combinatorial Circuits.
Alternative Representations Propositions and State-Variables.
Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used.
Presented by: Belgi Amir Seminar in Distributed Algorithms Designing correct concurrent algorithms Spring 2013.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Linear Programming Chap 2. The Geometry of LP  In the text, polyhedron is defined as P = { x  R n : Ax  b }. So some of our earlier results should.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Chapter 5 Relations and Operations
Introduction to Logic for Artificial Intelligence Lecture 2
Planning as Satisfiability
Formal Modeling Concepts
Planning as model checking, (OBDDs)
Logics for Data and Knowledge Representation
Warning I estimate 3 weeks of intensive reading for you to understand your assigned topic These are not self contained and you will need to understand.
Logics for Data and Knowledge Representation
Dana S. Nau University of Maryland 9:01 AM December 6, 2018
Logics for Data and Knowledge Representation
Horn Clauses and Unification
MA/CSSE 474 More Math Review Theory of Computation
Computer Security: Art and Science, 2nd Edition
Graphplan/ SATPlan Chapter
Chapter 2 Representations for Classical Planning
Presentation transcript:

Temporal Planning Planning with Temporal and Concurrent Actions

Temporal Planning 2 Literature Malik Ghallab, Dana Nau, and Paolo Traverso. Automated Planning – Theory and Practice, chapter Elsevier/Morgan Kaufmann, 2004.

Temporal Planning 3 Why Explicit Time? assumption A6: implicit time actions and events have no duration state transitions are instantaneous in reality: actions and events do occur over a time span preconditions not only at beginning effects during or even after the action actions may need to maintain partial states events expected to occur in future time periods goals must be achieved within time bound

Temporal Planning 4 Overview Actions and Time Points Interval Algebra and Quantitative Time Planning with Temporal Operators

Temporal Planning 5 Time mathematical structure: set with transitive, asymmetric ordering operation discrete, dense, or continuous bounded or unbounded totally ordered or branching temporal references: time points (represented by real numbers) time intervals (pair of real numbers) temporal relations: examples: before, during

Temporal Planning 6 Causal vs. Temporal Analysis of Actions example: load(crane2, cont5, robot1, interval6) causal analysis (what propositions hold?): what propositions will change (effects) what propositions are required (preconditions) temporal analysis (when propositions hold?): when other, related assertions can/cannot be true reason over: time periods during which propositions must hold time points at which values of state variables change

Temporal Planning 7 Temporal Databases maintain temporal references for every domain proposition when does it hold when does it change value functionality: assert new temporal relations querying whether temporal relation holds check for consistency planner attempts to assert relations among temporal references

Temporal Planning 8 Temporal References Example: Container Loading load container c onto robot r at location l t 1 : instant at which robot r enters location l t 2 : instant at which robot r stops at location l i 1 =[t 1,t 2 ]: interval corresponding to r entering l t 3 : instant at which the crane starts picking up c t 4 : instant at which crane finishes putting c on r i 2 =[t 3,t 4 ]: interval corresponding to picking up and loading c t 5 : instant at which c begins to be loaded onto r t 6 : instant at which c is no longer loaded onto r i 3 =[t 5,t 6 ]: interval corresponding to c being loaded onto r

Temporal Planning 9 Temporal Relations Example: Container Loading assumption: crane is allowed to pick up container as soon as robot has entered location possible temporal sequences: t 1 < t 3 < t 2 < t 4 = t 5 < t 6 (see figure) or t 1 = t 3 or t 2 = t 3 or t 2 < t 3 t1t1 t2t2 entering t3t3 t4t4 picking up and loading t5t5 t6t6 loaded

Temporal Planning 10 Example: Temporal Relations as Constraint Networks t1t1 t2t2 t3t3 t5t5 t6t6 t4t4 < < < < ≤ = i1i1 i2i2 i3i3 before starts before meets

Temporal Planning 11 Point Algebra (PA): Relations and Constraints possible primitive relations P between instants t 1 and t 2 : P = { } t 1 before t 2 : [t 1 <t 2 ] t 1 equal to t 2 : [t 1 =t 2 ] t 1 after t 2 : [t 1 >t 2 ] possible qualitative constraints R between instants: sets of the above relations (interpret as disjunction) R = 2 P = { ∅, { }, { }, {=,>}, P}

Temporal Planning 12 Container Loading Example: PA Constraints [t 1 {<} t 2 ] [t 1 {<,=} t 3 ] [t 2 {<} t 5 ] [t 3 {<} t 4 ] [t 4 {=} t 5 ] [t 5 {=} t 4 ] [t 5 {<} t 6 ] t1t1 t2t2 t3t3 t5t5 t6t6 t4t4 {<} {<,=} {=}

Temporal Planning 13 PA: Combining Constraints usual set operations: ∩, ∪ etc. composition (noted ∙ ): let r, q ∈ R if [ t 1 r t 2 ] and [ t 2 q t 3 ] then [ t 1 r ∙ q t 3 ] r ∙ q as defined in composition table ∙ <=> <<<P =<=> <P>> PA composition table

Temporal Planning 14 PA: Properties of Combined Constraints distributive (r ∪ q) ∙ s = (r ∙ s) ∪ (q ∙ s) s ∙ (r ∪ q) = (s ∙ r) ∪ (s ∙ q) symmetrical constraint r’ of r: [ t 1 r t 2 ] iff [ t 2 r’ t 1 ] obtained by replacing in r: and vice versa (r ∙ q)’ = q’ ∙ r’ (R, ∪, ∙ ) is an algebra: R is closed under ∪ and ∙ ∪ is an associative and commutative operation identity element for ∪ is ∅ is an associative operation identity element for ∙ is {=}

Temporal Planning 15 PA: Constraint Propagation given constraints: [ t 1 r t 2 ] [ t 1 q t 3 ] [ t 3 s t 2 ] implied constraint: [ t 1 r ∩ q ∙ s t 2 ] inconsistency: if r ∩ q ∙ s = ∅ t1t1 t3t3 t2t2 r qs q∙sq∙s

Temporal Planning 16 Container Loading Example: Constraint Propagation path: t 4 -t 5 -t 6 : [t 4 =t 5 ] ∙ [t 5 <t 6 ] implies [t 4 <t 6 ] path: t 2 -t 1 -t 3 : [t 2 >t 1 ] ∙ [t 1 ≤t 6 ] implies [t 2 Pt 3 ] path: t 2 -t 5 -t 4 : [t 2 <t 5 ] ∙ [t 5 =t 4 ] implies [t 2 <t 4 ] path: t 2 -t 3 -t 4 : [t 2 Pt 3 ] ∙ [t 3 <t 4 ] implies [t 2 Pt 4 ] t1t1 t2t2 t3t3 t5t5 t6t6 t4t4 {<} {<,=} {=} {<} {P}{P} {P}{P} [t2<t4][t2<t4]

Temporal Planning 17 PA Constraint Networks A binary PA constraint network is a directed graph (X,C), where: X = {t 1,…,t n } is a set of instant variables (nodes), and C ⊆ X×X (the edges), c ij is labelled by a constraint r ij ∈ R iff [t i r ij t j ] holds. A tuple 〈 v 1,…, v k 〉 of real numbers is a solution for (X,C) iff t i =v i satisfy all the constraints in C. (X,C) is consistent iff there exists at least one solution.

Temporal Planning 18 Primitives in Consistent Networks Proposition: A PA network (X,C) is consistent iff there is a set of primitives p ij ∈ r ij for every c ij ∈ C such that for every k: p ij ∈ (p ik ∙ p kj ) note: not interested in solution, just consistency (qualitative solution)

Temporal Planning 19 Redundant Networks A primitive p ij ∈ r ij is redundant if there is no solution in which [ t i p ij t j ] holds. idea: filter out redundant primitives until either: no more redundant primitives can be found or: we find a constraint that is reduced to ∅ (inconsistency)

Temporal Planning 20 Path Consistency: Pseudo Code pathConsistency(C) while ¬ C.isStable() do for each k : 1≤k≤n do for each pair i,j: 1≤i<j≤n,i≠k, j≠k do c ij  c ij ∩ [c ik ∙ c kj ] if c ij = ∅ then return inconsistent

Temporal Planning 21 Path Consistency: Properties algorithm pathConsistency(C) is: incomplete for general CSPs complete for PA networks network (X,C) is minimal if it has no redundant primitives in a constraint algorithm pathConsistency(C) does not guarantee a minimal network

Temporal Planning 22 Overview Actions and Time Points Interval Algebra and Quantitative Time Planning with Temporal Operators

Temporal Planning 23 Extended Example: Inspect and Seal every container must be inspected and sealed: inspection: carried out by the crane must be performed before or after loading sealing: carried out by robot before or after unloading, not while moving corresponding intervals: i load, i move, i unload, i inspect, i seal

Temporal Planning 24 Inspect and Seal Example: Interval Constraint Network i load i inspect i seal i unload i move before or after before or after

Temporal Planning 25 disjunction cannot be translated into binary PA constraint Inspect and Seal Example: Qualitative Instant Constraints Let i be an interval. i.b and i.e denote two end time points [i.b ≤ i.e] constraint: beginning before end [i load before i move ]: [i load.b ≤ i load.e] and [i move.b ≤ i move.e] and [i load.e < i move.b] [i move before-or-after i seal ]: [i move.e < i seal.b] or [i seal.e < i move.b]

Temporal Planning 26 Interval Algebra (IA): Relations i 1 before i 2 : [i 1 b i 2 ] i 1 meets i 2 : [i 1 m i 2 ] i 1 overlaps i 2 : [i 1 o i 2 ] i 1 starts i 2 : [i 1 s i 2 ] i 1 during i 2 : [i 1 d i 2 ] i 1 finishes i 2 : [i 1 f i 2 ] i1i1 i2i2 i1i1 i2i2 i1i1 i2i2 i1i1 i2i2 i1i1 i2i2 i1i1 i2i2

Temporal Planning 27 IA: Relations and Constraints possible primitive relations P between intervals i 1 and i 2 : just described: [i 1 b i 2 ], [i 1 m i 2 ], [i 1 o i 2 ], [i 1 s i 2 ], [i 1 d i 2 ], [i 1 f i 2 ] symmetrical: [i 1 b’ i 2 ], [i 1 m’ i 2 ], [i 1 o’ i 2 ], [i 1 s’ i 2 ], [i 1 d’ i 2 ], [i 1 f’ i 2 ] i 1 equals i 2 : [i 1 e i 2 ] possible qualitative constraints R between instants: sets of the above relations (interpret as disjunction) R = 2 P = { ∅, {b}, {m}, {o},…, {b,m}, {b,o},…, {b,m,o},…, P} examples: while = {s,d,f}; disjoint = {b,b’} i1i1 i2i2

Temporal Planning 28 Operations on Relations set operations: ∩, ∪ etc. composition: ∙ ∙ bmosdfb’d’f’ b bbbb u∪vu∪vu∪vu∪v Pbb m bbbmvv u’ ∪ v’ bb o bbuovv u’ ∪ w’ u s bbusddb’ u’ ∪ w’ u d bb u∪vu∪v dddb’P u∪vu∪v

Temporal Planning 29 Properties of Composition transitive if [i 1 r i 2 ] and [i 2 q i 3 ] then [i 1 (r ∙ q) i 3 ] distributive (r ∪ q) ∙ s = (r ∙ s) ∪ (q ∙ s) s ∙ (r ∪ q) = (s ∙ r) ∪ (s ∙ q) not commutative [i 1 (r ∙ q) i 2 ] does not imply [i 1 (q ∙ r) i 2 ] example: d ∙ b = {b}; b ∙ d = {b,m,o,s,d} i1i1 i2i2 i3i3 i1i1 i2i2 i3i3 i3i3 [i 1 (d ∙ b) i 3 ] [i 1 (b ∙ d) i 3 ]

Temporal Planning 30 Inspect and Seal Example: Interval Constraint Propagation i inspect -i move -i unload : [i inspect {b} ∙ {b} i unload ] = [i inspect {b} i unload ] i inspect -i load -i seal : [i inspect {b,b’} ∙ {b} i seal ] = [i inspect P i seal ] i load i inspect i seal i unload i move {b}{b} {b}{b} {b,b’} {b}{b} {b}{b} {b}{b} {b}{b} P

Temporal Planning 31 IA Constraint Networks A binary IA constraint network is a directed graph (X,C), where: X = {i 1,…,i n } is a set of interval variables i j = (i j.b, i j.e), where i j.b≤i j.e, and C ⊆ X×X (the edges), c ij is labelled by a constraint r ij ∈ R iff [i i r ij i j ] holds. A tuple 〈 v 1,…,v k 〉 of pairs of real numbers (v i.b, v i.e) is a solution for (X,C) iff v i.b≤v i.e i i =v i satisfy all the constraints in C. (X,C) is consistent iff there exists at least one solution.

Temporal Planning 32 Primitives in Consistent Networks Proposition: A IA network (X,C) is consistent iff there is a set of primitives p ij ∈ r ij for every c ij ∈ C such that for every k: p ij ∈ (p ik ∙ p kj ) idea: filter out redundant primitives using path consistency algorithm until either: no more redundant primitives can be found or: we find a constraint that is reduced to ∅ (inconsistency) note: path consistency not complete for IA networks

Temporal Planning 33 Example: Quantitative Temporal Relations ship: Uranus arrives within 1 or 2 days will leave either with light cargo (stay docked 3 to 4 days) or full load (stay docked at least six days) ship: Rigel to be serviced on express dock (stay docked 2 to 3 days) normal dock (stay docked 4 to 5 days) must depart 6 to 7 days from now Uranus must depart 1 to 2 days after Rigel arrives

Temporal Planning 34 Example: Quantitative Temporal Constraint Network 5 instants related by quantitative constraints e.g. (2 ≤ D Rigel -A Rigel ≤ 3) ⋁ (4 ≤ D Rigel -A Rigel ≤ 5) possible questions: When should the Rigel arrive? Can it be serviced on a normal dock? Can the Uranus take a full load? A Uranus nowA Rigel D Rigel D Uranus [2,3] or [4,5] [1,2] [6,7] [3,4] or [6,∞]

Temporal Planning 35 Overview Actions and Time Points Interval Algebra and Quantitative Time Planning with Temporal Operators

Temporal Planning 36 Temporally Qualified Expressions (tqe) tqe: expression of the form: p(o 1,…,o k b,t e [ where: p is a flexible relation in the planning domain, o 1,…,o k are object constants or variables, and t b,t e are temporal variables such that t b <t e. tqe p(o 1,…,o k b,t e [ asserts that: for every time point t: t b ≤t<t e implies that p(o 1,…,o k ) holds [t b,t e [ is semi-open to avoid inconsistencies

Temporal Planning 37 Temporal Database A temporal database is a pair Φ=( F, C ) where: F is a finite set of tqes, C is a finite set of temporal and object constraints, and C has to be consistent, i.e. there exist possible values for the variables that meet all the constraints.

Temporal Planning 38 Temporal Database: Example robot r1 is at location loc1 robot r2 moves from location loc2 to location loc3 Φ = ({ 0,t 1 [, 0,t 2 [, 2,t 3 [, 3,t 4 [, 0,t 5 [, 6,t 7 [ }, { adjacent(loc2,loc3), t 2 <t 6 <t 5 <t 3 }) at(r1,loc1) at(r2,loc2) at(r2,path) at(r2,loc3) free(loc3) free(loc2) t1t1 t2t2 t3t3 t4t4 t0t0 t0t0 t0t0 t5t5 t6t6 t7t7 < < <

Temporal Planning 39 Inference over tqes A set F of tqes supports a (single) tqe e=p(v 1,…,v k b,t e [ iff: there is a tqe p(o 1,…,o k 1,t 2 [ in F and there is a substitution σ such that: σ(p(v 1,…,v k )) = p(o 1,…,o k ). An enabling condition for e in F is the conjunction of the following constraints: t 1 ≤t b, t e ≤t 2 and the variable binding constraints in σ.

Temporal Planning 40 Inference over tqes: Example F = 0,t 1 [, 0,t 2 [, 2,t 3 [, 3,t 4 [, 0,t 5 [, 6,t 7 [ } F supports with enabling conditions: t 0 ≤t, t’≤t 5, and l=loc3, or t 6 ≤t, t’≤t 7, and l=loc2.

Temporal Planning 41 Inference over Sets of tqes A set F of tqes supports a set E of tqes iff: there is a substitution σ such that: F supports every tqe e ∈ E using substitution σ. The set of enabling conditions for a single tqe e in F is denoted Θ(e/ F ). The set of enabling conditions for a set of tqes E in F is denoted Θ( E / F ).

Temporal Planning 42 Inference over Temporal Databases A temporal database Φ=( F, C ) supports a set E of tqes iff: F supports E and there is an enabling condition c ∈ Θ( E / F ) that is consistent with C. A temporal database Φ=( F, C ) supports another temporal database Φ’=( F’, C’ ) iff: F supports F’ and there is an enabling condition c ∈ Θ( F’ / F ) such that C’ ∪ c is consistent with C. A temporal database Φ=( F, C ) entails another temporal database Φ’=( F’, C’ ) iff: F supports F’ and there is an enabling condition c ∈ Θ( F’ / F ) such that C entails C’ ∪ c.

Temporal Planning 43 Temporal Planning Operators: Example b,t e [ preconditions: 1,t b [, 2,t e [ effects: b,t e [, e,t 3 [, 4,t 5 [ constraints: t b <t 4 <t 2, adjacent(l,l’) at(r,l) at(r,path) at(r,l’) free(l) free(l’) move(r,l,l’) t1t1 tbtb t2t2 t3t3 t4t4 t5t5

Temporal Planning 44 Temporal Planning Operators A temporal planning operator o is a tuple (name(o), precond(o), effects(o), constr(o)), where: name(o) is an expression of the form a(x 1,…,x k,t b,t e ) such that: a is a unique operator symbol, x 1,…,x k are the object variables appearing in o, and t b,t e are temporal variables in o, precond(o) and effects(o) are sets of tqes, and constr(o) is a conjunction of the following constraints: temporal constraints on t b,t e and possibly further time points, rigid relations between objects, and binding constraints of the form x=y, x≠y, or x ∈ D.

Temporal Planning 45 Applicability of Temporal Planning Operators A temporal planning operator o is applicable to a temporal database Φ=( F, C ) iff: precond(o) is supported by F and there is an enabling condition c in Θ(precond(o)/ F ) such that: C ∪ constr(o) ∪ c is consistent. The result of applying an applicable action a to Φ is a set of possible temporal databases γ 0 (Φ,a) = { ( F ∪ effects(a), C ∪ constr(a) ∪ c) | c ∈ Θ(precond(a)/ F ) }

Temporal Planning 46 Applicable Operator: Example operator: b,t e [ 0,t 1 [ supports 1,t b [ 6,t 7 [ supports 2,t e [ enabling condition: {r=rob1, l=loc1, l=loc1, t 0 ≤t’ 1, t b ≤t 1, t 6 ≤t’ 2, t e ≤t 7 } consistent move(r1,loc1,loc2) is applicable at(r1,loc1) at(r2,loc2) at(r2,path) at(r2,loc3) free(loc3) free(loc2) t1t1 t2t2 t3t3 t4t4 t0t0 t0t0 t0t0 t5t5 t6t6 t7t7 < < <

Temporal Planning 47 Domain Axioms: Example no object can be in two places at the same time: b,t e [, b,t’ e [} → (r≠r’) ⋁ (l=l’) ⋁ (t e ≤t’ b ) ⋁ (t’ e ≤t b ) every location can be occupied by one robot only: 1,t’ 1 [, 2,t’ 2 [} → (l≠l’) ⋁ (t’ 1 ≤t 2 ) ⋁ (t’ 2 ≤t 1 )

Temporal Planning 48 Domain Axioms A domain axiom α is an expression of the form: cond(α) → disj(α) where: cond(α) is a set of tqes and disj(α) is a disjunction of temporal and object constraints. A temporal database Φ=( F, C ) is consistent with α iff: cond(α) is supported by F and for every enabling condition c 1 ∈ Θ(cond(α)/ F ) there is at least one disjuct c 2 ∈ disj(α) such that C ∪ c 1 ∪ c 2 is consistent.

Temporal Planning 49 Temporal Planning Domains A temporal planning domain is a triple D = (S Φ, O,X) where: S Φ is the set of all temporal databases that can be defined with the constraints and the constant, variable, and relation symbols in our representation, O is the set of temporal planning operators, and X is a set of domain axioms.

Temporal Planning 50 Temporal Planning Problems A temporal planning problem in D is a triple P = ( D,Φ 0,Φ g ) where: D = (S Φ, O,X) is a temporal planning domain, Φ 0 =( F, C ) is a database in S Φ that satisfies the axioms in X. represents the initial scenario including: initial state of the world predicted evolution independent of planned actions Φ g =( G, C g ) is a database in S Φ where: G is a set of tqes representing the goals of the problem C g are object and temporal constraints on variables in G.

Temporal Planning 51 Statement of a Planning Problem A statement of a planning problem is a tuple P = ( O,X,Φ 0,Φ g ) where: is a set of temporal planning operators, is a set of domain axioms, Φ 0 =( F 0, C 0 ) is a database in S Φ representing the initial scenario, and Φ g =( G, C g ) is a database in S Φ representing the goals of the problem.

Temporal Planning 52 Concurrent Actions problem: swap locations of two robots only one robot at each location at any time path may hold multiple robots move(r1,loc1,loc2): not applicable move(r2,loc2,loc1): not applicable apply both at the same time: applicable temporal planning can handle such concurrent actions

Temporal Planning 53 Temporal Planning Procedure TPS(Ω) flaws  Ω.getFlaws() if flaws= ∅ then return Ω flaw  flaws.chooseOne() resolvers  flaw.getResolvers(Ω) if resolvers= ∅ then return failure resolver  resolvers.selectOne() Ω’  Ω.refine(resolver) return TPS(Ω’)

Temporal Planning 54 Structure of Ω Ω = (Φ, G, K,π): current processing stage of the planning problem, where: Φ = ( F, C ): current temporal database, initially Φ 0 G : set of current open goals, initially taken from Φ g =( G, C g ) K = {C 1,…,C i }: set of pending conditions (initially empty): sets of enabling conditions of actions and sets of consistency conditions of axioms, π: set of actions in the current plan, initially empty.

Temporal Planning 55 Flaw Type: Open Goal Resolver: Existing tqe goal: unsupported tqe e in G assumption: tqe in F that can support e resolver: K  K ∪ { Θ(e/ F ) } G  G – {e}

Temporal Planning 56 Flaw Type: Open Goal Resolver: New Action goal: unsupported tqe e in G assumption: action a (instance of operator o) has effects(a) that support e and and constr(a) are consistent with C resolver: π  π ∪ {a} F  F ∪ effects(a) C  C ∪ constr(a) G  ( G – {e}) ∪ precond(a) K  K ∪ { Θ( precond(a) / Φ ) }

Temporal Planning 57 Flaw Type: Unsatisfied Axiom Resolver: Add Conditions axiom α : cond(α) → disj(α) and cond(α) is supported by F disj(α) is not supported by F assumption: there are consistency conditions Θ(α/Φ) such that disj(α) is supported by F resolver: K  K ∪ {Θ(α/Φ)}

Temporal Planning 58 Flaw Type: Threat Resolver: Add Constraints consistency condition C i ∈ K that is not entailed by Φ assumption: c ∈ C i is consistent with C resolver: C  C ∪ c K  K - {C i }

Temporal Planning 59 Overview Actions and Time Points Interval Algebra and Quantitative Time Planning with Temporal Operators