Temporal Planning action models Using PDDL 2 1

  • Slides: 57
Download presentation
Temporal Planning § action models § Using PDDL 2. 1 standard Done § how

Temporal Planning § action models § Using PDDL 2. 1 standard Done § how to model the search § Progression; Regression; PO planning § how to extract good heuristics

Essence of Temporal Planning s s o A [d] e e

Essence of Temporal Planning s s o A [d] e e

Essence of Temporal Planning No Temporal Gap Classical + Scheduling B * A *

Essence of Temporal Planning No Temporal Gap Classical + Scheduling B * A * * D * C § Forbidding temporal gap implies § All effects at one time § Before-conditions meet effects § After-conditions meet effects § Unique transition per action pre A [d] * eff

Approaches for MTP § In theory, pretty much every one of the approaches we

Approaches for MTP § In theory, pretty much every one of the approaches we saw for classical planning can be (and have been) extended to MTP (with varying degrees of scalability) § There are some interesting tradeoffs § PO planners are easiest to extend to support the concurrency needed for durative actions § Have harder time handling resources (because resource consumption depends on exactly what actions occurred before this time point) § Progression planners easiest to extend to support resource consuming actions § But harder time handling concurrency (need to consider “advancing clock” as a separate option in addition to applying one of the actions)

Temporal Planning via Plan Space Planning § Instead of constraints w. r. t steps

Temporal Planning via Plan Space Planning § Instead of constraints w. r. t steps (s<s’ or P@s), we will have constraints on time points (t – t’ = 4 etc. ).

At_fusebox Have_light@t 1 I G Cross_cellar Have_light@<t 1, t 2> t 2 -t 1

At_fusebox Have_light@t 1 I G Cross_cellar Have_light@<t 1, t 2> t 2 -t 1 =10 t 1 < t. G t. I < t 1 t 2 at_fuse_box@G}

The ~have_light effect at t 4 can violate the <have_light, t 3, t 1>

The ~have_light effect at t 4 can violate the <have_light, t 3, t 1> causal link! Resolve by Adding T 4<t 3 V t 1<t 4 ~have-light t 3 t 4 Burn_match At_fusebox Have_light@t 1 I Have_light@<t 1, t 2> t 2 -t 1 =10 t 1 < t. G t. I < t 1 T 4<t. G T 4 -t 3=15 T 3<t 1 T 4<t 3 V t 1<t 4 G Cross_cellar t 2 at_fuse_box@G}

~have-light t 3 t 4 Burn_match Notice that zeno allows arbitrary slack between the

~have-light t 3 t 4 Burn_match Notice that zeno allows arbitrary slack between the two actions At_fusebox Have_light@t 1 I Cross_cellar t 2 -t 1 =10 t 1 < t. G t. I < t 1 t 4<t. G t 4 -t 3=15 t 3<t 1 t 4<t 3 V t 1<t 4 t 3<t 2 t 4<t 3 V t 2<t 4 Have_light@<t 1, t 2> G t 2 at_fuse_box@G} To work on have_light@<t 1, t 2>, we can either --support the whole interval directly by adding a causal link <have-light, t 3, <t 1, t 2>> --or first split <t 1, t 2> to two subintervals <t 1, t’> <t’, t 2> and work on supporting have-light on both intervals

PO (Partial Order) Search Involves LPsolving over Linear constraints (temporal constraints Are linear too);

PO (Partial Order) Search Involves LPsolving over Linear constraints (temporal constraints Are linear too); Waits for nonlinear constraints To become linear. Involves Posting temporal Constraints, and Durative goals [Zeno; 1994] Split the Interval into Multiple overlapping intervals

More on Temporal planning by plan-space planners (Zeno) § The “accommodation” to complexity that

