SlideShare a Scribd company logo
CS 221: Artificial Intelligence Planning (and Basic Logic) Peter Norvig and Sebastian Thrun Slide credits: Stuart Russell, Rina Dechter,  Rao Kambhampati
AI: Dealing with Complexity Agent Design Reflex➔Memory-Based Reflex➔Goal-Based➔Utility-Based Environment ➔ Partially Observable, Stochastic, Dynamic, Multi-agent, Adversarial Representation Atomic➔Factored➔Structured
Finding Actions
What’s wrong with Problem-Solving Plan: [Forward, Forward, Forward, …]
What’s wrong with Problem-Solving
Planning A plan is a  program Not just a straight-line sequence of actions Planning and acting can be  interleaved Closed loop, not closed eyes Representation is more flexible Can deal with partially-described states Can deal with features, objects, relations Can be hierarchical
Dealing with Partial Observability: World vs. Belief States
Sensorless – Belief States - Conformant Plans
Deterministic world Slippery wheels  Partial (local) Observability and Stochastic Worlds Deterministic actions; observe only local square Observe only  local square; Suck  is determ. R/L  are stoch. (may fail to move)
Slippery wheels  Planning and Sensing in  Partially Observable and Stochastic World What is a plan to achieve all states clean? [1: Suck ; 2: Right ; ( if  A :  goto  2); 3: Suck ] also written as [ Suck ; ( while  A :  Right );  Suck ] Observe only  local square; Suck  is determ. R/L  are stoch.; may fail to move
Search Graph as And/Or Tree What do we need to  guarantee success? What kind of guarantee?
As Equations, not Tree b  is a belief state: a set of states o  is an observation; a percept a  is an action b’  = UPDATE(PREDICT( b, a )  , o )
Kindergarten world: dirt may appear anywhere at any time, But actions are guaranteed to work. b1  b3 =UPDATE( b1 ,[ A,Clean ])  b5  = UPDATE( b4,… )  b2 =PREDICT( b1, Suck )  b4 =PREDICT( b3 , Right )
State Representation
State Representation Bayes Nets? Factored SQL data base? One table: Factored;  Several: Structured Java program? Structured
Representation Atomic Representation s 1  = s 2 ; Result( s, a ) =  s ′; GoalTest( s );  Factored Representation Attribute( s ) =  val …  ( val  numeric or Boolean) Result and GoalTest in terms of attributes Structured Representation All of above Relations, Functions: Rel( a ,  b ,  c ); F( a ,  b ) =  c Objects; with Quantifiers  (for all ∀x, there exists ∃y)
Planning with Factored States World is made up of states which are defined in terms of state variables Can be Boolean or categorical or continuous Where have we used this before? State:  complete assignment over state variables   So,  k  Boolean state variables represent how many states? Actions change the values of the state variables Applicability conditions of actions are also specified in terms of partial assignments over state variables
“ Classical” Planning State : conjunction of Boolean state variables Action Schema : Action ( Fly ( p, from, to ),   Precond:  At ( p ,  from ) ∧  Plane ( p )    ∧  Airport ( from ) ∧  Airport ( to ) Effect: ¬ At ( p ,  from ) ∧  At ( p ,  to )) Implicitly defines  Actions ( s )   and  Result ( s, a )
Expressiveness of the language
Advantages of the Language Natural to read, write, verify Abstract over similar actions Easy to extend with more complex syntax and semantics Can be compiled or interpreted Can automatically derived heuristics (relaxed problem)
Planning Algorithms Forward (progression) state-space search …  it ’s just search Backward (regresssion) state-space search Consider Goal:  Own (0136042597) Action ( Buy ( i ), Pre:  ISBN ( i ) Eff:  Own ( i )) In general, may involve unbound variables Plan-space search Start with empty plan, add branches
Plan-space search
Plan-space search Start Finish Left  Sock Finish Start Right Shoe Finish Start Right Shoe Finish Start Left Shoe
Plan-space search
Progression vs. Regression Progression has higher branching factor Progression searches in the space of complete (and consistent) states Regression has lower branching factor Regression searches in the space of  partial states There are 3 n  partial states (as against 2 n  complete states) You can also do bidirectional search stop when a (leaf) state in the progression tree entails a (leaf) state (formula) in the regression tree A B A B
State of the art Annual planning competitions Best technique has varied over time Currently: mostly forward state-space Largely due to good heuristics (relaxed prob.) Heuristics for atomic (state search) problem  Can only come from  outside  analysis of domain Heuristics for factored (planning) problem Can be  domain-independent
8-puzzle state space
8-puzzle action schema Action ( Slide ( t, a, b ),   Pre:  On ( t, a )∧  Tile ( t ) ∧  Blank ( b ) ∧  Adjacent ( a,b )   Eff:  On (t, b) ∧ Blank ( a ) ∧ ¬ On (t, a) ∧¬ Blank ( b ))
8-puzzle heuristics
Convex search: ignore del lists
Factored Rep allows control
Factored Rep allows control
Beyond Classical Planning Convenient to have more expressive lang. “Move  all  the cargo from SFO to JFK” Can be done with careful extensions to factored planning language Or:  Use existing first-order logical provers Strong foundation for studying planning Still, less used in practice than other techniques
First-Order Logic And, Or, Not, Implies (as in propositional logic) Variables ranging over  objects Relations and functions over objects Quantifiers ∀(for all) and∃(exists) Goal: ∀c Cargo(c) ⇒ At(c, JFK)
Situation Calculus Actions are objects Situations are objects Function: s2 = Result(s, a) Fluents: At(C1, JFK, s)  change over time Possibility axioms Say when an action is possible Successor-state axioms Partially describe the resulting state of an action
Situation Calculus Possibility Axioms (for each action) SomeFormula ( s ) ⇒ Poss ( a, s ) Alive ( Agent, s ) ∧  Have ( Agent, Arrow, s ) ⇒   Poss ( Shoot, s ) Successor-state Axiom (for each fluent) Poss ( a, s ) ⇒( fluent is true  ⇔  a made it true   ∨  it was true and a left it alone ) Poss(a, s)  ⇒ ( Holding ( Agent, g, Result ( s, a ))   ⇔   a = Grab ( g ) ∨   ( Holding ( Agent, g, s ) ∧  a  ≠  Release ( g )))
Situations as Result of Action Situation Calculus First-order Logic ∃s, p : Goal(s) ∧ s = Result(s0, p) s = Result(s, []) Result(s, [a,b,…]) = Result(Result(s, a), [b,…])
Planning Graphs Planning graphs are an efficient way to create a representation of a planning problem that can be used to  Achieve better heuristic estimates Directly construct plans  Planning graphs only work for propositional problems Compile to propositional if necessary
Planning Graphs Planning graphs consists of a seq of levels that correspond to time steps in the plan. Level 0 is the initial state. Each level consists of a set of literals and a set of actions that represent what  might be  possible at that step in the plan Might be  is the key to efficiency Records only a restricted subset of possible negative interactions among actions.
Planning Graphs Each level consists of  Literals   = all those that  could  be true at that time step, depending upon the actions executed at preceding time steps. Actions   = all those actions that  could  have their preconditions satisfied at that time step, depending on which of the literals actually hold.
Planning Graph Example Init(Have(Cake)) Goal(Have(Cake)    Eaten(Cake)) Action(Eat(Cake),  PRECOND: Have(Cake) EFFECT: ¬Have(Cake)    Eaten(Cake)) Action(Bake(Cake),  PRECOND: ¬ Have(Cake) EFFECT: Have(Cake))
Planning Graph Example Create level 0 from initial problem state.
Planning Graph Example Add all applicable actions. Add all effects to the next state.
Planning Graph Example Add  persistence actions  (inaction = no-ops)  to map all literals in state S i  to state S i+1 .
Planning Graph Example Identify  mutual exclusions  between actions and literals based on potential conflicts.
Mutual exclusion A mutex relation holds between  two actions  when: Inconsistent effects : one action negates the effect of another. Interference : one of the effects of one action is the negation of a precondition of the other. Competing needs : one of the preconditions of one action is mutually exclusive with the precondition of the other. A mutex relation holds between  two literals  when: one is the negation of the other OR  each possible action pair that could achieve the literals is mutex (inconsistent support).
Cake example Level S 1  contains all literals that could result from  picking any subset of actions in A 0 Conflicts between literals that can not occur together  (as a consequence of the selection action) are  represented by mutex links. S1 defines multiple states and the mutex links are the constraints that define this set of states.
Cake example Repeat process until graph levels off: two consecutive levels are identical
PG and Heuristic Estimation PG ’s provide information about the problem PG is a relaxed problem. A literal that does not appear in the final level of the graph cannot be achieved by any plan. h(s) =  ∞ Level Cost: First level in which a goal appears Very low estimate, since several actions can occur Improvement: restrict to one action per level using  serial PG  (add mutex links between  every  pair of actions, except persistence actions).
PG and Heuristic Estimation Cost of a conjunction of goals Max-level: maximum first level of any of the goals Sum-level: sum of first levels of all the goals Set-level: First level in which all goals appear without being mutex
The GRAPHPLAN Algorithm Extract a solution directly from the PG function  GRAPHPLAN( problem )  return   solution  or failure graph     INITIAL-PLANNING-GRAPH( problem ) goals     GOALS[ problem ] loop do if  goals  all non-mutex in last level of graph  then do   solution     EXTRACT-SOLUTION( graph, goals,  LEN (graph) )   if   solution     failure  then return   solution   else if  NO-SOLUTION-POSSIBLE( graph )  then return  failure   graph     EXPAND-GRAPH( graph, problem )
GRAPHPLAN example Initially the plan consist of 5 literals from the initial state (S0). Add actions whose preconditions are satisfied by EXPAND-GRAPH (A0) Also add persistence actions and mutex relations. Add the effects at level S1 Repeat until goal is in level Si
GRAPHPLAN example EXPAND-GRAPH also looks for mutex relations Inconsistent effects E.g. Remove(Spare, Trunk) and LeaveOverNight due to At(Spare,Ground) and  not  At(Spare, Ground) Interference  E.g. Remove(Flat, Axle) and LeaveOverNight At(Flat, Axle) as PRECOND and  not  At(Flat,Axle) as EFFECT Competing needs E.g. PutOn(Spare,Axle) and Remove(Flat, Axle) due to At(Flat.Axle) and  not  At(Flat, Axle) Inconsistent support E.g. in S2, At(Spare,Axle) and At(Flat,Axle)
GRAPHPLAN example In S2, the goal literals exist and are not mutex with any other Solution might exist and EXTRACT-SOLUTION will try to find it EXTRACT-SOLUTION can search with: Initial state = last level of PG and goal goals of planning problem Actions = select any set of non-conflicting actions that cover the goals in the state Goal = reach level S0 such that all goals are satisfied Cost = 1 for each action.
GRAPHPLAN Termination Termination of graph construction? YES PG are monotonically increasing or decreasing: Literals increase monotonically Actions increase monotonically Mutexes decrease monotonically Because of these properties and because there is a finite number of actions and literals, every PG will eventually level off

