Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Plan-Space Planning Dr. Héctor Muñoz-Avila Sources: Ch. 5 Appendix A Slides from Dana Nau’s lecture.

Similar presentations


Presentation on theme: "1 Plan-Space Planning Dr. Héctor Muñoz-Avila Sources: Ch. 5 Appendix A Slides from Dana Nau’s lecture."— Presentation transcript:

1 1 Plan-Space Planning Dr. Héctor Muñoz-Avila Sources: Ch. 5 Appendix A Slides from Dana Nau’s lecture

2 2 Domains for Evaluations http://members.deri.at/~joergh/ff-domains.html Choose one of the following:  Assembly  Freecell  Fridge  Logistics  Miconic-STRIPS  Schedule  Tyreworld E-mail me your choice. First take, first get. You may need to adapt domain to run in a system. You need 30 problems.  Create them manually, or  Use a random problem generator (yours or create one)  Problems must scale: 4 goals, 5 goals, …, 9 goals (5 problems each)

3 3 Remember the Sussman Anomaly? Initial stategoal A set of goals G is serializable if:  An ordering g 1, …, g n of the goals in G can be found such as: »Every plan P 1 satisfying g 1, can be extended to a plan P 2 satisfying g 1 and g 2, and so forth Extend means that neither constraints nor steps in P 1 need to be removed to obtain P 2 Problem: Goals in the Sussman Anomaly are not serializable This is not an exception. Goals for many problems are not serializable c ab c a b

4 4 Plan-Space Planning Initial plan complete plan for goals Search is performed in the plan space Plan space V: set of plans E: plan refinement transitions As before: computed graph is a subset of plan space Remember the number of states for DWR states? Least commitment: Does not commit on action ordering

5 5 Plan-Space Planning - Basic Idea Backward search from the goal Each node of the search space is a partial plan »A set of partially-instantiated actions »A set of constraints  Make more and more refinements, until we have a solution Types of constraints:  precedence constraint: a must precede b  binding constraints: »inequality constraints, e.g., v 1 ≠ v 2 or v ≠ c »equality constraints (e.g., v 1 = v 2 or v = c) or substitutions  causal link: »use action a to establish the precondition p needed by action b How to tell we have a solution: no more flaws in the plan  Will discuss flaws and how to resolve them  A partial plan is complete if plan has no flaws a(x) Precond: … Effects: p(x) b(y) Precond:  p(y) Effects: … c(x) Precond: p(x) Effects: … p(x) x ≠ y Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/ Can this link be made?

6 6 Flaw:  An action a has a precondition p that we haven’t decided how to establish Resolving the flaw:  Find an action b (either already in the plan, or insert it)  that can be used to establish p can precede a and produce p  Instantiate variables  Create a causal link a(y) Precond: … Effects: p(y) c(x) Precond: p(x) Effects: … a(x) Precond: … Effects: p(x) c(x) Precond: p(x) Effects: … p(x) Open Goal Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

7 7 Threat Flaw: a deleted-condition interaction  Action a establishes a condition (e.g., p(x)) for action b  Another action c is capable of deleting this condition p(x) »And action c is “parallel” to the causal link Resolving the flaw:  impose a constraint to prevent c from deleting p(x) Three possibilities:  Make b precede c  Make c precede a  Constrain variable(s) to prevent c from deleting p(x) a(x) Precond: … Effects: p(x) c(y) Precond: … Effects:  p(y) b(x) Precond: p(x) Effects: … p(x)

8 8 The PSP Procedure PSP is both sound and complete  See next slide Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

9 9 Solution: A Complete Partial Plan Plan: any sequence of actions  =  a 1, a 2, …, a n  such that each ai is a ground instance of an operator in O The plan is a solution for P=(O,s 0,g) if it is executable and achieves g  i.e., if there are states s0, s1, …, sn such that »  (s 0,a 1 ) = s 1 »  (s 1,a 2 ) = s 2 »… »  (s n–1,a n ) = s n »s n satisfies g But in PSP returns a “complete partial plan”. Is this a solution in terms of the definition of plans above?

10 10 Example Similar (but not identical) to an example in Russell and Norvig’s Artificial Intelligence: A Modern Approach (1st edition) Operators:  Start Precond: none Effects: At(Home), sells(HWS,Drill), Sells(SM,Milk), Sells(SM,Banana)  Finish Precond: Have(Drill), Have(Milk), Have(Banana), At(Home)  Go(l,m) Precond: At(l) Effects: At(m),  At(l)  Buy(p,s) Precond: At(s), Sells(s,p) Effects: Have(p) Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

11 11 Example (continued) Initial plan Sells(SM,Milk), Sells(SM,Bananas) At(Home), Sells(HWS,Drill), Have(Bananas), At(Home) Have(Drill), Have(Milk), Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

12 12 Example (continued) The only possible ways to establish the “Have” preconditions At(s 1 ), Sells(s 1,Drill) At(s 2 ), Sells(s 2,Milk)At(s 3 ), Sells(s 3,Bananas) Buy(Drill, s 1 ) Buy(Milk, s 2 ) Buy(Bananas, s 2 ) Have(Drill), Have(Milk), Have(Bananas), At(Home) Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/ “standardization”

13 13 Example (continued) The only possible way to establish the “Sells” preconditions Buy(Drill,HWS) Buy(Milk,SM) Buy(Bananas,SM) At(SM), Sells(SM,Milk) At(HWS), Sells(HWS,Drill)At(SM), Sells(SM,Bananas) Have(Drill), Have(Milk), Have(Bananas), At(Home) Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

