Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:

Slides:



Advertisements
Similar presentations
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Advertisements

CLASSICAL PLANNING What is planning ?  Planning is an AI approach to control  It is deliberation about actions  Key ideas  We have a model of the.
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:
Situation Calculus for Action Descriptions We talked about STRIPS representations for actions. Another common representation is called the Situation Calculus.
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:
Planning Chapter 10.
Planning Planning is fundamental to “intelligent” behaviour. E.g.
All rights reserved ©L. Manevitz Lecture 61 Artificial Intelligence Planning System L. Manevitz.
Planning Russell and Norvig: Chapter 11 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2003/ home.htm.
Artificial Intelligence II S. Russell and P. Norvig Artificial Intelligence: A Modern Approach Chapter 11: Planning.
1 Chapter 4 State-Space Planning. 2 Motivation Nearly all planning procedures are search procedures Different planning procedures have different search.
1 Classical STRIPS Planning Alan Fern * * Based in part on slides by Daniel Weld.
Automated Planning Introduction and Overview. Automated Planning: Introduction and Overview 2 Literature Malik Ghallab, Dana Nau, and Paolo Traverso.
CPSC 322 Introduction to Artificial Intelligence November 19, 2004.
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
Planning Russell and Norvig: Chapter 11. Planning Agent environment agent ? sensors actuators A1A2A3.
1 Lecture 12 example (from slides prepared by Prof. J. Rosenchein)
Planning Where states are transparent and actions have preconditions and effects Notes at
Intro to AI Fall 2002 © L. Joskowicz 1 Introduction to Artificial Intelligence LECTURE 12: Planning Motivation Search, theorem proving, and planning Situation.
1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.
1 Action Planning (Where logic-based representation of knowledge makes search problems more interesting) R&N: Chap. 11, Sect. 11.1–4.
Planning Where states are transparent and actions have preconditions and effects Notes at
AI Principles, Lecture on Planning Planning Jeremy Wyatt.
PLANNING Partial order regression planning Temporal representation 1 Deductive planning in Logic Temporal representation 2.
Classical Planning Chapter 10.
State-Space Planning Sources: Ch. 3 Appendix A
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.
Complexity of Classical Planning Megan Smith Lehigh University CSE 497, Spring 2007.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
April 3, 2006AI: Chapter 11: Planning1 Artificial Intelligence Chapter 11: Planning Michael Scherger Department of Computer Science Kent State University.
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:
Automated Planning Introduction and Overview. Automated Planning: Introduction and Overview 2 Literature Malik Ghallab, Dana Nau, and Paolo Traverso.
DECIDABILITY OF PRESBURGER ARITHMETIC USING FINITE AUTOMATA Presented by : Shubha Jain Reference : Paper by Alexandre Boudet and Hubert Comon.
State-Space Search and the STRIPS Planner Searching for a Path through a Graph of Nodes Representing World States.
ARTIFICIAL INTELLIGENCE Lecture 3 Predicate Calculus.
1.  Provides the ability to access individual assertions. e.g. in Predicate calculus we may say: P denotes “It rained on Tuesday” but in predicate calculus.
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:
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Simultaneously Learning and Filtering Juan F. Mancilla-Caceres CS498EA - Fall 2011 Some slides from Connecting Learning and Logic, Eyal Amir 2006.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Automated Planning Dr. Héctor Muñoz-Avila. What is Planning? Classical Definition Domain Independent: symbolic descriptions of the problems and the domain.
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)
1 Chapter 3 Complexity of Classical Planning. 2 Review: Classical Representation Function-free first-order language L Statement of a classical planning.
1/16 Planning Chapter 11- Part1 Author: Vali Derhami.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
1 First order theories (Chapter 1, Sections 1.4 – 1.5) From the slides for the book “Decision procedures” by D.Kroening and O.Strichman.
Alternative Representations Propositions and State-Variables.
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:
CS621: Artificial Intelligence Pushpak Bhattacharyya Computer Science and Engineering Department IIT Bombay Lecture 19: Hidden Markov Models.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
CLASSICAL PLANNING. Outline  The challenges in planning with standard search algorithm  Representing Plans – the PDDL language  Planning as state -
Planning as model checking, (OBDDs)
Combined Lecture CS621: Artificial Intelligence (lecture 19) CS626/449: Speech-NLP-Web/Topics-in-AI (lecture 20) Hidden Markov Models Pushpak Bhattacharyya.
Introduction Contents Sungwook Yoon, Postdoctoral Research Associate
CS344 : Introduction to Artificial Intelligence
Warning I estimate 3 weeks of intensive reading for you to understand your assigned topic These are not self contained and you will need to understand.
Dana S. Nau University of Maryland 9:01 AM December 6, 2018
CS344 : Introduction to Artificial Intelligence
Chapter 2 Representations for Classical Planning
Russell and Norvig: Chapter 11 CS121 – Winter 2003
Prof. Pushpak Bhattacharyya, IIT Bombay
Presentation transcript:

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 1 Chapter 2 Representations for Classical Planning Dana S. Nau CMSC 722, AI Planning University of Maryland, Fall 2004 Lecture slides for Automated Planning: Theory and Practice

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 2 location 1 location 2 location 1 location 2 s1s1 s3s3 s4s4 take put location 1 location 2 location 1 location 2 s0s0 s2s2 s5s5 move1 put take move1 move2 load unload Quick Review of Classical Planning move2 l Classical planning requires all eight of the restrictive assumptions: A0: Finite A1: Fully observable A2: Deterministic A3: Static A4: Attainment goals A5: Sequential plans A6: Implicit time A7: Offline planning location 1 location 2 location 1 location 2

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 3 Representations: Motivation l In most problems, far too many states to try to represent all of them explicitly as s 0, s 1, s 2, … l Represent each state as a set of features u e.g., »a vector of values for a set of variables »a set of ground atoms in some first-order language L l Define a set of operators that can be used to compute state- transitions l Don’t give all of the states explicitly u Just give the initial state u Use the operators to generate the other states as needed

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 4 Outline l Representation schemes u Classical representation u Set-theoretic representation u State-variable representation u Examples: DWR and the Blocks World u Comparisons

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 5 Classical Representation l Start with a function-free first-order language u Finitely many predicate symbols and constant symbols, but no function symbols  Atom: predicate symbol and args - e.g., on(c1,c3), on(c1, x )  Ground expression: contains no variable symbols - e.g., on(c1,c3)  Unground expression: at least one variable symbol - e.g., on(c1, x ) u Substitution:  = {x 1  v 1, x 2  v 2, …, x n  v n } »Each x i is a variable symbol; each v i is a term u Instance of e: result of applying a substitution  to e »Replace variables of e simultaneously, not sequentially l State: a set s of ground atoms u The atoms represent the things that are true in one of  ’s states u Only finitely many ground atoms, so only finitely many possible states

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 6 Example of a State

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 7 Operators l Operator: a triple o=(name(o), precond(o), effects(o)) u name(o) is a syntactic expression of the form n(x 1,…,x k ) »n: operator symbol - must be unique for each operator »x 1,…,x k : variable symbols (parameters) must include every variable symbol in o u precond(o): preconditions »literals that must be true in order to use the operator u effects(o): effects »literals the operator will make true

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 8 Actions l Action: ground instance (via substitution) of an operator

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 9 Notation l Let S be a set of literals. Then u S + = {atoms that appear positively in S} u S – = {atoms that appear negatively in S} l More specifically, let a be an operator or action. Then u precond + (a) = {atoms that appear positively in a} u precond – (a) = {atoms that appear negatively in a} u effects + (a) = {atoms that appear positively in a} u effects – (a) = {atoms that appear negatively in a}  effects + ( take (k,l,c,d,p) = { holding (k,c), top (d,p)}  effects – ( take (k,l,c,d,p) = { empty (k), in (c,p), top (c,p), on (c,d)}

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 10 Applicability l An action a is applicable to a state s if s satisfies precond(a), u i.e., if precond + (a)  s and precond – (a)  s =  l Here are an action and a state that it’s applicable to:

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 11 Result of Performing an Action l If a is applicable to s, the result of performing it is  (s,a) = (s – effects – (a))  effects + (a) u Delete the negative effects, and add the positive ones

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 12 l Planning domain: language plus operators u Corresponds to a set of state-transition systems u Example: operators for the DWR domain

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 13 Planning Problems l Given a planning domain (language L, operators O) u Statement of a planning problem: a triple P=(O,s 0,g) » O is the collection of operators » s 0 is a state (the initial state) » g is a set of literals (the goal formula)  The actual planning problem: P = ( ,s 0,S g ) » s 0 and S g are as above »  = (S,A,  ) is a state-transition system » S = {all sets of ground atoms in L} » A = {all ground instances of operators in O} »  = the state-transition function determined by the operators l I’ll often say “planning problem” when I mean the statement of the problem

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 14 Plans and Solutions l Plan: any sequence of actions  =  a 1, a 2, …, a n  such that each a i is a ground instance of an operator in O l The plan is a solution for P=(O,s 0,g) if it is executable and achieves g u i.e., if there are states s 0, s 1, …, s n 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

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 15 Example l Let P 1 = (O, s 1, g 1 ), where u O is the set of operators given earlier u s 1 is as shown:  g 1 ={ loaded(r1,c3), at(r1,loc2) }

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 16 Example (continued) l Here are three solutions for P:   take(crane1,loc1,c3,c1,p1), move(r1,loc2,loc1), move(r1,loc1,loc2), move(r1,loc2,loc1), load(crane1,loc1,c3,r1), move(r1,loc1,loc2)    take(crane1,loc1,c3,c1,p1), move(r1,loc2,loc1), load(crane1,loc1,c3,r1), move(r1,loc1,loc2)    move(r1,loc2,loc1), take(crane1,loc1,c3,c1,p1), load(crane1,loc1,c3,r1), move(r1,loc1,loc2)  l Each of them produces the state shown:

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 17 Example (continued) l The first is redundant: can remove actions and still have a solution   take(crane1,loc1,c3,c1,p1), move(r1,loc2,loc1), move(r1,loc1,loc2), move(r1,loc2,loc1), load(crane1,loc1,c3,r1), move(r1,loc1,loc2)    take(crane1,loc1,c3,c1,p1), move(r1,loc2,loc1), load(crane1,loc1,c3,r1), move(r1,loc1,loc2)    move(r1,loc2,loc1), take(crane1,loc1,c3,c1,p1), load(crane1,loc1,c3,r1), move(r1,loc1,loc2)  l The 2nd and 3rd are irredundant and shortest

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 18 Set-Theoretic Representation l Like classical representation, but restricted to propositional logic l States: u Instead of a collection of ground atoms … {on(c1,pallet), on(c1,r1), on(c1,c2), …, at(r1,l1), at(r1,l2), …} … use a collection of propositions (boolean variables): {on-c1-pallet, on-c1-r1, on-c1-c2, …, at-r1-l1, at-r1-l2, …}

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 19 Set-Theoretic Representation l Instead of an operator like this one, … there are lots of actions like this one l Exponential blowup u If a classical operator contains n atoms and each atom has arity k, then it corresponds to c nk actions where c = |{constant symbols}| take-crane1-loc1-c3-c1-p1 precond : belong-crane1-loc1, attached-p1-loc1, empty-crane1, top-c3-p1, on-c3-c1 delete : empty-crane1, in-c3-p1, top-c3-p1, on-c3-p1 add : holding-crane1-c3, top-c1-p1

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 20 l A state variable is like a field in a record structure { top(p1)=c3, cpos(c3)=c1, cpos(c1)=pallet, …} l Classical and state-variable representations take similar amounts of space u Each can be translated into the other in low-order polynomial time State-Variable Representation

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 21 Example: The Blocks World l Infinitely wide table, finite number of children’s blocks l Ignore where a block is located on the table l A block can sit on the table or on another block l Want to move blocks from one configuration to another u e.g., initial state goal l Can be expressed as a special case of DWR u But the usual formulation is simpler l I’ll give classical, set-theoretic, and state-variable formulations u For the case where there are five blocks c a b c ab e d

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 22 Classical Representation: Symbols l Constant symbols:  The blocks: a, b, c, d, e l Predicates: u ontable(x)- block x is on the table u on(x,y)- block x is on block y u clear(x)- block x has nothing on it u holding(x)- the robot hand is holding block x u handempty- the robot hand isn’t holding anything c ab e d

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 23 unstack(x,y) Precond: on(x,y), clear(x), handempty Effects: ~on(x,y), ~clear(x), ~handempty, holding(x), clear(y) stack(x,y) Precond: holding(x), clear(y) Effects: ~holding(x), ~clear(y), on(x,y), clear(x), handempty pickup(x) Precond: ontable(x), clear(x), handempty Effects: ~ontable(x), ~clear(x), ~handempty, holding(x) putdown(x) Precond: holding(x) Effects: ~holding(x), ontable(x), clear(x), handempty Classical Operators c ab c ab c ab c a b c ab

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 24 l For five blocks, there are 36 propositions l Here are 5 of them: ontable-a - block a is on the table on-c-a - block c is on block a clear-c - block c has nothing on it holding-d - the robot hand is holding block d handempty - the robot hand isn’t holding anything c ab d e Set-Theoretic Representation: Symbols

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 25 Set-Theoretic Actions Fifty different actions Here are four of them: unstack-c-a Pre:on-c,a, clear-c, handempty Del:on-c,a, clear-c, handempty Add:holding-c, clear-a stack-c-a Pre:holding-c, clear-a Del:holding-c, ~clear-a Add:on-c-a, clear-c, handempty pickup-c Pre:ontable-c, clear-c, handempty Del:ontable-c, clear-c, handempty Add:holding-c putdown-c Pre:holding-c Del:holding-c Add:ontable-c, clear-c, handempty c ab c ab c ab c a b c ab

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 26 l Constant symbols: a, b, c, d, e of type block 0, 1, table, nil of type other l State variables: pos(x) = yif block x is on block y pos(x) = table if block x is on the table pos(x) = nil if block x is being held clear(x) = 1 if block x has nothing on it clear(x) = 0 if block x is being held or has another block on it holding = x if the robot hand is holding block x holding = nil if the robot hand is holding nothing c ab e d State-Variable Representation: Symbols

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 27 State-Variable Operators unstack(x : block, y : block) Precond: pos(x)=y, clear(y)=0, clear(x)=1, holding=nil Effects: pos(x)=nil, clear(x)=0, holding=x, clear(y)=1 stack(x : block, y : block) Precond: holding=x, clear(x)=0, clear(y)=1 Effects: holding=nil, clear(y)=0, pos(x)=y, clear(x)=1 pickup(x : block) Precond: pos(x)=table, clear(x)=1, holding=nil Effects: pos(x)=nil, clear(x)=0, holding=x putdown(x : block) Precond: holding=x Effects: holding=nil, pos(x)=table, clear(x)=1 c ab c ab c ab c a b c ab

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 28 Expressive Power l Any problem that can be represented in one representation can also be represented in the other two l Can convert in linear time and space, except for the following: u Converting to set-theoretic from either of the others can incur exponential blowup Classical representation State-variable representation Set-theoretic representation trivial P(x 1,…,x n ) becomes f P (x 1,…,x n )=1 write all of the ground instances f(x 1,…,x n )=y becomes P f (x 1,…,x n,y)

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: 29 Comparison l Classical representation u The most popular for classical planning, partly for historical reasons l Set-theoretic representation u Can take much more space than classical representation u Useful in algorithms that manipulate ground atoms directly »e.g., planning graphs (Chapter 6), satisfiability (Chapters 7) u Useful for certain kinds of theoretical studies l State-variable representation u Equivalent to classical representation u Less natural for logicians, more natural for engineers u Useful in non-classical planning problems as a way to handle numbers, functions, time