this week outline
play

This week Outline Search vs. planning last week of lectures - PowerPoint PPT Presentation

1 2 This week Outline Search vs. planning last week of lectures STRIPS operators Thursday: summary of examinable material bring along your questions about the course! Partial-order planning tutorials this week and next


  1. 1 2 This week Outline ♦ Search vs. planning • last week of lectures ♦ STRIPS operators • Thursday: summary of examinable material bring along your questions about the course! ♦ Partial-order planning • tutorials this week and next week Today See Russell and Norvig, chapter 11 • Planning • Distributed computation Alan Smaill Fundamentals of Artificial Intelligence Nov 17, 2008 Alan Smaill Fundamentals of Artificial Intelligence Nov 17, 2008 3 4 Search vs. planning Search vs. planning contd. Consider the task get milk, bananas, and a cordless drill Planning systems do the following: Standard search algorithms seem to fail miserably: 1) open up action and goal representation to allow selection Talk to Parrot 2) divide-and-conquer by subgoaling Go To Pet Store Buy a Dog 3) relax requirement for sequential construction of solutions Go To School Go To Class Search Planning Go To Supermarket Buy Tuna Fish States (Lisp?) data structures Logical sentences Start (Lisp?) code Preconditions/outcomes Actions Go To Sleep Buy Arugula Goal (Lisp?) code Logical sentence (conjunction) Read A Book Buy Milk ... Finish Plan Sequence from S 0 Constraints on actions Sit in Chair Sit Some More Etc. Etc. ... Read A Book . . . After-the-fact heuristic/goal test inadequate Alan Smaill Fundamentals of Artificial Intelligence Nov 17, 2008 Alan Smaill Fundamentals of Artificial Intelligence Nov 17, 2008

  2. 5 6 STRIPS operators Partially ordered plans Tidily arranged actions descriptions, restricted language Partially ordered collection of steps with Start step has the initial state description as its effect Action : Buy ( x ) Finish step has the goal description as its precondition At(p) Sells(p,x) Precondition : At ( p ) , Sells ( p, x ) causal links from outcome of one step to precondition of another Effect : Have ( x ) Buy(x) temporal ordering between pairs of steps [Note: this abstracts away many important details!] Have(x) Open condition = precondition of a step not yet causally linked Restricted language ⇒ efficient algorithm A plan is complete iff every precondition is achieved Precondition: conjunction of positive literals Effect: conjunction of literals A precondition is achieved iff it is the effect of an earlier step and no possibly intervening step undoes it A complete set of STRIPS operators can be translated into a set of successor-state axioms Alan Smaill Fundamentals of Artificial Intelligence Nov 17, 2008 Alan Smaill Fundamentals of Artificial Intelligence Nov 17, 2008 7 8 Example Example Start Start At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) At(HWS) Sells(HWS,Drill) Buy(Drill) At(x) Go(SM) At(SM) Sells(SM,Milk) Buy(Milk) Have(Milk) At(Home) Have(Ban.) Have(Drill) Have(Milk) At(Home) Have(Ban.) Have(Drill) Finish Finish Alan Smaill Fundamentals of Artificial Intelligence Nov 17, 2008 Alan Smaill Fundamentals of Artificial Intelligence Nov 17, 2008

  3. 9 10 Example Planning process Operators on partial plans: Start add a link from an existing action to an open condition At(Home) add a step to fulfill an open condition Go(HWS) order one step wrt another to remove possible conflicts At(HWS) Sells(HWS,Drill) Gradually move from incomplete/vague plans to complete, correct Buy(Drill) plans At(HWS) Backtrack if an open condition is unachievable or Go(SM) if a conflict is unresolvable At(SM) Sells(SM,Milk) At(SM) Sells(SM,Ban.) Buy(Milk) Buy(Ban.) At(SM) Go(Home) Have(Milk) At(Home) Have(Ban.) Have(Drill) Finish Alan Smaill Fundamentals of Artificial Intelligence Nov 17, 2008 Alan Smaill Fundamentals of Artificial Intelligence Nov 17, 2008 POP algorithm sketch 11 POP algorithm contd. 12 function POP ( initial, goal, operators ) returns plan procedure Choose-Operator ( plan, operators, S need , c ) choose a step S add from operators or Steps ( plan ) that has c as an effect plan ← Make-Minimal-Plan ( initial, goal ) if there is no such step then fail loop do c add the causal link S add → S need to Links ( plan ) − if Solution? ( plan ) then return plan add the ordering constraint S add ≺ S need to Orderings ( plan ) S need , c ← Select-Subgoal ( plan ) if S add is a newly added step from operators then Choose-Operator ( plan, operators , S need , c ) add S add to Steps ( plan ) Resolve-Threats ( plan ) add Start ≺ S add ≺ F inish to Orderings ( plan ) end procedure Resolve-Threats ( plan ) function Select-Subgoal ( plan ) returns S need , c c for each S threat that threatens a link S i → S j in Links ( plan ) do − pick a plan step S need from Steps ( plan ) choose either with a precondition c that has not been achieved Demotion: Add S threat ≺ S i to Orderings ( plan ) return S need , c Promotion: Add S j ≺ S threat to Orderings ( plan ) if not Consistent ( plan ) then fail Alan Smaill Fundamentals of Artificial Intelligence Nov 17, 2008 Alan Smaill Fundamentals of Artificial Intelligence Nov 17, 2008

  4. Clobbering and promotion/demotion 13 14 Properties of POP A clobberer is a step that could destroy the condition achieved by a causal link. E.g., Go ( Home ) clobbers At ( Supermarket ) : Nondeterministic algorithm: backtracks at choice points on failure: – choice of S add to achieve S need DEMOTION – choice of demotion or promotion for clobberer Go(Supermarket) – selection of S need is irrevocable POP is sound, complete, and systematic (no repetition) Go(Home) Extensions for disjunction, universals, negation, conditionals At(Home) Can be made efficient with good heuristics derived from problem At(Supermarket) description Buy(Milk) Particularly good for problems with many loosely related subgoals PROMOTION At(Home) Demotion: put before Go ( Supermarket ) Finish Promotion: put after Buy ( Milk ) Alan Smaill Fundamentals of Artificial Intelligence Nov 17, 2008 Alan Smaill Fundamentals of Artificial Intelligence Nov 17, 2008 15 Example contd. 16 Example: Blocks world C START B A "Sussman anomaly" problem A On(C,A) On(A,Table) Cl(B) On(B,Table) Cl(C) C B B A C Start State Goal State Clear(x) On(x,z) Clear(y) Clear(x) On(x,z) PutOn(x,y) PutOnTable(x) A ~On(x,z) ~Clear(y) ~On(x,z) Clear(z) On(x,Table) On(A,B) On(B,C) B Clear(z) On(x,y) FINISH C + several inequality constraints Alan Smaill Fundamentals of Artificial Intelligence Nov 17, 2008 Alan Smaill Fundamentals of Artificial Intelligence Nov 17, 2008

  5. Example contd. 17 Example contd. 18 C C START START B A B A On(C,A) On(A,Table) Cl(B) On(B,Table) Cl(C) On(C,A) On(A,Table) Cl(B) On(B,Table) Cl(C) PutOn(A,B) clobbers Cl(B) => order after PutOn(B,C) Cl(B) On(B,z) Cl(C) Cl(B) On(B,z) Cl(C) Cl(A) On(A,z) Cl(B) PutOn(B,C) PutOn(B,C) PutOn(A,B) A A On(A,B) On(B,C) On(A,B) On(B,C) B B FINISH FINISH C C Alan Smaill Fundamentals of Artificial Intelligence Nov 17, 2008 Alan Smaill Fundamentals of Artificial Intelligence Nov 17, 2008 Example contd. 19 20 Distributed AI C START B A On(C,A) On(A,Table) Cl(B) On(B,Table) Cl(C) The notion of algorithm we have used so far is based on a sequential PutOn(A,B) model of computation, where there is a linear sequence of computation clobbers Cl(B) => order after steps; compare the von Neumann architecture: PutOn(B,C) On(C,z) Cl(C) PutOn(B,C) PutOnTable(C) clobbers Cl(C) => order after PutOnTable(C) Cl(B) On(B,z) Cl(C) Cl(A) On(A,z) Cl(B) PutOn(B,C) PutOn(A,B) A On(A,B) On(B,C) B FINISH C Alan Smaill Fundamentals of Artificial Intelligence Nov 17, 2008 Alan Smaill Fundamentals of Artificial Intelligence Nov 17, 2008

Recommend


More recommend