14 14 At(SM), Sells(SM,Milk) At(HWS), Sells(HWS,Drill) At(SM), Sells(SM,Bananas) At(x) Buy(Milk,SM)Buy(Bananas,SM) At(l 2 ) Go(l 2, SM) At(l 1 ) Go(l 1,HWS) Buy(Drill,HWS) Have(Drill), Have(Milk), Have(Bananas), At(Home) Example (continued) The only ways to establish At(HWS) and At(SM)  Let us enumerate threats How can we solve all these threats in one step? Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

15 15 To resolve the third threat, make Buy(Drill) precede Go(SM)  This resolves all three threats Example (continued) At(SM), Sells(SM,Milk) At(HWS), Sells(HWS,Drill) At(SM), Sells(SM,Bananas) At(x) Buy(Milk,SM)Buy(Bananas,SM) At(l 2 ) Go(l 2, SM) At(l 1 ) Go(l 1,HWS) Buy(Drill,HWS) Have(Drill), Have(Milk), Have(Bananas), At(Home) Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

16 16 Example (continued) Establish At(l 1 ) with l 1 =Home At(SM), Sells(SM,Milk) At(HWS), Sells(HWS,Drill) At(SM), Sells(SM,Bananas) At(x) Buy(Milk,SM)Buy(Bananas,SM) At(l 2 ) Go(l 2, SM) At(Home) Go(Home,HWS) Buy(Drill,HWS) Have(Drill), Have(Milk), Have(Bananas), At(Home) Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

17 17 Example (continued) Establish At(l 2 ) with l 2 =HWS Buy(Milk,SM)Buy(Bananas,SM) At(x) At(HWS) Go(HWS,SM) At(Home) Go(Home,HWS) At(SM), Sells(SM,Milk) At(HWS), Sells(HWS,Drill) At(SM), Sells(SM,Bananas) Buy(Drill,HWS) Have(Drill), Have(Milk), Have(Bananas), At(Home) Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

18 18 Example (continued) Establish At(Home) for Finish Buy(Milk,SM)Buy(Bananas,SM) At(x) At(HWS) Go(HWS,SM) At(Home) Go(Home,HWS) At(SM), Sells(SM,Milk) At(HWS), Sells(HWS,Drill) At(SM), Sells(SM,Bananas) Buy(Drill,HWS) Have(Drill), Have(Milk), Have(Bananas), At(Home) At(l 3 ) Go(l 3, Home) Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

19 19 Example (continued) Constrain Go(Home) to remove threats to At(SM) Buy(Milk,SM)Buy(Bananas,SM) At(x) At(HWS) Go(HWS,SM) At(Home) Go(Home,HWS) At(SM), Sells(SM,Milk) At(HWS), Sells(HWS,Drill) At(SM), Sells(SM,Bananas) Buy(Drill,HWS) Have(Drill), Have(Milk), Have(Bananas), At(Home) At(l 3 ) Go(l 3, Home) Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

20 20 Complete Partial Plan Establish At(l 3 ) with l 3 =SM Buy(Milk,SM)Buy(Bananas,SM) At(x) At(HWS) At(Home) Go(Home,HWS) At(SM), Sells(SM,Milk) At(HWS), Sells(HWS,Drill) At(SM), Sells(SM,Bananas) Buy(Drill,HWS) Have(Drill), Have(Milk), Have(Bananas), At(Home) At(SM) Go(SM,Home) Go(HWS,SM) Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

21 21 Comments PSP doesn’t commit to orderings and instantiations until necessary  Avoids generating search trees like this one: Problem: how to prune infinitely long paths?  Loop detection is based on recognizing states we’ve seen before  In a partially ordered plan, we don’t know the states »Computing an state is NP complete Can we prune if we see the same action more than once? a b c b a b a b a c b c a c b goal go(b,a)go(a,b) go(b,a)at(a) No. Sometimes we might need the same action several times in different states of the world (see next slide)

22 22 Example 3-digit binary counter starts at 000, want to get to 110 s 0 = {d 3 =0, d 2 =0, d 1 =0} g = {d 3 =1, d 2 =1, d 1 =0} Operators to increment the counter by 1: incr0 Precond: d 1 =0 Effects: d 1 =1 incr01 Precond: d 2 =0, d 1 =1 Effects: d 2 =1, d 1 =0 incr011 Precond: d 3 =0, d 2 =1, d 1 =1 Effects: d 3 =1, d 2 =0, d 1 =0 Veloso call this “linkiability”

23 23 Comments (II) Note a potential combinatorial problem when solving threats  Can someone explain? Why does PSP solves the Sussman Anomaly? Heuristics for PSP might be harder to formulate than with state space planning  Why? Universal Classical Planning  Combines state-space and plan-space planning in an unified framework

24 24 Reminder: STRIPS and the Sussman Anomaly C AB BC A Pick up B Put B on C Pick up C Pick up A Put C on table Put A on B C A B c ab c a b

25 25 POP and the Sussman Anomaly C AB B A Pick up B Put B on C Pick up C Pick up A Put C on table Put A on B C B c ab c a b Can we sort these steps to achieve these two goals?


Download ppt "1 Plan-Space Planning Dr. Héctor Muñoz-Avila Sources: Ch. 5 Appendix A Slides from Dana Nau’s lecture."

Similar presentations


Ads by Google