Dana S. Nau University of Maryland 3:10 AM September 12, 2018

Slides:



Advertisements
Similar presentations
Artificial Intelligence 2005/06 Partial Order Planning.
Advertisements

Chapter 5 Plan-Space Planning.
Planning II: Partial Order Planning
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Classical Planning via Plan-space search COMP3431 Malcolm Ryan.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
PLANNING IN AI. Determine the set of steps that are necessary to achieve a goal Some steps might be conditional, i.e., they are only taken when a set.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Chapter 4 - Planning 4.1 State Space Planning 4.2 Partial Order Planning 4.3Planning in the Real World Part II: Methods of AI.
Planning Search vs. planning STRIPS operators Partial-order planning.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Artificial Intelligence Chapter 11: Planning
CS 561, Session Planning Search vs. planning STRIPS operators Partial-order planning.
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
Planning Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
PLANNING Partial order regression planning Temporal representation 1 Deductive planning in Logic Temporal representation 2.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
For Wednesday Read chapter 12, sections 3-5 Program 2 progress due.
Course Overview  What is AI?  What are the Major Challenges?  What are the Main Techniques?  Where are we failing, and why?  Step back and look at.
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:
1 Plan-Space Planning Dr. Héctor Muñoz-Avila Sources: Ch. 5 Appendix A Slides from Dana Nau’s lecture.
1 07. The planning problem 2  Inputs: 1. A description of the world state 2. The goal state description 3. A set of actions  Output: A sequence of actions.
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:
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 07 : Planning.
For Friday Finish Chapter 18 Homework: –Chapter 18, exercises 1-2.
For Monday Read chapter 12, sections 1-2 Homework: –Chapter 10, exercise 3.
Planning, Executing, Sensing, and Replanning for Information Gathering Presented by Hector Gonzalez (Based on slides from Craig Knoblock and L. Joskowicz)
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:
For Friday Finish chapter 10 No homework. Program 2 Any questions?
For Friday No reading Homework: –Chapter 11, exercise 4.
1 Planning Chapter 10 Some material adopted from notes by Tim Finin, Marie desJardins Andreas Geyer-Schulz, and Chuck Dyer.
Planning (Chapter 10)
Lecture 3-1CS251: Intro to AI/Lisp II Planning to Learn, Learning to Plan.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Automated Planning and Decision Making Prof. Ronen Brafman Automated Planning and Decision Making Partial Order Planning Based on slides by: Carmel.
Partial Order Planning 1 Brian C. Williams J/6.834J Sept 16 th, 2002 Slides with help from: Dan Weld Stuart Russell & Peter Norvig.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
Partial Order Plan Execution 1 Brian C. Williams J/6.834J Sept. 16 th, 2002 Slides with help from: Dan Weld Stuart Russell & Peter Norvig.
Problem Reduction So far we have considered search strategies for OR graph. In OR graph, several arcs indicate a variety of ways in which the original.
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:
Consider the task get milk, bananas, and a cordless drill.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
CSE573 Autumn /11/98 Planning Administrative –PS3 due 2/23 –Midterm Friday Last time –regression planning algorithm –introduction to plan-space.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Topic 2: binary Trees COMP2003J: Data Structures and Algorithms 2
Planning (Chapter 10) Slides by Svetlana Lazebnik, 9/2016 with modifications by Mark Hasegawa-Johnson, 9/2017
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
For Wednesday Read Chapter 18, sections 1-3 Homework:
Planning (Chapter 10)
Planning Search vs. planning STRIPS operators Partial-order planning
Planning (Chapter 10)
Dana S. Nau University of Maryland 1:50 AM September 14, 2018
Consider the task get milk, bananas, and a cordless drill
Review for the Midterm Exam
Planning Search vs. planning STRIPS operators Partial-order planning
Planning Search vs. planning STRIPS operators Partial-order planning
AI Planning.
Planning José Luis Ambite.
L11. Planning Agents and STRIPS
Planning Chapter and Chuck Dyer
Dana S. Nau University of Maryland 9:01 AM December 6, 2018
Course Outline Advanced Introduction Expert Systems Topics Problem
Chapter 6 Planning-Graph Techniques
Class #20 – Wednesday, November 5
Announcements Assignment #4 is due tonight. Last lab program is going to be assigned this Wednesday. ◦ A backtracking problem.
Presentation transcript:

Dana S. Nau University of Maryland 3:10 AM September 12, 2018 Lecture slides for Automated Planning: Theory and Practice Chapter 5 Plan-Space Planning Dana S. Nau University of Maryland 3:10 AM September 12, 2018

Motivation Problem with state-space search In some cases we may try many different orderings of the same actions before realizing there is no solution Least-commitment strategy: don’t commit to orderings, instantiations, etc., until necessary dead end … a b c dead end … b a dead end … b a goal b dead end … a c dead end … b c a dead end … c b

Outline Basic idea Open goals Threats The PSP algorithm Long example Comments

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., v1 ≠ v2 or v ≠ c equality constraints (e.g., v1 = v2 or v = c) and/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 bar(y) Precond: p(y) Effects: … x ≠ y foo(x) Precond: … Effects: p(x) p(z) baz(z) Precond: p(z) Effects: … x = z

Flaws: 1. Open Goals Open goal: 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 and/or constrain variable bindings Create a causal link p(z) foo(x) Precond: … Effects: p(x) baz(z) Precond: p(z) Effects: … p(x) foo(x) Precond: … Effects: p(x) baz(z) Precond: p(z) Effects: …

Flaws: 2. Threats Threat: a deleted-condition interaction Action a establishes a precondition (e.g., pq(x)) of action b Another action c is capable of deleting p Resolving the flaw: impose a constraint to prevent c from deleting p Three possibilities: Make b precede c Make c precede a Constrain variable(s) to prevent c from deleting p clobber(y) Precond: … Effects: p(y) p(x) foo(x) Precond: … Effects: p(x) baz(x) Precond: p(x) Effects: …

The PSP Procedure PSP is both sound and complete It returns a partially ordered solution plan Any total ordering of this plan will achieve the goals Or could execute actions in parallel if the environment permits it

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) Start and Finish are dummy actions that we’ll use instead of the initial state and goal

Example (continued) Need to give PSP a plan π as its argument Initial plan: Start, Finish, and an ordering constraint Start At(Home), Sells(HWS,Drill), Sells(SM,Milk), Sells(SM,Bananas) Effects: Precond: Have(Drill) Have(Milk) Have(Bananas) At(Home) Finish

Example (continued) The first three refinement steps These are the only possible ways to establish the Have preconditions Start At(s1) Sells(s1, Drill) At(s2) Sells(s2,Milk) At(s3) Sells(s3,Bananas) Buy(Drill, s1) Buy(Drill, s1) Buy(Milk, SM) Buy(Bananas, SM) Why don’t we use Start to establish At(Home)? Have(Drill) Have(Milk) Have(Bananas) At(Home) Finish

Example (continued) Three more refinement steps The only possible ways to establish the Sells preconditions Start At(HWS) Sells(HWS,Drill) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Bananas) Buy(Drill, HWS) Buy(Drill, s1) Buy(Milk, SM) Buy(Bananas, SM) Have(Drill) Have(Milk) Have(Bananas) At(Home) Finish

Example (continued) Two more refinements: the only ways to establish At(HWS) and At(SM) This time, several threats occur Start At(l2) Go(l2, SM) At(l1) Go(l1,HWS) At(HWS) Sells(HWS,Drill) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Bananas) Buy(Drill, HWS) Buy(Drill, s1) Buy(Milk, SM) Buy(Bananas, SM) Have(Drill) Have(Milk) Have(Bananas) At(Home) Finish

