Chapter 2 Representations for Classical Planning

Slides:



Advertisements
Similar presentations
CSE391 – 2005 NLP 1 Planning The Planning problem Planning with State-space search.
Advertisements

1 Planning Chapter CMSC 471 Adapted from slides by Tim Finin and Marie desJardins. Some material adopted from notes by Andreas Geyer-Schulz,
Hierarchical Task Network (HTN) Planning Hai Hoang 4/17/2007.
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
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.
Time Constraints in Planning Sudhan Kanitkar
Planning Chapter 10.
Planning CSE 473 Chapters 10.3 and 11. © D. Weld, D. Fox 2 Planning Given a logical description of the initial situation, a logical description of the.
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.
1.2 Row Reduction and Echelon Forms
Linear Equations in Linear Algebra
CPSC 322 Introduction to Artificial Intelligence November 19, 2004.
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
Planning Russell and Norvig: Chapter 11. Planning Agent environment agent ? sensors actuators A1A2A3.
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.
Classical Planning via State-space search COMP3431 Malcolm Ryan.
Planning Where states are transparent and actions have preconditions and effects Notes at
State-Space Planning Sources: Ch. 3 Appendix A
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
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.
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:
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)
Introduction to Artificial Intelligence Class 1 Planning & Search Henry Kautz Winter 2007.
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.
Classical Planning Chapter 10 Mausam / Andrey Kolobov (Based on slides of Dan Weld, Marie desJardins)
Alternative Representations Propositions and State-Variables.
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:
1 1.2 Linear Equations in Linear Algebra Row Reduction and Echelon Forms © 2016 Pearson Education, Ltd.
CLASSICAL PLANNING. Outline  The challenges in planning with standard search algorithm  Representing Plans – the PDDL language  Planning as state -
What are they, what do they do and what can I use them for.
Introduction to Logic for Artificial Intelligence Lecture 2
An Introduction to Artificial Intelligence CE 40417
Classical Planning via State-space search
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
Chapter 6 Intermediate-Code Generation
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.
Linear Equations in Linear Algebra
CSE (c) S. Tanimoto, 2002 State-Space Search
Graphplan/ SATPlan Chapter
CS344 : Introduction to Artificial Intelligence
Russell and Norvig: Chapter 11 CS121 – Winter 2003
Graphplan/ SATPlan Chapter
CSE (c) S. Tanimoto, 2004 State-Space Search
Prof. Pushpak Bhattacharyya, IIT Bombay
Linear Equations in Linear Algebra
Presentation transcript:

Chapter 2 Representations for Classical Planning

Quick Review of Classical Planning 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 put take location 1 location 2 location 1 location 2 move2 move1 move2 move1 s3 s2 put take location 1 location 2 location 1 location 2 unload load s4 s5 move2 move1 location 1 location 2 location 1 location 2

Representations: Motivation In most problems, far too many states to try to represent all of them explicitly as s0, s1, s2, … Represent each state as a set of features e.g., a vector of values for a set of variables a set of ground atoms in some first-order language L Define a set of operators that can be used to compute state-transitions Don’t give all of the states explicitly Just give the initial state Use the operators to generate the other states as needed

Outline Representation schemes Classical representation Set-theoretic representation State-variable representation Examples: DWR and the Blocks World Comparisons

Classical Representation Start with a function-free first-order language 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) Substitution:  = {x1  v1, x2  v2, …, xn  vn} Each xi is a variable symbol; each vi is a term Instance of e: result of applying a substitution  to e Replace variables of e simultaneously State: a set s of ground atoms The atoms represent the things that are true in one of ’s states Only finitely many ground atoms, so only finitely many possible states

Example of a State

Operators Operator: a triple o=(name(o), precond(o), effects(o)) name(o) is a syntactic expression of the form n(x1,…,xk) n: operator symbol - must be unique for each operator x1,…,xk: variable symbols (parameters) must include every variable symbol in o precond(o): preconditions literals that must be true in order to use the operator effects(o): effects literals the operator will make true

Actions Action: ground instance (via substitution) of an operator

Notation Let S be a set of literals. Then S+ = {atoms that appear positively in S} S– = {atoms that appear negatively in S} More specifically, let a be an operator or action. Then precond+(a) = {atoms that appear positively in a’s preconditions} precond–(a) = {atoms that appear negatively in a’s preconditions} effects+(a) = {atoms that appear positively in a’s effects} effects–(a) = {atoms that appear negatively in a’s effects} 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)}

Applicability An action a is applicable to a state s if s satisfies precond(a), i.e., if precond+(a)  s and precond–(a)  s =  Here are an action and a state that it’s applicable to:

Result of Performing an Action If a is applicable to s, the result of performing it is (s,a) = (s – effects–(a))  effects+(a)) Delete the negative effects, and add the positive ones

Planning domain: language plus operators Corresponds to a set of state-transition systems Example: operators for the DWR domain

