430 likes | 528 Views
Temporal Planning with Continuous Change J.Scott Penbrethy Daniel S. Weld Presented by - Parag. An Example. Mausam. Austin. Seattle. 500 gallons. 1000. 800. Initial configuration. L.A. Stanley. Reach Austin in 5hr and 30 minutes. Fast fly : 600 miles/hr , 1 gallon/2 miles
E N D
Temporal Planning with Continuous ChangeJ.Scott Penbrethy Daniel S. WeldPresented by - Parag
An Example Mausam Austin Seattle 500 gallons 1000 800 Initial configuration L.A. Stanley Reach Austin in 5hr and 30 minutes. Fast fly : 600 miles/hr , 1 gallon/2 miles Slow fly: at 400 miles/hr, 1 gallon/3 miles Boarding time : 30 mins, Refuelling time: 1 hr. (750 gallons)
An Example <Board Mausam> Mausam, Stanley 30 min Austin Seattle 1 hr, 20 mins <Slow Fly> <Fast Fly> 2 hrs 30 mins L.A. 1 hr <Fill fuel> <Board Stanley> Final Configuration
An Example Can the problem be solved using one of our earlier planners? Why or why not? What all additional features do we need?
Temporal Planner • Explicit Notion of Time - Deadline Goals • Notion of Continuous Change - Metric changes • Simultaneous Actions - Actions taking place at the same • instant of time in the world.
Zeno : A Temporal Planner What all kind of effects it can reason about? • Deadline Goals • Piecewise Linear Continuous Change • Simultaneous Actions
Representation? What kind of representation would we choose? Can we do away with STRIPS like representation? Why or why not?
Representation? How would we represent time?
Representation? What about continuous constraints? e.g. the amount of Fuel in the plane changes continuously as it flies.
Action and Goal Representation • Typed First Order Logic • Point Based Model of Time • - what does it mean? • Temporal functions and Relations use a time • point as their first argument. • All types except time assumed finite
An Example Action Schema Schema Fast-Fly(m, l) at-time: [ts , te] Example Preconditions: 1. Plane is at Seattle at ts ? at(ts,plane,seattle) 2. dist(m,l) = v2 3. While in flight, fuel has to be non-zero? Do we need some kind of quantification here? On which variable? time, t є [ts,te], fuel(t,plane) > 0
An Example Action Schema Schema Fast-Fly(m, l) at-time: [ts , te] Constraints: Why do we need them? Any example constraint for above action schema ? te=ts+v2/600
An Example Action Schema Schema Fast-Fly(m, l) at-time: [ts , te] Post Conditions / Effects: 1. At(te,plane,l) 2. Conditional Effects: Why? An example? human o, time t, (t є (ts,te]Λin(t,o) ) at(t,o,m)Λ at(te,o,l)
Partial Order Planning • Search in the space of partial plans • A partial plan represented as the triplet – • <A,O,L> • - A : set of Actions currently in the plan • - O : ordering constraints on the set of actions • in A e.g. Ae < Ap • - L : set of Causal links • e.g. Ae Q Ap
An Example Start Right Sock Left Sock Right Sock on Left Sock on Right Shoe Left Shoe Left Shoe on, Right Shoe on Finish
Notion of a Threat Let Ae <Ap be some ordering constraint. Also, let (Ae Q Ap) L Suppose that there is another action At which Deletes Q. And also, let us assume that ordering Ae <At < Ap is consistent with respect to the Set O. Then, we say that action At poses a threat To the causal link (Ae Q Ap) . In order to remove the threat, we try the following: - promotion - move At before the two actions. - demotion - move At after the two actions.
POP Algorithm Input : (<AOL>,agenda) • 1. Termination: If G = ø, return <A,O,L> • 2. Goal Selection: Select a pair <Q,Aneed> from the agenda. • 3. Action Selection: Let Aadd be an action which adds Q. Add AAdd to the set A, • if it does not already contain Aadd .. Add the causal link Ae Q Ap to the set • of causal links, L. Also add, Aadd <Aneed to the set O of ordering constraints. • If no such action exists, return failure. • 4. Update Goal Set: Update the agenda by removing <Q,Aneed> and adding • any new preconditions introduced because of Aadd. • 5. Causal Link Protection: Remove any threats to the links in L by promotion or demotion. • Else return failure. • 6. Recurse: Go back to step 1 with the new values of action set, link set and ordering constraints.
Zeno: Plan Representation Plan : A triplet of the form <S,L,C> S : Set of steps in the partial plan L : Set of causal links C : Set of constraints Initial State: <S,L,C> = ?
Searching for the Goal How would it be different from the standard partial order Planner?
Searching for the Goal How do we take into account the continuous constraints?
Searching for the Goal Does our representation allow us to plan for deadline goals? How?
Searching for the Goal Simultaneous Actions?
Zeno Algorithm no FAIL Is C consitent? yes no Remove a goal <ψ,ig> From G Is G = ø ? yes Return P no Is ψ primitive? Reduce <ψ,ig> Goto Start. yes no Is ψ metric ? Choose Source ei for <ψ,ig> Add link <ip,ψ> to L; Resolve Threats. Go to start. yes Post <ψ,ig> Go to start What are the non-deterministic steps in above algorithm?
Goal Reduction Reduce Goal <ψ,ig> time t, t є ig ψ . Consider, ψ = fuel( t, plane) > 0 Split into to two sub-inverval goals. Or mark the interval as indivisible. What is the intuition? When do we want to mark the interval as indivisible?
Goal Reduction • Disjuction of a set of goals ? - non-deterministically try each of the disjuncts. • A universally quantified goal : type x, ψ. • type time? - Enumerate all possible instances. • Existential quantifiers? - treat as simple vairable names.
Metric Constraints • time t, t є [ts ,te], fuel(t,plane) > 0 • Can we exploit linearity here? • Apply mean value theorem. • Need to post only two constraints • - at the two end points of the interval.
Logical Goals Example : time t, t є ig, ψ = At(t,Stanley,Austin) How do we handle these? Non-deterministically find an effect concluding ψ. Let ie be the interval over which ψ is concluded. Add the ordering constraint ie precedes ip. Add to L <ip, ψ> where ip covers both ie and ig. Use standard techniques of promotion and demotion To resolve the threats.
Constraint Manager • What kind of constraints do we need to solve? • - linear equalities, linear inequalities, • co-designation constraints, reasoning about • time-intervals. • Use standard techniques • - Gaussian elimination, simplex method etc.
Future Work/Extensions • Heuristics for guiding the search. • Fast implementation of temporal queries. • Can the idea be extended to Graphplan?
TGP – Temporal Graphplan • Weld & Smith – IJCAI – 99 • Use the graph structure to represent the flow of time. • Each durative (temporal) action could span several layers • of the graph. • Strong mutual exclusion constraints : the propostions • manipulated by the action locked for the duration of the • action. • Can be shown to generate optimal plans – in terms of time • of execution.
Problems? Could be very expernsive to search - if the plan contains two or more actions of very different durations. Mutual Exclusion Constraints are too strong. • Example : action of lighting a matchstick. • Till what time does the effect of the action persist?
Another Approach • Long & Fox – to appear at ICAPS 2003 • Use the graph structure to represent the logical flow and • not the temporal flow. • Use a separate entity to manage temporal constraints • - somewhat like the constraint manager of Zeno. • Split each durative action into two simple actions • - the start action and the end action. • Take care of invariants of a durative action.
Invariants Matchstick Lighting action: Let Precondition : ¬Windy (invariant) Postconidition : Light How do we make sure that ¬Windy holds throughout The duration of the action? Introduce a new action <Inv> whose precondition is the Invariant.
Invariants Pre: inv,As Pre: start A-invariant check A-end A-start ….. ….. Add: As, initial effects Del: Ai. + final effects Add: Ai Would it work?
Invariants Pre: As,Ai Pre: inv,As Pre: start Pre: inv,As A-end A-invariant check A-invariant check A-start ….. ….. ….. Add: As, initial effects Del: Ai. + final effects Add: As, Ai Add: As, Ai Remove the No-ops for the special effect As.
Graph Representation Each durative action represented by two actions – Start action and end action. We do not worry about durations in the graph representation. Invariants maintain the logical flow between the start And the end action.
Graph Representation The action layers represent no lag in time. The proposition layer represents the state of the system for a particular interval of time. Graph constructed in the standard manner.
Searching Through the Graph • Use the standard graph plan search. • Additional constraints introduced because of actoin • durations. • Constraints represented in form of linear equations. • Use a separate constraint solver to solve these • constraints.
Constraint Satisfaction • Basic idea : • an equation for each durative action currently in plan. • for each layer in the graph, there is a variable – represents • the duration for which it stays. • the total time duration of the layers between the start action • and end action should be equal to the specified duration of • the action.
Comparisons The described approach has the advantage of using The standard graph-plan structure for fast retrieval. Zeno handles much more generic constraints for example Numeric constraints. Can the benefits of two be combined?
References • Temporal Planning with Continuous Change - J. Scott Penberthy & Daniel S. Weld • Exploiting a Graphplan Framework in Temporal Planning – Derek Long & Maria Fox • Fast Planning through Planning Graph Analysis – Arvim L. Blum & Merrick L. Frust • An Introduction to least Commitment Planning – Daniel S. Weld • Artificial Intelligence Modern Approach (Second Edition, Chapter 11) – • Stuart Russell & Peter Norvig