More Related Content

PPTX
Planning
PPTX
Planing presentation
PPT
Planning Algorithms
PDF
Slides15
PPT
Scheduling And Htn
PPT
Artificial Intelligence 1 Planning In The Real World
PDF
CLIM Fall 2017 Course: Statistics for Climate Research, Climate Informatics -...
PDF
Intrinsically Motivated Reinforcement Learning
Planning
Planing presentation
Planning Algorithms
Slides15
Scheduling And Htn
Artificial Intelligence 1 Planning In The Real World
CLIM Fall 2017 Course: Statistics for Climate Research, Climate Informatics -...
Intrinsically Motivated Reinforcement Learning

What's hot (6)

DOC
Notes notes vector calculus made at home (wecompress.com)
PPT
2d transformation
PDF
CLIM Fall 2017 Course: Statistics for Climate Research, Analysis for Climate ...
PPT
Design and Analysis of Algorithms
PDF
Deep Learning and Optimization Methods
PDF
Algorithm chapter 2
Notes notes vector calculus made at home (wecompress.com)
2d transformation
CLIM Fall 2017 Course: Statistics for Climate Research, Analysis for Climate ...
Design and Analysis of Algorithms
Deep Learning and Optimization Methods
Algorithm chapter 2
Ad

Viewers also liked (20)