Planning Problems Given a planning domain (language L, operators O) Statement of a planning problem: a triple P=(O,s0,g) O is the collection of operators s0 is a state (the initial state) g is a set of literals (the goal formula) The actual planning problem: P = (,s0,Sg) s0 and Sg 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 “planning problem” often means the statement of the problem

Plans and Solutions Plan: any sequence of actions  = a1, a2, …, an such that each ai is a ground instance of an operator in O The plan is a solution for P=(O,s0,g) if it is executable and achieves g i.e., if there are states s0, s1, …, sn such that  (s0,a1) = s1  (s1,a2) = s2 …  (sn–1,an) = sn sn satisfies g

Example g1={loaded(r1,c3), at(r1,loc2)} Let P1 = (O, s1, g1), where O is the set of operators given earlier

Example (continued) Here are three solutions for P1: 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) Each of them produces the state shown here:

Example (continued) 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) The 2nd and 3rd are irredundant and shortest

Set-Theoretic Representation Like classical representation, but restricted to propositional logic States: 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, …}

Instead of operators like this one, take all of the operator instances, e.g., this one, and rewrite ground atoms as propositions 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

Comparison A set-theoretic representation is equivalent to a classical representation in which all of the atoms are ground Exponential blowup If a classical operator contains k atoms and each atom has arity n, then it corresponds to cnk actions where c = |{constant symbols}|

An example Suppose a computer has a n-bit register r and a single operator inc that assigns r  r + 1 mod m, where m = 2n Let L = { val0, …, valm-1}, where vali means “r contains value i”  = (S, A, ), where s  L, A = {inc}, (vali, inc) = vali+1 mod m Suppose P = (, s0, g), where s0 = valc, Sg = {vali| i is prime} There is no set-theoretic action representation for inc, nor any set of proposition g  2L that represents the set of goal states Sg

An Example (Cont.) However, we can define ’ and P’ as follows: L’ = L  {prime}, S’ = 2L’, A’ = { inc0, …, incm-1} ’(vali, inc) = {prime, vali+1 mod m} if i + 1 mod m is prime, or = {vali+1 mod m}, otherwise ’ = (S’, A’, ’), S’g = {s  2L’ | prime  s}, P’ = (’, s0, S’g) P’ has the following set-teoretic representation: g’ = {prime} precond(inci) = {vali}, i = 1, …, m effect-(inci) = {vali, prime}, if i is prime, or = {vali}, otherwise effect+(inci) = {vali+1 mod m, prime}, if i + 1 mod m is prime, or = {vali+1 mod m}, otherwise There are 2n different actions , and to write them, we must compute all prime numbers between 1 and 2n

State-Variable Representation Use ground atoms for properties that do not change, e.g., adjacent(loc1,loc2) For properties that can change, assign values to state variables Like fields in a record structure Classical and state-variable representations take similar amounts of space Each can be translated into the other in low-order polynomial time {top(p1)=c3, cpos(c3)=c1, cpos(c1)=pallet, holding(crane1)=nil, rloc(r1)=loc2, loaded(r1)=nil, …}

Example: The Blocks World Infinitely wide table, finite number of children’s blocks Ignore where a block is located on the table A block can sit on the table or on another block Want to move blocks from one configuration to another e.g., initial state goal Classical, set-theoretic, and state-variable formulations: For the case where there are five blocks a d b c c a b e

Classical Representation: Symbols Constant symbols: The blocks: a, b, c, d, e Predicates: ontable(x) - block x is on the table on(x,y) - block x is on block y clear(x) - block x has nothing on it holding(x) - the robot hand is holding block x handempty - the robot hand isn’t holding anything d c a b e

Classical Operators c a b 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 c a b c a b c b a c a b

Set-Theoretic Representation: Symbols For five blocks, there are 36 propositions 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 d c a b e

Set-Theoretic Actions b 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 Fifty different actions Here are four of them: c a b c a b c b a c a b

State-Variable Representation: Symbols Constant symbols: a, b, c, d, e of type block 0, 1, table, nil of type other State variables: pos(x) = y if 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 d c a b e

State-Variable Operators c a b unstack(x : block, y : block) Precond: pos(x)=y, 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(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 a b c a b c b a c a b

Expressive Power Any problem that can be represented in one representation can also be represented in the other two Can convert in linear time and space, except when converting to set-theoretic (where we get an exponential blowup) P(x1,…,xn) becomes fP(x1,…,xn)=1 trivial Set-theoretic representation Classical representation State-variable representation write all of the ground instances f(x1,…,xn)=y becomes Pf(x1,…,xn,y)

Comparison Classical representation The most popular for classical planning, partly for historical reasons Set-theoretic representation Can take much more space than classical representation Useful in algorithms that manipulate ground atoms directly e.g., planning graphs (Chapter 6), satisfiability (Chapters 7) State-variable representation Equivalent to classical representation Less natural for logicians, more natural for engineers Useful in non-classical planning problems as a way to handle numbers, functions, time