370 likes | 549 Views
Heuristic Planning with Time and Resources. --Sapa, TP4, and others. t s. t s. t s. t e. t e. t e. Quiz1: Expressiveness of Temporal Action. precondition. ZENO TGP TP4 Sapa. effect. Sapa and TP4. Forward chaining. Backward chaining. Sapa and TP4. Forward chaining.
E N D
Heuristic Planning with Time and Resources --Sapa, TP4, and others
ts ts ts te te te Quiz1: Expressiveness of Temporal Action precondition • ZENO • TGP • TP4 • Sapa effect
Sapa and TP4 Forward chaining Backward chaining
Sapa and TP4 Forward chaining Backward chaining
Sapa: search space S = ( P, M, II, Q, t) t: time stamp P: set of predicates that are true P= {(pi, ti)|ti<t}: set of predicates that are true at t and achieved at ti II: set of persistent conditions that need to be protected for a while Q: queue containing scheduled future events M: set of functions representing metric-resources
Theinitial state S0=(P,M,II,Q,t) P= {(pi, ti)|ti<t}: p is true at t and achieved at ti M: metric-resources II: persistent conditions Q: scheduled future events t: time stamp Sapa: Search Space --P= (pi, to), piÎIp --M given resource constraints --Q empty, II empty
Thestate S=(P,M,II,Q,t) entails the goal G if P= {(pi, ti)|ti<t}: p is true at t and achieved at ti M: metric-resources II: persistent conditions Q: scheduled future events t: time stamp Sapa: Search Space --(pi, ti)ÎG, (pi, tj)ÎP, tj<=ti, no event in deletespi -- eÎQ adds piat tj, tj<=ti
Giving S=(P,M,II,Q,t), an action A is applicable in S if: P= {(pi, ti)|ti<t}: p is true at t and achieved at ti M: metric-resources II: persistent conditions Q: scheduled future events t: time stamp Sapa: Action Application -- All instant-pre(A) |= P,M -- eff(A) not interfere with II and Q -- no eÎQ interferes with persistent-pre(A)
Choose an action A applicable in S, if A != no-op S’ = ApplyInstantaneousUpdates ( S, A ) Q’ = AddDelayedEvents ( Q, S, A) Else S’ = S S’.t = eventTime( Front(Q) ) While eventTime(Front(Q)) == S’.t e = Dequeue(Q); S’ = ApplyEffect(S’, e ); Sapa: branching rule
TP4: search space S = ( E, F, t) t: time stamp E: set of predicates that are required to be true F= {(ai, di)}: action ai is planned to start at t- di
The initial state S0=? E={pi}: pi is required to be true at t F= {(ai, di)}: action ai is planned to start at t- di t: time stamp TP4: Search Space S0= (G, NULL) The final state S ? {S= (E, NULL)|EIp}
S=(E,{(aj,dj)},t) A set of actions SE is applicable in S if E={pi}: pi is required to be true at t F= {(ai, di)}: action ai is planned to start at t- di t: time stamp TP4: Action Application -- every action is compatible with each other; --pE, aSE, padd(a), a is compatible with bF
TP4: branching rule Choose a set of actions SE applicable in S, define: Fnew = { (a, dur(a)| aSE } dadv = min{d, a!=no-op} then E’ = {pre(a) | (a,d)ÎFÈFnew} F’ = { (a, d-dadv)| (a,d)ÎFÈFnew, d>dadv} S’ = (E’, F’)
Sapa and TP4 Forward chaining Backward chaining
qpre(a) !qdelayed-effect(b) Quiz 2: Concurrency
Quiz 2: Concurrency qpre(a) !qdelayed-effect(b)
qinstant-effect(a) !qdelayed-effect(b) Quiz 2: Concurrency
qinstant-effect(a) !qdelayed-effect(b) Quiz 2: Concurrency
Sapa and TP4 Forward chaining Backward chaining
Sapa and TP4 Forward chaining Backward chaining
Sapa: Extension? P= {(pi, ti)|ti<t}: p is true at t and achieved at ti M: metric-resources II: persistent conditions Q: scheduled future events t: time stamp All (pre(a), -t1) |= P, M an action A is applicable in S=(P,M,II,Q,t) if: -- All instant-pre(A) |= P,M -- eff(A) not interfere with II and Q -- no eÎQ interferes with persistent-pre(A) II = { (prea, t2 ) }
TP4: Extension? • E={pi}: pi is required to be true at t • F= {(ai, di)}: action ai is planned to start at t- di • t: time stamp A set of actions SE is applicable in S=(E, F, t) if: -- every action is compatible with each other; --pE, aSE, padd(a), a is compatible with bF E={ p| p is true during [t1, t2] }
Sapa and TP4 Forward chaining Backward chaining
Sapa and TP4 Forward chaining Backward chaining
Relaxed temporal planning graph(RTPG) -- no delete list -- no resource consumption Max-span? Min-slack? Max-slack? Sum-slack? Sum-action? Sum-duration? Sapa: Heuristic Function
Sapa: Heuristic Function Max-span? Min-slack? Max-slack?Sum-slack? Sum-action? Sum-duration?
Sapa and TP4 Forward chaining Backward chaining
TP4: Incremental Branching • Estimating the cost of Partial States • Estimate lower bounds on dp • Ordering predicates in a state • -- decreasing order of “difficulty” • Right-shift equivalence • -- if an action was applicable but was not used, then it won’t be used
Sapa and TP4 Forward chaining Backward chaining
Resource Management • Producible • Consumable • Reusable • Shareable • Non-shareable • Limited-capacity
Sapa: resource management • Producable, consumable, non-shareable Sum-action Sum-duration • Shareable ?
TP4: resource management • Reusable & Non-shareable? • Reusable & Limited-capacity? • Consumable & non-producible?
Quiz3: Continuous Change • ZENO? • Sapa? • TGP & TP4?
Experiments performance TGP TP4 Sapa ZENO expressiveness