Example (continued) Nondeterministic choice: how to resolve the threat to At(s1)? Our choice: make Buy(Drill) precede Go(l2, SM) This also resolves the other two threats (why?) Start At(l2) Go(l2, SM) At(l1) Go(l1,HWS) At(HWS) Sells(HWS,Drill) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Bananas) Buy(Drill, HWS) Buy(Drill, s1) Buy(Milk, SM) Buy(Bananas, SM) Have(Drill) Have(Milk) Have(Bananas) At(Home) Finish

Example (continued) Nondeterministic choice: how to establish At(l1)? We’ll do it from Start, with l1=Home How else could we have done it? Start At(l2) Go(l2, SM) At(Home) Go(Home,HWS) At(HWS) Sells(HWS,Drill) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Bananas) Buy(Drill, HWS) Buy(Drill, s1) Buy(Milk, SM) Buy(Bananas, SM) Have(Drill) Have(Milk) Have(Bananas) At(Home) Finish

Example (continued) Nondeterministic choice: how to establish At(l2)? We’ll do it from Go(Home,HWS), with l2= HWS Start At(HWS) Go(HWS, SM) At(Home) Go(Home,HWS) At(HWS) Sells(HWS,Drill) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Bananas) Buy(Drill, HWS) Buy(Drill, s1) Buy(Milk, SM) Buy(Bananas, SM) Have(Drill) Have(Milk) Have(Bananas) At(Home) Finish

Example (continued) The only feasible way to establish At(Home) for Finish This creates a bunch of threats Start At(HWS) Go(HWS, SM) At(Home) Go(Home,HWS) At(HWS) Sells(HWS,Drill) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Bananas) Buy(Drill, HWS) Buy(Drill, s1) Buy(Milk, SM) Buy(Bananas, SM) At(l3) Go(l3, Home) Have(Drill) Have(Milk) Have(Bananas) At(Home) Finish

Example (continued) To remove the threats to At(SM) and At(HWS), make them precede Go(l3,Home) This also removes the other threats Start At(HWS) Go(HWS, SM) At(Home) Go(Home,HWS) At(HWS) Sells(HWS,Drill) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Bananas) Buy(Drill, HWS) Buy(Drill, s1) Buy(Milk, SM) Buy(Bananas, SM) At(l3) Go(l3, Home) Have(Drill) Have(Milk) Have(Bananas) At(Home) Finish

Final Plan Establish At(l3) with l3=SM We’re done! Start At(HWS) Go(HWS, SM) At(Home) Go(Home,HWS) At(HWS) Sells(HWS,Drill) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Bananas) Buy(Drill, HWS) Buy(Drill, s1) Buy(Milk, SM) Buy(Bananas, SM) At(SM) Go(SM, Home) Have(Drill) Have(Milk) Have(Bananas) At(Home) Finish

Discussion How to choose which flaw to resolve first and how to resolve it? We’ll return to these questions in Chapter 10 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 Can we prune if we see the same action more than once? No. Sometimes we might need the same action several times in different states of the world Example on next slide Backward state-space search: … act1 act2 goal … act2 act1 act1 act2 act1 … • • •

Example 3-digit binary counter starts at 000, want to get to 111 Plan: s0 = {d3=0, d2=0, d1=0}, i.e., 000 g = {d3=1, d2=1, d1=1}, i.e., 111 Operators to increment the counter by 1: incr-xx0-to-xx1 Precond: d1=0 Effects: d1=1 incr-x01-to-x10 Precond: d2=0, d1=1 Effects: d2=1, d1=0 incr-011-to-100 Precond: d3=0, d2=1, d1=1 Effects: d3=1, d2=0, d1=0 Plan: d3 d2 d1 initial state: 0 0 0 incr-xx0-to-xx1  0 0 1 incr-x01-to-x10  0 1 0 incr-xx0-to-xx1  0 1 1 incr-011-to-100  1 0 0 incr-xx0-to-xx1  1 0 1 incr-x01-to-x10  1 1 0 incr-xx0-to-xx1  1 1 1

A Weak Pruning Technique Can prune all partial plans of n or more actions, where n = |{all possible states}| This doesn’t help very much I’m not sure whether there’s a good pruning technique for plan-space planning