More on Temporal planning by plan-space planners (Zeno) § The “accommodation” to complexity that Zeno makes by refusing to handle nonlinear constraints (waiting instead until they become linear) is sort of hilarious given it doesn’t care much about heuristic control otherwise § Basically Zeno is trying to keep the “per-node” cost of the search down (and if you do nonlinear constraint consistency check, even that is quite hard) § Of course, we know that there is no obvious reason to believe that reducing the per-node cost will, ipso facto, also lead to reduction in overall search. § The idea of “goal reduction” by splitting a temporal subgoal to multiple sub-intervals is used only in Zeno, and helps it support a temporal goal over a long duration with multiple actions. Neat idea. § Zeno doesn’t have much of a problem handling arbitrary concurrency—since we are only posting constraints on temporal variables denoting the start points of the various actions. In particular, Zeno does not force either right or left alignment of actions.

Temporal Planning with Progression? § All the progression planners we looked at were able

Temporal Planning with Progression? § All the progression planners we looked at were able to produce sequential plans. § Can progression be used to produce concurrent plans? § Sub Question: Can progression be used to produce parallel plans?

§ Producing parallel plans with progression? The naïve idea is to project over subsets

§ Producing parallel plans with progression? The naïve idea is to project over subsets of non-interfering actions (rather than single actions). § Problem: Exponential branching factor § A better idea: Consider “fattening” as well as “lengthening” the current partial plan as two options. § We start by representing the state of a partial plan prefix as [S, {A 1…Ak}] where S is the current state, and {A 1. . Ak} are the mutually non-interfering actions that we have already committed to applying at S. § Notice that this is just a generalization of the normal progression state, in which the action set {A 1. . Ak} will be a singleton § Given a state [S, {A 1. . Ak}] to expand, we have (backtrackable) choices: § Fatten: Consider applying another action B in state S [One branch for each possible action B] § For this to be feasible, B should be applicable in Si and B should not be interfering with A 1. . Ak. The resulting state will be {S; {A 1…Ak}+B} § Advance: Consider advancing the state. If S’ is the state resulting from application of {A 1. . Ak} to S, then generate the state {S’; {}} § Notice that § Fattening is only done at the current state (once advancing is done, the current state changes. So any new fattening will be done at the new state. § Normal progression does an automatic advance after each fatten (which means you will have only one action at each step)

Generating concurrent plans is similar to generating parallel plans…almost. . § We will continue

Generating concurrent plans is similar to generating parallel plans…almost. . § We will continue to consider fattening at the current state, and advancing to the next state Several issues: § § § Actions have durations. So the state information should include the actions we committed to (but haven’t completed) How much do we advance? § § Worst case: Advance time to the “next time point” (could be bad news if we have dense time!) Clever idea: Advance time to the “next happening” – where the state changes

State-Space Search: Search is through time-stamped states Search states should have information about --

State-Space Search: Search is through time-stamped states Search states should have information about -- what conditions hold at the current time slice (P, M below) -- what actions have we already committed to put into the plan ( Set <pi, ti> of predicates pi and the time of their last achievement ti < t. Set of functions represent resource values. Set of protected persistent conditions (could be binary or resource c S=(P, M, , Q, t) Time stamp of S. Event queue (contains resource as w as binary fluent events). In the initial state, P, M, non-empty Q non-empty if we have exogenous events

Search Algorithm (cont. ) § Goal Satisfaction: S=(P, M, , Q, t) G if

Search Algorithm (cont. ) § Goal Satisfaction: S=(P, M, , Q, t) G if <pi, ti> G either: § <pi, tj> P, tj < ti and no event in Q deletes pi. § e Q that adds pi at time te < ti. § Action Application: Action A is applicable in S if: § All instantaneous preconditions of A are satisfied by P and M. § A’s effects do not interfere with and Q. § No event in Q interferes with persistent preconditions of A. § A does not lead to concurrent resource change § When A is applied to S: § P is updated according to A’s instantaneous effects. § Persistent preconditions of A given are put in [TLplan; Sapa; 2001—talk 9/12/01] S=(P, M, , Q, t)

Decision Epochs: Limiting the places where clock can be advanced In the cellar plan

Decision Epochs: Limiting the places where clock can be advanced In the cellar plan above, the clock, If advanced, will be advanced to 15, Where an event (~have-light will occur) This means cross-cellar can either be done At 0 or 15 (and the latter makes no sense) ~have-light Light-match § § To support concurrency, we need to consider advancing the clock How far to advance the clock? § One popular strategy is to advance the clock to the time of the next earliest event in the event queue; since this is the least advance needed to make changes to P and M of S. § At this point, all the events happening at that time point are transferred from Q to P and M (to signify that they have happened) Cross-cellar 10 15

Interference Clearly an overkill

Interference Clearly an overkill

Light-match Let current state S be P: {have_light@0; at_steps@0}; Q: {~have_light@15} t: 0 (presumably

Light-match Let current state S be P: {have_light@0; at_steps@0}; Q: {~have_light@15} t: 0 (presumably after doing the light-candle action) Applying cross_cellar to this state gives S’= P: {have_light@0; crossing@0}; : {have_light, <0, 10>} Q: {at_fuse-box@10; ~have_light@15} t: 0 Time-stamp Light-match Cross-cellar 10 15

!!! Short matches § No epoch available § “middle of nowhere” § Decision Epoch

!!! Short matches § No epoch available § “middle of nowhere” § Decision Epoch Planning is incomplete! Wow!

Salvaging DEP Decision Epoch Planning: DEP § Only start actions after events § Choose

Salvaging DEP Decision Epoch Planning: DEP § Only start actions after events § Choose § Start an action § Advance epoch A [3] B [2] § Temporally Simple § Complete, suboptimal § Temporally Expressive § Incomplete, suboptimal light-match [8] fix-fuse [4]

Salvaging DEP Generalized DEP: DEP+ § Also end actions after events § Choose §

Salvaging DEP Generalized DEP: DEP+ § Also end actions after events § Choose § Start an action § End an action § Advance epoch § Temporally Simple § Complete, optimal § Temporally Expressive § Incomplete, suboptimal A [3] B [2]

!!! Wow! § Temporally Simple Classical + Scheduling § Winners incomplete for all Temporally

!!! Wow! § Temporally Simple Classical + Scheduling § Winners incomplete for all Temporally Expressive Languages § Most/all benchmarks are classical!

!!! State of the Art: Incomplete or Slow § Metric-FF, MIPS, SGPlan, SAPA, TP

!!! State of the Art: Incomplete or Slow § Metric-FF, MIPS, SGPlan, SAPA, TP 4, TPG, HSP*, . . . § Guarantees only for temporally simple languages § Can solve some concurrent problems § Light-match, but not short-match § Difficult to detect § ZENO, Ix. Te. T, VHPOP, LPGP, . . . § Complete § Slow

Salvaging State-space Temporal Planning Interleaving-Space: TEMPO § Delay dispatch decisions until afterwards § Choose

Salvaging State-space Temporal Planning Interleaving-Space: TEMPO § Delay dispatch decisions until afterwards § Choose § Start an action § End an action § Make a scheduling decision light match fix fuse § Solve temporal constraints § Temporally Simple fix § Temporally Expressive fix light fuse § Complete, Optimal match

Slides beyond this not explicitly discussed in the class

Slides beyond this not explicitly discussed in the class

Regression Search is similar… § § In the case of regression over durative actions

Regression Search is similar… § § In the case of regression over durative actions too, the main generalization we need is differentiating the “advancement of clock” and “application of a relevant action” Can use same state representation S=(P, M, , Q, t) with the semantics that § P and M are binary and resource subgoals needed at current time point § Q are the subgoals needed at earlier time points § are subgoals to be protected over specific intervals § We can either add an action to support something in P or Q, or push the clock backward before considering subgoals § If we push the clock backward, we push it to the time of the latest subgoal in We can either work On R at tinf or R and Q At tinf-D(A 3) R Q A 3: W W X y A 2: X A 1: Y To work on have_light@<t 1, t 2>, we can either --support the whole interval directly with one action --or first split <t 1, t 2> to two subintervals <t 1, t’> <t’, t 2> and work on supporting have-light on both intervals [TP 4; 1999]

Let current state S be P: {at_fuse_box@0} t: 0 Regressing cross_cellar over this state

Let current state S be P: {at_fuse_box@0} t: 0 Regressing cross_cellar over this state gives S’= P: {}; : {have_light, < 0 , -10>} Q: {have_light@ -10; at_stairs@-10} t: 0 Cross_cellar Have_light Notice that in contrast to progression, Regression will align the end points of Concurrent actions…(e. g. when we put in Light-match to support have-light)

Notice that in contrast to progression, Regression will align the end points of Concurrent

Notice that in contrast to progression, Regression will align the end points of Concurrent actions…(e. g. when we put in Light-match to support have-light) S’= P: {}; : {have_light, < 0 , -10>} Q: {have_light@-10; at_stairs@-10} t: 0 Cross_cellar Have_light Cross_cellar If we now decide to support the subgoal in Q Using light-match S’’=P: {} Q: {have-match@-15; at_stairs@-10} : {have_light, <0 , -10>} t: 0 Have_light Light-match

§ Tradeoffs: Progression/Regression/PO Planning for metric/temporal Compared to PO, bothplanning progression and regression do

§ Tradeoffs: Progression/Regression/PO Planning for metric/temporal Compared to PO, bothplanning progression and regression do a less than complete job of handling concurrency (e. g. slacks may have to be handled through postprocessing). § Progression planners have the advantage that the exact amount of a resource is known at any given state. So, complex resource constraints are easier to verify. PO (and to some extent regression), will have to verify this by posting and then verifying resource constraints. § Currently, SAPA (a progression planner) does better than TP 4 (a regression planner). Both do oodles better than Zeno/Ix. TET. However § TP 4 could be possibly improved significantly by giving up the insistence on admissible heuristics § Zeno (and Ix. TET) could benefit by adapting ideas from

When is Temporal Planning Really Temporal? William Cushing Subbarao Kambhampati Mausam Daniel Weld Special

When is Temporal Planning Really Temporal? William Cushing Subbarao Kambhampati Mausam Daniel Weld Special thanks to: J. Benton, Menkes van den Briel

Introduction Temporal Planning start-pre § § over-pre end-pre name [duration] Plan-space start-eff Extended planning

Introduction Temporal Planning start-pre § § over-pre end-pre name [duration] Plan-space start-eff Extended planning graph Reduction to ILP State-space § Competition winners § Reachability heuristics § Infinite number of time points § Decision Epochs § Restrict start times to events end-eff M - match L - light F - fuse light-match [8] fix-fuse [4]

Overview Troubling Questions § What do/should the IPCs measure? § Can Decision Epoch Planning

Overview Troubling Questions § What do/should the IPCs measure? § Can Decision Epoch Planning be fixed? Essence of Temporal Planning § No. § Required Concurrency § But! § Temporally Simple ≈ Classical § DEP+ § Temporally Expressive ≈ Harder § “Less” incomplete § TEMPO § Reachability heuristics

Essence of Temporal Planning Required Concurrency § Temporally Simple Languages § Concurrency never necessary

Essence of Temporal Planning Required Concurrency § Temporally Simple Languages § Concurrency never necessary § …but can be exploited for quality § Temporally Expressive Languages § Can specify problems such that concurrency is needed

Essence of Temporal Planning Temporal Action Languages Start-pre Over-pre End-pre name [duration] Start-eff End-eff

Essence of Temporal Planning Temporal Action Languages Start-pre Over-pre End-pre name [duration] Start-eff End-eff Over-pre name [duration] End-eff

Essence of Temporal Planning Temporal Action Languages s o e A [d] s e

Essence of Temporal Planning Temporal Action Languages s o e A [d] s e § Temporally Simple § Rescheduling is possible § MIPS, SGPlan, LPG, … § Sequential planning is complete – “optimal” ? § TGP, yes § In general, yes § Temporally Expressive § § Temporal Gap

Essence of Temporal Planning (Minimal) Temporally Expressive Languages § Temporal Gap § Before-condition and

Essence of Temporal Planning (Minimal) Temporally Expressive Languages § Temporal Gap § Before-condition and effect § After-condition and effect § Two effects § Temporally Simple No Temporal Gap

Essence of Temporal Planning No Temporal Gap Classical + Scheduling B * A *

Essence of Temporal Planning No Temporal Gap Classical + Scheduling B * A * * D * C § Forbidding temporal gap implies § All effects at one time § Before-conditions meet effects § After-conditions meet effects pre A [d] * eff § Unique transition per action § Theorem: Every concurrent plan is an O(n) rescheduling of a sequential plan § And vice versa

Conclusions § Required concurrency is the essence of temporal planning § Otherwise classical planner

Conclusions § Required concurrency is the essence of temporal planning § Otherwise classical planner + O(n) scheduling suffices § Simple test for required concurrency: Temporal gap § Decision epoch planning is fundamentally incomplete § But DEP+ may solve most real-world problems § Complete state-space temporal planning: TEMPO § Allows leveraging of state-based reachability heuristics § !!!!!

Evaluating Temporal Planning Domains William Cushing Subbarao Kambhampati Kartik Talamadupula Daniel Weld Mausam

Evaluating Temporal Planning Domains William Cushing Subbarao Kambhampati Kartik Talamadupula Daniel Weld Mausam

Competition winners are incomplete L fix-fuse M F light-match -L L ^-M § Epoch

Competition winners are incomplete L fix-fuse M F light-match -L L ^-M § Epoch § A time at which an event happens § Decision Epoch Planning § Only start actions after epochs Temporal Planning § How incomplete? § What should the IPC measure? Required Concurrency

How deep is the problem? § Required Concurrency § Languages § Incomplete for temporally

How deep is the problem? § Required Concurrency § Languages § Incomplete for temporally expressive languages § Complete for temporally simple languages

(Minimal) Temporally Expressive Languages § Temporal Gap § Before-condition and effect § After-condition and

(Minimal) Temporally Expressive Languages § Temporal Gap § Before-condition and effect § After-condition and effect § Two effects § Temporally Simple No Temporal Gap

Required Concurrency § Inherently sequential is easy § Timestamps (with support for arithmetic) §

Required Concurrency § Inherently sequential is easy § Timestamps (with support for arithmetic) § Loose integration with a PERT scheduler § TGP, LPG-td, SGPlan, MIPS, … § Required concurrency is hard § The plan space is larger § The scheduling sub-problem is harder § Sub-problem optimality principle § State of the art is VHPOP, LPGP, CRIKEY § TEMPO, reduction to CSP

The International Planning Competition § Benchmarks must not require (much) concurrency § How much?

The International Planning Competition § Benchmarks must not require (much) concurrency § How much? § None at all § How do we show it? § Use temporal gap? § Problem: “every” action has temporal gap

Solution: Decompile temporal gap § (navigate ? rover ? alpha ? omega) § Pre:

Solution: Decompile temporal gap § (navigate ? rover ? alpha ? omega) § Pre: (at start (at ? rover ? alpha)) § Eff: (and § (at start (not (at ? rover ? alpha))) § (at end (at ? rover ? omega))) § (navigate ? rover ? alpha ? omega) § (over all (=> (at ? rover) ? alpha ? omega))

Causal Structure and Concurrency B A * light-match * * C D * fix-fuse

Causal Structure and Concurrency B A * light-match * * C D * fix-fuse light-match A B C D fix-fuse Inherently Sequential Inherently Concurrent

Navigate’s sequential structure navigate communicate ? ? navigate

Navigate’s sequential structure navigate communicate ? ? navigate

Technique: Start-time Sequentialization A light-match fix-fuse B A B § Do not want to

Technique: Start-time Sequentialization A light-match fix-fuse B A B § Do not want to enumerate plans! § Nor every sequentialization! § Start-time sequentialization § Fixed attempt § Suffices for benchmarks (not necessary) § End-time sequentialization § Critical-time sequentialization § Start times of containing actions in same order as all dependencies

Element Safety § Y<X § S(A(Y)) > S(A(X)) § Threat-free § X supports Z,

Element Safety § Y<X § S(A(Y)) > S(A(X)) § Threat-free § X supports Z, § Y threatens Z § Interaction-free § Z supports Y § X threatens Y § Link-free § Y supports X A B B A

Benchmarks never require concurrency (: durative-action navigate : parameters (? x - rover ?

Benchmarks never require concurrency (: durative-action navigate : parameters (? x - rover ? y - waypoint ? z - waypoint) : duration (= ? duration 5) ; ; (at ? x - rover ? y - waypoint) : condition (and (at ? x - rover ) - waypoint ; ; (at start (at ? x ? y)) ; ; MV Fluent § “The Perils of Discrete Resource Models” ; ; (at start (>= (energy ? x) 8)) ; ; Resource Consumption § ICAPS workshop (over all (can_traverse ? x ? y ? z))on IPC (at start (available ? x)) (over all (visible ? y ? z)) ) : effect (and § (at end (calibrated ? c ? r)) ; ; (at start (decrease (energy ? x) 8)) ; ; Resource Consumption (over all (consume (energy ? x) 8)) ; ; Resource Consumption ; ; (at start (not (at ? x ? y))) ; ; MV Fluent § http: //rakaposhi. eas. asu. edu/is-benchmarks. html ; ; (at end (at ? x ? z)))) ; ; MV Fluent (over §all Forthcoming (-> (at ? x) ? y ? z)) ; ; MV Fluent )) § Durative change on m. v. fluents is safe § Unbounded resources are safe § A few special cases § Document…

Only RC due to Modeling Bugs § § § 1: drop 1. 1: drop

Only RC due to Modeling Bugs § § § 1: drop 1. 1: drop 2. 05: sample … (and (full ? s) (empty ? s)) § § § 1: recharge 1. 2: recharge … (>= (energy ? x) (* k (capacity ? x)))

Syntactic Sugar for avoiding Errors § Action drop (store) § full(store) == true at

Syntactic Sugar for avoiding Errors § Action drop (store) § full(store) == true at start § full(store) : = false at end § Should be at start § empty(store) : = true at end § Explicit resources § amount(store) : consume 1 § space(store) : produce 1 § Explicit durative change + m. v. fluents § amount(store) == full => empty

Temporal Machine Shop § Benchmarks lack required concurrency § Real world lacks required concurrency?

Temporal Machine Shop § Benchmarks lack required concurrency § Real world lacks required concurrency? § (: durative-action fire-kiln : parameters (? k - kiln) : duration (= ? duration 20) : effect (and (over all (lend (firing ? k))) (over all (–> (ready ? k) true false)) § (: durative-action bake-ceramic : parameters (? p - piece ? k - kiln) : duration (= ? duration (bake-time ? p)) : condition (and (over all (firing ? k)) (over all (shaped ? p))) : effect (over all (–> (baked ? p) false true)))

Real world required concurrency § (and (lifted bowl-left) (lifted bowl-right)) § § Spray-oil (during

Real world required concurrency § (and (lifted bowl-left) (lifted bowl-right)) § § Spray-oil (during milling) Heat-beaker (while adding chemicals) Ventilate-room (while drying glue) …

Lessons for the Competition § Competitors tune for the benchmarks § Most of the

Lessons for the Competition § Competitors tune for the benchmarks § Most of the competitors simplify to TGP § Either required concurrency is important § Benchmarks should test it § Or it isn’t § Language should be inherently sequential § PDDL spec. highlights light-match § RC occurs in the real world § Might need processes, continuous effects

Conclusion § Required Concurrency separates easy and hard temporal planning § The easy case

Conclusion § Required Concurrency separates easy and hard temporal planning § The easy case allows offloading to a scheduler § Still an intriguing problem § Simplify the language – push the classical track § The hard case forces temporal reasoning by the planner § Real world required concurrency is frequent § PDDL 2. 1. 3 was designed for required concurrency § But the benchmarks fell through § Analysis of domains is hard § Automatable? Embeddable within a search? § Domain modeling is very hard § Durative change § Resources When is Temporal Planning Really Temporal? IJCAI 2007 Evaluating Temporal Planning Domains ICAPS 2007 The Perils of Discrete Resource Models ICAPS 2007, IPC workshop