Planning with Loops Some New Results Yuxiao (Toby) Hu and Hector Levesque University of Toronto.

Slides:



Advertisements
Similar presentations
BEST FIRST SEARCH - BeFS
Advertisements

Solving problems by searching Chapter 3. Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms.
Additional Topics ARTIFICIAL INTELLIGENCE
Review: Search problem formulation
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal.
Planning with Non-Deterministic Uncertainty (Where failure is not an option) R&N: Chap. 12, Sect (+ Chap. 10, Sect 10.7)
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.
Siddharth Srivastava, Neil Immerman, Shlomo Zilberstein University of Massachusetts Amherst.
PROBLEM SOLVING AND SEARCH
MBD and CSP Meir Kalech Partially based on slides of Jia You and Brian Williams.
Solving Problem by Searching
October 1, 2012Introduction to Artificial Intelligence Lecture 8: Search in State Spaces II 1 A General Backtracking Algorithm Let us say that we can formulate.
Part2 AI as Representation and Search
CS 480 Lec 3 Sept 11, 09 Goals: Chapter 3 (uninformed search) project # 1 and # 2 Chapter 4 (heuristic search)
Blind Search1 Solving problems by searching Chapter 3.
Search Strategies Reading: Russell’s Chapter 3 1.
May 12, 2013Problem Solving - Search Symbolic AI: Problem Solving E. Trentin, DIISM.
1 Chapter 3 Solving Problems by Searching. 2 Outline Problem-solving agentsProblem-solving agents Problem typesProblem types Problem formulationProblem.
Solving Problem by Searching Chapter 3. Outline Problem-solving agents Problem formulation Example problems Basic search algorithms – blind search Heuristic.
Graphs Graphs are the most general data structures we will study in this course. A graph is a more general version of connected nodes than the tree. Both.
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
CS 380: Artificial Intelligence Lecture #3 William Regli.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Review: Search problem formulation
3/25  Monday 3/31 st 11:30AM BYENG 210 Talk by Dana Nau Planning for Interactions among Autonomous Agents.
CPSC 322, Lecture 12Slide 1 CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12 (Textbook Chpt ) January, 29, 2010.
Artificial Intelligence Chapter 3: Solving Problems by Searching
Constraint Satisfaction Problems
Uninformed Search Reading: Chapter 3 by today, Chapter by Wednesday, 9/12 Homework #2 will be given out on Wednesday DID YOU TURN IN YOUR SURVEY?
Using Search in Problem Solving
CS121 Heuristic Search Planning CSPs Adversarial Search Probabilistic Reasoning Probabilistic Belief Learning.
Chapter 5 Outline Formal definition of CSP CSP Examples
CSE (c) S. Tanimoto, 2008 State-Space Search 1 State-Space Search Motivation: Understanding “dynamics” in AI Statics versus Dynamics of AI Statics:
Solving problems by searching
Backtracking.
1 Planning with Loops Hector J. Levesque Dept. of Computer Science University of Toronto Presented by Lihui Hu.
Intro to AI, Fall 2004 © L. Joskowicz 1 Introduction to Artificial Intelligence LECTURE 3: Uninformed Search Problem solving by search: definitions Graph.
State-Space Searches.
Informed Search Idea: be smart about what paths to try.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
Vilalta&Eick: Informed Search Informed Search and Exploration Search Strategies Heuristic Functions Local Search Algorithms Vilalta&Eick: Informed Search.
1 Solving problems by searching This Lecture Chapters 3.1 to 3.4 Next Lecture Chapter 3.5 to 3.7 (Please read lecture topic material before and after each.
Informed (Heuristic) Search
Problem-Solving by Searching Uninformed (Blind) Search Algorithms.
Informed search algorithms Chapter 4. Outline Best-first search Greedy best-first search A * search Heuristics.
State-Space Searches. 2 State spaces A state space consists of A (possibly infinite) set of states The start state represents the initial problem Each.
Easiest-to-Reach Neighbor Search Fatimah Aldubaisi.
Lecture 3: Uninformed Search
1 Solving problems by searching 171, Class 2 Chapter 3.
Ch. 13 Ch. 131 jcmt CSE 3302 Programming Languages CSE3302 Programming Languages (notes?) Dr. Carter Tiernan.
Advanced Artificial Intelligence Lecture 2: Search.
SOLVING PROBLEMS BY SEARCHING Chapter 3 August 2008 Blind Search 1.
A General Introduction to Artificial Intelligence.
Basic Problem Solving Search strategy  Problem can be solved by searching for a solution. An attempt is to transform initial state of a problem into some.
Goal-based Problem Solving Goal formation Based upon the current situation and performance measures. Result is moving into a desirable state (goal state).
Search (continued) CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
CSCI 4310 Lecture 2: Search. Search Techniques Search is Fundamental to Many AI Techniques.
Problem Solving as Search. Problem Types Deterministic, fully observable  single-state problem Non-observable  conformant problem Nondeterministic and/or.
Search Techniques CS480/580 Fall Introduction Trees: – Root, parent, child, sibling, leaf node, node, edge – Single path from root to any node Graphs:
Implementation: General Tree Search
Solving problems by searching A I C h a p t e r 3.
Biointelligence Lab School of Computer Sci. & Eng. Seoul National University Artificial Intelligence Chapter 8 Uninformed Search.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Artificial Intelligence Solving problems by searching.
Solving problems by searching
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Artificial Intelligence Problem solving by searching CSC 361
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Solving problems by searching
Presentation transcript:

Planning with Loops Some New Results Yuxiao (Toby) Hu and Hector Levesque University of Toronto

2 Outline Introduction Representing plans with loops –FSA plan: a type of finite state controller Constructing plans with loops –Search in the space of FSA plans Potential for improvements Conclusion

3 The Planning Problem Finitely many functional fluents, f 1,...,f m, whose domain may be finite or infinite; Finitely many actions, a 1,...,a n (world- changing or sensing); Initial state: the possible values of each fluent; Goal: achieve some goal condition in all contingencies. Like contingent planning: solve a class of problems Incomplete initial state with possibly infinite cases

4 Motivating Example (a variant of striped-tower in Srivastava et al. 2008) Fluents: –stackA (a list of block colors) –stackB (a list of block colors) –stackC (a list of block colors) –hand (empty/red/blue) World changing actions: –pickA, pickB, putB, putC; Sensing actions –testA? (empty/nonempty) –testB? (empty/nonempty) –testH? (red/blue)

5 Motivating Example (a variant of striped-tower in Srivastava et al. 2008) Initially: –stackA=[blue,red,red,blue] –stackB=[ ] –stackC=[ ] –hand=empty Goal: –stackA=[ ] –stackB=[ ] –striped(stackC) –hand=empty striped(X) is true iff X=[red,blue,…,red,blue]

6 Example 1 A linear solution 1.pickA; 2.putB; 3.pickA; 4.putC; 5.pickB; 6.putC; 7.pickA; 8.putC; 9.pickA 10.putC.

7 Example 2

8 Example 2 (cont.) pickA; CASE testH? OF - red: putC; pickA; CASE testH? OF -red: putB; blue: putC; blue: putB; pickA; CASE testH? OF -red: putC; blue: putB;......

9 Example 3 Question: Is there a generalized plan solving all problems in this class?

10 Some of the Existing Approaches KPLANNER (Levesque 2005) generates robot programs by winding found conditional plans. Aranda (Srivastava et al. 2008) obtains generalized plans by winding an abstracted example plan. loopDISTILL (Winner and Veloso 2007) learns a “dsPlanner” by merging matching sub- plans of an example partial-order plan.

11 Outline Introduction Representing plans with loops –FSA plan: a type of finite state controller Constructing plans with loops –Search in the space of FSA plans Potential for improvements Conclusion

12 Plan Representation – Robot Programs A robot program is defined inductively by –nil; –seq(A,P); –case(A,[R 1 :P 1,…,R n :P n ]); –loop(P,Q). (Levesque 1996, 2005) KPLANNER (Levesque 2005) uses the robot program representation.

13 Robot Program – Some Examples pickA; CASE testH? OF - red: putC; pickA; CASE testH? OF -red: putB; blue: putC; blue: putB; pickA; CASE testH? OF -red: putC; blue: putB; pickA; putB; pickA; putC; pickB; putC; pickA; putC; pickA putC.

14 Plan Representation An FSA plan is a directed graph Each node represents a program state o One unique "start" state o One unique "final" state o Non-final state associated with an action Each edge is associated with a sensing result o Sensing result of world-changing actions can be omitted

15 Plan Execution (for a single complete initial world) 1.Use the "start state" as current program state; 2.If current state is the "final state", then stop; 3.Execute action associated to the current state; 4.Follow the edge with returned sensing result; 5.Make the node pointed to by this edge the current program state, and repeat from Step 2.

16 Robot Program vs. FSA Plan It can be shown that all robot programs can be represented by equivalent FSA plans. What about the reverse direction?

17 Robot Program vs. FSA Plan feel? thirsty drink hungry eat go2bed sleep CASE feel? OF - thirsty: drink; go2bed; sleep; - hungry: eat; go2bed; sleep

18 Robot Program vs. FSA Plan get? instruction suggestion follow? think? succeed fail workable unworkableok revise? fail

19 Outline Motivation Representing plans with loops –FSA plan: a type of finite state controller Constructing plans with loops –Search in the space of FSA plans Potential for improvements Conclusion

20 Generating Plans with Loops 1.Start with the smallest FSA plan with only one non- final state. 2.If the current program state is final, the goal must be satisfied. 3.Otherwise, execute the action associated to the current program state, non-deterministically pick an applicable one if none is associated. 4.For each possible sensing result of the action, follow the transition and change the current state to the transition target. If no transition is associated to the sensing result, non-deterministically pick one for it. 5.Repeat from step 2.

21 Search in the Space of FSA Plans … (Possible values of stackA)

22 Search in the Space of FSA Plans …

23 Search in the Space of FSA Plans pickA …

24 Search in the Space of FSA Plans testA? … empty

25 Search in the Space of FSA Plans testA? empty nonempty …

26 Search in the Space of FSA Plans testA? empty nonempty …

27 Search in the Space of FSA Plans testA? empty nonempty … pickB

28 Search in the Space of FSA Plans testA? empty nonempty … testA?

29 Search in the Space of FSA Plans testA? empty nonempty … pickA

30 Search in the Space of FSA Plans testA? empty nonempty … pickA

31 Search in the Space of FSA Plans testA? empty nonempty … pickA

32 Search in the Space of FSA Plans testA? empty nonempty … pickA

33 Search in the Space of FSA Plans testA? empty nonempty pickA

And finally…

35 Experimental Results (Using the same pruning rules.)

36 Experimental Results Statistics for Aranda are estimation from figures in (Srivastava et al. 08) without redoing their experiments.

37 Potential for Improvements We have formulated planning with loops as a search problem, and obtained a baseline implementation. It is using blind depth-first (iterative deepening) search, and does not scale well without effective pruning rules. However, the baseline implementation is a good starting point for adding heuristics and trying other improvement.

38 Heuristics for Action Selection We tried a variant of the additive heuristics (Bonet and Geffner 2001): –Assume all fluents are independent; –Count the number of action steps to change each fluent to a value that may satisfy the goal; –Sum of steps across all fluents used as goal distance; –Try successor states with shorter distance first

39 Heuristics for Action Selection Appear relatively effective, but still limited: –The domain of each fluent may be infinite, so exponential BFS was used; –There are two non-deterministic choices in the search algorithm (choice of action and choice of transition). Greedily improving only one does not always lead to a good decision.

40 Discussion Planning with loops is an interesting problem We formally defined FSA plans, representation for loopy plans. [And a logical account for planning problems, FSA plans and correctness.] We formulate planning with loops as a search problem. FSA planner, the baseline implementation, outperforms KPLANNER, and is good starting point for heuristics and other improvements.