PPTX
Warm up 3ºA
PPT
PunkMoney - talk
PDF
Mobiliteitsscan.com MKB demorapport - Slimmer Werken Slimmer Reizen
PPTX
Management Angels - We are Interim
PDF
Krishi mitr
PPTX
Daily mail
PPTX
Socialprob
PDF
Forward Branding
PPT
PunkMoney: How To Print Money on Twitter (2)
PPTX
Mobile Handsets
PPT
Onderwijs in de steigers in Mago
PPTX
Presentation2
PPT
Sentrale Makati
PPTX
Socialprob
PDF
Congresmap VSG congres 2011
PPT
Click Here! Top Gifts till Christmas 2011
PPT
Ren21 general
PDF
Mobiliteitsscan.com presentatie intervisie agentschap nl 022011
PDF
Aemas newsletter december 2011 vol. 1 issue no. 2
PPT
Pintura cinquecento
Warm up 3ºA
PunkMoney - talk
Mobiliteitsscan.com MKB demorapport - Slimmer Werken Slimmer Reizen
Management Angels - We are Interim
Krishi mitr
Daily mail
Socialprob
Forward Branding
PunkMoney: How To Print Money on Twitter (2)
Mobile Handsets
Onderwijs in de steigers in Mago
Presentation2
Sentrale Makati
Socialprob
Congresmap VSG congres 2011
Click Here! Top Gifts till Christmas 2011
Ren21 general
Mobiliteitsscan.com presentatie intervisie agentschap nl 022011
Aemas newsletter december 2011 vol. 1 issue no. 2
Pintura cinquecento
Ad

Similar to Cs221 logic-planning (20)

PPT
RPT_AI-06_A_Planning Intro.ppt
PPTX
classical planning ..
PPTX
21CSC206T_UNIT 5.pptx artificial intelligence
PPT
Planning
PPT
Planning
PDF
AI-UNI4-ALL THE TOPICS COVERED AS PER JNTUH R18 REGULATIONS.pdf
PDF
lecture12.pdf
PPT
cs344-lect15-robotic-knowledge-inferencing-prolog-11feb08.ppt
PPTX
CptS 440 / 540 Artificial Intelligence
PPT
Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08
PDF
AI_unit IV Full Notes.pdf
PDF
2.a-CMPS 403-F20-Session 2-Search Problems.pdf
PDF
15 predicate
PDF
Lesson 23
PDF
AI Lesson 23
PPTX
Lesson03-KnowledgeReasoningPlanning_Pt3.pptx
PPTX
J - Planning in artificial intelligence .pptx
PPTX
An Introduction to Radical Minimalism: Merge & Agree
PPT
09 logic programming
PDF
Slides2if85 assmeth2
RPT_AI-06_A_Planning Intro.ppt
classical planning ..
21CSC206T_UNIT 5.pptx artificial intelligence
Planning
Planning
AI-UNI4-ALL THE TOPICS COVERED AS PER JNTUH R18 REGULATIONS.pdf
lecture12.pdf
cs344-lect15-robotic-knowledge-inferencing-prolog-11feb08.ppt
CptS 440 / 540 Artificial Intelligence
Cs344 lect15-robotic-knowledge-inferencing-prolog-11feb08
AI_unit IV Full Notes.pdf
2.a-CMPS 403-F20-Session 2-Search Problems.pdf
15 predicate
Lesson 23
AI Lesson 23
Lesson03-KnowledgeReasoningPlanning_Pt3.pptx
J - Planning in artificial intelligence .pptx
An Introduction to Radical Minimalism: Merge & Agree
09 logic programming
Slides2if85 assmeth2

More from darwinrlo (9)

PPTX
Cs221 probability theory
PDF
Cs221 linear algebra
PPT
Cs221 lecture8-fall11
PPT
Cs221 lecture7-fall11
PPT
Cs221 lecture6-fall11
PPT
Cs221 lecture5-fall11
PPT
Cs221 lecture4-fall11
PPT
Cs221 lecture3-fall11
PPT
Cs221 rl
Cs221 probability theory
Cs221 linear algebra
Cs221 lecture8-fall11
Cs221 lecture7-fall11
Cs221 lecture6-fall11
Cs221 lecture5-fall11
Cs221 lecture4-fall11
Cs221 lecture3-fall11
Cs221 rl

Recently uploaded (20)

PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Empathic Computing: Creating Shared Understanding
Spectral efficient network and resource selection model in 5G networks
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Machine learning based COVID-19 study performance prediction
Encapsulation_ Review paper, used for researhc scholars
MYSQL Presentation for SQL database connectivity
Per capita expenditure prediction using model stacking based on satellite ima...
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Electronic commerce courselecture one. Pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Network Security Unit 5.pdf for BCA BBA.
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Chapter 3 Spatial Domain Image Processing.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Review of recent advances in non-invasive hemoglobin estimation
Empathic Computing: Creating Shared Understanding

Cs221 logic-planning

  • 1. CS 221: Artificial Intelligence Planning (and Basic Logic) Peter Norvig and Sebastian Thrun Slide credits: Stuart Russell, Rina Dechter, Rao Kambhampati
  • 2. AI: Dealing with Complexity Agent Design Reflex➔Memory-Based Reflex➔Goal-Based➔Utility-Based Environment ➔ Partially Observable, Stochastic, Dynamic, Multi-agent, Adversarial Representation Atomic➔Factored➔Structured
  • 4. What’s wrong with Problem-Solving Plan: [Forward, Forward, Forward, …]
  • 5. What’s wrong with Problem-Solving
  • 6. Planning A plan is a program Not just a straight-line sequence of actions Planning and acting can be interleaved Closed loop, not closed eyes Representation is more flexible Can deal with partially-described states Can deal with features, objects, relations Can be hierarchical
  • 7. Dealing with Partial Observability: World vs. Belief States
  • 8. Sensorless – Belief States - Conformant Plans
  • 9. Deterministic world Slippery wheels Partial (local) Observability and Stochastic Worlds Deterministic actions; observe only local square Observe only local square; Suck is determ. R/L are stoch. (may fail to move)
  • 10. Slippery wheels Planning and Sensing in Partially Observable and Stochastic World What is a plan to achieve all states clean? [1: Suck ; 2: Right ; ( if A : goto 2); 3: Suck ] also written as [ Suck ; ( while A : Right ); Suck ] Observe only local square; Suck is determ. R/L are stoch.; may fail to move
  • 11. Search Graph as And/Or Tree What do we need to guarantee success? What kind of guarantee?
  • 12. As Equations, not Tree b is a belief state: a set of states o is an observation; a percept a is an action b’ = UPDATE(PREDICT( b, a ) , o )
  • 13. Kindergarten world: dirt may appear anywhere at any time, But actions are guaranteed to work. b1 b3 =UPDATE( b1 ,[ A,Clean ]) b5 = UPDATE( b4,… ) b2 =PREDICT( b1, Suck ) b4 =PREDICT( b3 , Right )
  • 15. State Representation Bayes Nets? Factored SQL data base? One table: Factored; Several: Structured Java program? Structured
  • 16. Representation Atomic Representation s 1 = s 2 ; Result( s, a ) = s ′; GoalTest( s ); Factored Representation Attribute( s ) = val … ( val numeric or Boolean) Result and GoalTest in terms of attributes Structured Representation All of above Relations, Functions: Rel( a , b , c ); F( a , b ) = c Objects; with Quantifiers (for all ∀x, there exists ∃y)
  • 17. Planning with Factored States World is made up of states which are defined in terms of state variables Can be Boolean or categorical or continuous Where have we used this before? State: complete assignment over state variables So, k Boolean state variables represent how many states? Actions change the values of the state variables Applicability conditions of actions are also specified in terms of partial assignments over state variables
  • 18. “ Classical” Planning State : conjunction of Boolean state variables Action Schema : Action ( Fly ( p, from, to ), Precond: At ( p , from ) ∧ Plane ( p ) ∧ Airport ( from ) ∧ Airport ( to ) Effect: ¬ At ( p , from ) ∧ At ( p , to )) Implicitly defines Actions ( s ) and Result ( s, a )
  • 20. Advantages of the Language Natural to read, write, verify Abstract over similar actions Easy to extend with more complex syntax and semantics Can be compiled or interpreted Can automatically derived heuristics (relaxed problem)
  • 21. Planning Algorithms Forward (progression) state-space search … it ’s just search Backward (regresssion) state-space search Consider Goal: Own (0136042597) Action ( Buy ( i ), Pre: ISBN ( i ) Eff: Own ( i )) In general, may involve unbound variables Plan-space search Start with empty plan, add branches
  • 23. Plan-space search Start Finish Left Sock Finish Start Right Shoe Finish Start Right Shoe Finish Start Left Shoe
  • 25. Progression vs. Regression Progression has higher branching factor Progression searches in the space of complete (and consistent) states Regression has lower branching factor Regression searches in the space of partial states There are 3 n partial states (as against 2 n complete states) You can also do bidirectional search stop when a (leaf) state in the progression tree entails a (leaf) state (formula) in the regression tree A B A B
  • 26. State of the art Annual planning competitions Best technique has varied over time Currently: mostly forward state-space Largely due to good heuristics (relaxed prob.) Heuristics for atomic (state search) problem Can only come from outside analysis of domain Heuristics for factored (planning) problem Can be domain-independent
  • 28. 8-puzzle action schema Action ( Slide ( t, a, b ), Pre: On ( t, a )∧ Tile ( t ) ∧ Blank ( b ) ∧ Adjacent ( a,b ) Eff: On (t, b) ∧ Blank ( a ) ∧ ¬ On (t, a) ∧¬ Blank ( b ))
  • 33. Beyond Classical Planning Convenient to have more expressive lang. “Move all the cargo from SFO to JFK” Can be done with careful extensions to factored planning language Or: Use existing first-order logical provers Strong foundation for studying planning Still, less used in practice than other techniques
  • 34. First-Order Logic And, Or, Not, Implies (as in propositional logic) Variables ranging over objects Relations and functions over objects Quantifiers ∀(for all) and∃(exists) Goal: ∀c Cargo(c) ⇒ At(c, JFK)
  • 35. Situation Calculus Actions are objects Situations are objects Function: s2 = Result(s, a) Fluents: At(C1, JFK, s) change over time Possibility axioms Say when an action is possible Successor-state axioms Partially describe the resulting state of an action
  • 36. Situation Calculus Possibility Axioms (for each action) SomeFormula ( s ) ⇒ Poss ( a, s ) Alive ( Agent, s ) ∧ Have ( Agent, Arrow, s ) ⇒ Poss ( Shoot, s ) Successor-state Axiom (for each fluent) Poss ( a, s ) ⇒( fluent is true ⇔ a made it true ∨ it was true and a left it alone ) Poss(a, s) ⇒ ( Holding ( Agent, g, Result ( s, a )) ⇔ a = Grab ( g ) ∨ ( Holding ( Agent, g, s ) ∧ a ≠ Release ( g )))
  • 37. Situations as Result of Action Situation Calculus First-order Logic ∃s, p : Goal(s) ∧ s = Result(s0, p) s = Result(s, []) Result(s, [a,b,…]) = Result(Result(s, a), [b,…])
  • 38. Planning Graphs Planning graphs are an efficient way to create a representation of a planning problem that can be used to Achieve better heuristic estimates Directly construct plans Planning graphs only work for propositional problems Compile to propositional if necessary
  • 39. Planning Graphs Planning graphs consists of a seq of levels that correspond to time steps in the plan. Level 0 is the initial state. Each level consists of a set of literals and a set of actions that represent what might be possible at that step in the plan Might be is the key to efficiency Records only a restricted subset of possible negative interactions among actions.
  • 40. Planning Graphs Each level consists of Literals = all those that could be true at that time step, depending upon the actions executed at preceding time steps. Actions = all those actions that could have their preconditions satisfied at that time step, depending on which of the literals actually hold.
  • 41. Planning Graph Example Init(Have(Cake)) Goal(Have(Cake)  Eaten(Cake)) Action(Eat(Cake), PRECOND: Have(Cake) EFFECT: ¬Have(Cake)  Eaten(Cake)) Action(Bake(Cake), PRECOND: ¬ Have(Cake) EFFECT: Have(Cake))
  • 42. Planning Graph Example Create level 0 from initial problem state.
  • 43. Planning Graph Example Add all applicable actions. Add all effects to the next state.
  • 44. Planning Graph Example Add persistence actions (inaction = no-ops) to map all literals in state S i to state S i+1 .
  • 45. Planning Graph Example Identify mutual exclusions between actions and literals based on potential conflicts.
  • 46. Mutual exclusion A mutex relation holds between two actions when: Inconsistent effects : one action negates the effect of another. Interference : one of the effects of one action is the negation of a precondition of the other. Competing needs : one of the preconditions of one action is mutually exclusive with the precondition of the other. A mutex relation holds between two literals when: one is the negation of the other OR each possible action pair that could achieve the literals is mutex (inconsistent support).
  • 47. Cake example Level S 1 contains all literals that could result from picking any subset of actions in A 0 Conflicts between literals that can not occur together (as a consequence of the selection action) are represented by mutex links. S1 defines multiple states and the mutex links are the constraints that define this set of states.
  • 48. Cake example Repeat process until graph levels off: two consecutive levels are identical
  • 49. PG and Heuristic Estimation PG ’s provide information about the problem PG is a relaxed problem. A literal that does not appear in the final level of the graph cannot be achieved by any plan. h(s) = ∞ Level Cost: First level in which a goal appears Very low estimate, since several actions can occur Improvement: restrict to one action per level using serial PG (add mutex links between every pair of actions, except persistence actions).
  • 50. PG and Heuristic Estimation Cost of a conjunction of goals Max-level: maximum first level of any of the goals Sum-level: sum of first levels of all the goals Set-level: First level in which all goals appear without being mutex
  • 51. The GRAPHPLAN Algorithm Extract a solution directly from the PG function GRAPHPLAN( problem ) return solution or failure graph  INITIAL-PLANNING-GRAPH( problem ) goals  GOALS[ problem ] loop do if goals all non-mutex in last level of graph then do solution  EXTRACT-SOLUTION( graph, goals, LEN (graph) ) if solution  failure then return solution else if NO-SOLUTION-POSSIBLE( graph ) then return failure graph  EXPAND-GRAPH( graph, problem )
  • 52. GRAPHPLAN example Initially the plan consist of 5 literals from the initial state (S0). Add actions whose preconditions are satisfied by EXPAND-GRAPH (A0) Also add persistence actions and mutex relations. Add the effects at level S1 Repeat until goal is in level Si
  • 53. GRAPHPLAN example EXPAND-GRAPH also looks for mutex relations Inconsistent effects E.g. Remove(Spare, Trunk) and LeaveOverNight due to At(Spare,Ground) and not At(Spare, Ground) Interference E.g. Remove(Flat, Axle) and LeaveOverNight At(Flat, Axle) as PRECOND and not At(Flat,Axle) as EFFECT Competing needs E.g. PutOn(Spare,Axle) and Remove(Flat, Axle) due to At(Flat.Axle) and not At(Flat, Axle) Inconsistent support E.g. in S2, At(Spare,Axle) and At(Flat,Axle)
  • 54. GRAPHPLAN example In S2, the goal literals exist and are not mutex with any other Solution might exist and EXTRACT-SOLUTION will try to find it EXTRACT-SOLUTION can search with: Initial state = last level of PG and goal goals of planning problem Actions = select any set of non-conflicting actions that cover the goals in the state Goal = reach level S0 such that all goals are satisfied Cost = 1 for each action.
  • 55. GRAPHPLAN Termination Termination of graph construction? YES PG are monotonically increasing or decreasing: Literals increase monotonically Actions increase monotonically Mutexes decrease monotonically Because of these properties and because there is a finite number of actions and literals, every PG will eventually level off

Editor's Notes

  • #3: This course: Spiral approach to dealing with complexity
  • #5: Executing a plan without looking at the world often fails
  • #6: In the real world actions are at many levels: the action of driving from one city to the next involves a series of intersection-to-intersection actions, each of which involves a sequence of steering wheel, accelerator, and brake actions.
  • #8: Deterministic, fully observable world: how to get from upper left to clean state?
  • #9: Conformant plan to clean everything? Didn’t know where we were, but didn’t matter
  • #10: Slippery wheels: may move, may not. Suck always works.
  • #11: Slippery wheels: may move, may not. Suck always works.
  • #13: Does predict add or subtract states? Does update?
  • #17: What about h(s)? Is that atomic?
  • #19: In classical planning, schema over finite domain – abbreviation for spelling out individual variables.