Introduction to Planning Dr. Shazzad Hosain Department of EECS North South Universtiy

Slides:



Advertisements
Similar presentations
Planning.
Advertisements

REVIEW : Planning To make your thinking more concrete, use a real problem to ground your discussion. –Develop a plan for a person who is getting out of.
Language for planning problems
CSE391 – 2005 NLP 1 Planning The Planning problem Planning with State-space search.
Planning
1 Planning Chapter CMSC 471 Adapted from slides by Tim Finin and Marie desJardins. Some material adopted from notes by Andreas Geyer-Schulz,
Planning  We have done a sort of planning already  Consider the “search” applied to general problem solving  The sequence of moves with the “Jugs” was.
Planning II: Partial Order Planning
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.
Situation Calculus for Action Descriptions We talked about STRIPS representations for actions. Another common representation is called the Situation Calculus.
Plan Generation & Causal-Link Planning 1 José Luis Ambite.
PLANNING IN AI. Determine the set of steps that are necessary to achieve a goal Some steps might be conditional, i.e., they are only taken when a set.
Best-First Search: Agendas
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 [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
1 Chapter 16 Planning Methods. 2 Chapter 16 Contents (1) l STRIPS l STRIPS Implementation l Partial Order Planning l The Principle of Least Commitment.
Artificial Intelligence 2005/06
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
Artificial Intelligence Chapter 11: Planning
1 Chapter Planning & Planning Methods. 2 Planning l Deciding upon a course of action before acting. l A plan is a representation of a course of.
1 Planning. R. Dearden 2007/8 Exam Format  4 questions You must do all questions There is choice within some of the questions  Learning Outcomes: 1.Explain.
Inference and Resolution for Problem Solving
1 Chapter 15 Introduction to Planning. 2 Chapter 15 Contents l Planning as Search l Situation Calculus l The Frame Problem l Means-Ends Analysis l The.
Dr. Muhammed Al-Mulhem 1ICS ICS 535 Design and Implementation of Programming Languages Part 1 Fundamentals (Chapter 4) Axiomatic Semantics ICS 535.
Lesson 6. Refinement of the Operator Model This page describes formally how we refine Figure 2.5 into a more detailed model so that we can connect it.
Automated Planning and HTNs Planning – A brief intro Planning – A brief intro Classical Planning – The STRIPS Language Classical Planning – The STRIPS.
1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington.
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.
For Wednesday Read chapter 12, sections 3-5 Program 2 progress due.
Course Overview  What is AI?  What are the Major Challenges?  What are the Main Techniques?  Where are we failing, and why?  Step back and look at.
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:
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Artificial Intelligence Lecture 9. Outline Search in State Space State Space Graphs Decision Trees Backtracking in Decision Trees.
Homework 1 ( Written Portion )  Max : 75  Min : 38  Avg : 57.6  Median : 58 (77%)
Artificial Intelligence: Planning Lecture 6 Problems with state space search Planning Operators A Simple Planning Algorithm (Game Playing)
Planning, page 1 CSI 4106, Winter 2005 Planning Points Elements of a planning problem Planning as resolution Conditional plans Actions as preconditions.
Planning (Chapter 10)
Partial Ordering Planning Lecture Module 10. Partial Ordering Any planning algorithm that can place two actions into a plan without specifying which comes.
1 Chapter 15 Introduction to Planning. 2 Chapter 15 Contents l Planning as Search l Situation Calculus l The Frame Problem l Means-Ends Analysis l The.
For Friday No reading Homework: –Chapter 11, exercise 4.
Planning (Chapter 10)
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 Reasoning Early AI explored how to automate several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Automated Planning and Decision Making Prof. Ronen Brafman Automated Planning and Decision Making Partial Order Planning Based on slides by: Carmel.
1 Chapter 16 Planning Methods. 2 Chapter 16 Contents (1) l STRIPS l STRIPS Implementation l Partial Order Planning l The Principle of Least Commitment.
Advanced Problem Solving Systems: Planning Lecture Module 8.
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
Intro to Planning Or, how to represent the planning problem in logic.
Planning I: Total Order Planners Sections
Heuristic Search Planners. 2 USC INFORMATION SCIENCES INSTITUTE Planning as heuristic search Use standard search techniques, e.g. A*, best-first, hill-climbing.
Planning (Chapter 10) Slides by Svetlana Lazebnik, 9/2016 with modifications by Mark Hasegawa-Johnson, 9/2017
Planning (Chapter 10)
Planning (Chapter 10)
Introduction Defining the Problem as a State Space Search.
Class #17 – Thursday, October 27
Planning José Luis Ambite.
Graph-based Planning Slides based on material from: Prof. Maria Fox
Graphplan/ SATPlan Chapter
Class #19 – Monday, November 3
CSE (c) S. Tanimoto, 2001 Search-Introduction
CSE (c) S. Tanimoto, 2002 State-Space Search
Graphplan/ SATPlan Chapter
Graphplan/ SATPlan Chapter
GraphPlan Jim Blythe.
CSE (c) S. Tanimoto, 2004 State-Space Search
Presentation transcript:

Introduction to Planning Dr. Shazzad Hosain Department of EECS North South Universtiy

2 Planning as Search Planning involves finding a plan which will enable a system (or a robot) to solve a problem, or carry out some task. A planner aims to find a plan, which is a sequence of actions. One method is to use search to identify a plan. A search tree contains nodes which represent states, with edges between nodes representing actions.

3 Planning as Search A robotic planning agent might have a state that is described by the following variables: Let, there are three rooms, room1, room2 and room3 There is a door from each room to each other The robot starts from room1 and cheese at room3 The robot’s goal is to find the cheese The actions the robot can take

4 Planning as Search Use a three-value vector to present current state (room robot is in, room cheese is in, is robot holding cheese?) The actions the robot can take  (1, 3, no) is the initial state  (3, 3, yes) is the goal state

5 Planning as Search In real world problems, many more states, and many actions The search tree even for a simple problem is prohibitively large Search always is not from the start state, it may start from goal state Search is not feasible for multiple independent goals Buy some eggs, feed the cat, and get little Johnny a haircut Each of the three goals can be solved separately not consecutively Some cases order of the goal is important Feed the cat, and wash the cat’s bowl Put food into cat’s bowl and then wash it immediately without waiting for the cat to eat 8 puzzle problem, if you move a tile to a square other tiles will also move, i.e. Situation changes

6 Situation Calculus (1) An extension of FOPC (First Order Predicate Calculus). For example: S 1 is a situation variable. The above statement tells us that in situation S 1 the robot is in the same room as the cheese. This notation, unlike FOPC, allows us to describe things that change over time.

7 Situation Calculus (2) Not all object change over time. We can use standard predicates without a situation variable. The Result function allows us to describe the result of carrying out actions: This states that if in situation S 1 the planner carried out the action Move 1,2 it will be in situation S 2 An effect axiom describes the effect of carrying out an action. For example:

8 The Frame Problem (1) An effect axiom does not specify what does not change when an action is taken. Determining what stays the same is the frame problem. This can be difficult – usually there are very many things that do not change when an action is taken. Frame axioms specify things that do not change. For example:  y, s In (Robot, y, s)  In (Robot, y, Result (Take, s)) This states that if the robot is in room y and it takes an object then it will still be in room y.

9 The Frame Problem (2) Even in a simple problem, a planner can need an enormous number of frame axioms. This is the representational frame problem. One way to solve this problem is to combine frame axioms and effect axioms into successor state axioms such as:

10 Means-Ends Analysis Means-ends analysis involves examining the differences between the current state and the goal state. Actions are selected that minimize these differences. The planner can select an action even if it is not currently possible. It must then select another action that will make the first action possible.

11 The Blocks World Many planning systems can be illustrated using the blocks world. The blocks world consists of a number of blocks and a table. The blocks can be picked up and moved around. The following shows the start and goal states of a simple problem: Start stateGoal state

12 The Blocks World Using means-ends analysis, planner considers the difference Planner now considers the following two possible actions Start stateGoal state

13 The Blocks World Planner now considers the following two possible actions Planner might start with action 2 and the goal state are now Planner’s next action might be to place block a on the table Start state

14 The Blocks World However, the robot is not holding block b, so we have the following new goal state So, carry out the following action Thus the sequence of actions can be Start state

Planning Methods: STRIPS Stanford Research Institute Problem Solver (STRIPS)

16 STRIPS (1) Stanford Research Institute Problem Solver. An operator based planning system that uses means-ends analysis. STRIPS uses wffs in FOPC to describe the world. For example: States that if an object is in one location then it cannot be in another. Here, x and y are physical coordinates i.e. x = (1,1) etc. STRIPS was designed to enable a planner to devise plans for a robot which is to solve problems in the blocks world.

17 Planning and Executing Let, operator Push (o, x, y) enables the robot to push object o from location x to location y There is difference between operator Push and actually carrying out of the act of pushing Pushing might need to go the robot to location x, take the object o, move to location y, put o at y. This is the difference between planning and executing So, a plan can be a sequence of operators If carrying out a action of an operator has unexpected result, then plan may not succeed. Robot might need to change plan or so.

18 Operators STRIPS defines operators as in the following operator schema for operator Push(o, x, y): The preconditions specify what must be true for the operator to be applied. The delete and add lists specify the changes that will take place after the operator is applied.

Operators A real action is an instance of the schema, in which variables are instantiated with actual object Let push object o 1 from position (2,3) to position (1,4) If the world model can instantiate the preconditions of a particular operator, then we say the operator is applicable. The goal state is also described by a set of wffs. If the planner can reach this goal state, it has successfully solved the problem and is ready to execute the plan.

20 STRIPS Implementation STRIPS uses resolution and means-ends analysis to devise plans: The goal is negated, and the rule schemata are instantiated with objects from the real world. If the resolution fails, then the goal has been achieved. Otherwise, a plan must be devised.

21 STRIPS Example Also, let So, the goal is: Start state Goal state

22 STRIPS Example We also have two operators described as the following schema Start state Goal state

23 STRIPS Example Forward Chaining Search through the whole space until goal found From initial state, three operators we could apply Start state Goal state Suppose we choose to apply that has precondition

24 STRIPS Example Forward Chaining Start state Goal state Hence, state description becomes From this position, we can apply any of the following operators: Did not use means-end analysis

25 STRIPS Example Means-ends analysis Start state Goal state Start noticing the difference between star and goal state To reduce the difference apply MoveOnto (c,a), no matter that c is movable of not Operator MoveOntoTable (b) has the desired effect of clearing c. So using backward chaining, identify steps that could lead to the goal. MoveOnto (b,a), also clears c, but makes the problem harder, resulting in backtracking.

26 STRIPS Example Resolution Let take a different example A robot start at position x, take two objects a and b together, where a in position y and b in position z Assumptions Two objects are together when they are both at the same position Robot can push two objects together

27 STRIPS Example Resolution

28 STRIPS Example Resolution Rectify the difference b is not at location y, but in location z STRIPS will try to apply operator Push (b, z, y)

29 STRIPS Example Resolution Rectify the difference b is not at location y, but in location z STRIPS will try to apply operator Push (b, z, y) Try to meet preconditions of Push operator

30 STRIPS Example Resolution Rectify the difference r is at location x, but in needs to go at location z Then operator Push (b, z, y) will be successful Hence the Go (x, z) operator is attempted Process continues and a set of operators are found

The Sussman Anomaly STRIPS approach would start by either Moving b onto the table, then placing c on a Or moving a on top of b without removing b from c In either cases, undo the first move Start sateGoal sate

32 Partial Order Planning (1) A total order plan specifies the order in which all actions must be carried out. A partial order plan can specify some actions in parallel – these actions can be carried out in any order relative to each other. Start stateGoal state Total order planPartial order plan

33 Problems in Partial Order Planning One action might undo the effects of another action, in which case order of actions is important. Let, x is in precondition list of Op3, and x is in add list of Op1 Unfortunately x is in delete list of Op2 If after Op1, Op2 is executed, Op3 can not be executed. Demote Promote

34 In building a plan there will be some variables and objects that can be ignored, as they are superfluous to the goal of the plan. For example, there is a block e on the table that might be used in forward chaining. However, it does not need to be instantiated This is the Principle of Least Commitment. The Principle of Least Commitment Start state Goal state

Planning Methods: Planning Graphs

36 Planning Graphs Even-numbered levels represent states. Odds are actions. All possible actions are shown in the graph. Initial state Goal state

37 Planning Graphs Initial state Goal state Persistence actions: Propositions that do not change as a result of a given action. Shown as an arrow with a clear box on it. Mutual Exclusoin or Mutexes: Actions that are mutually exclusive Shown as heavy black lines

38 Actions that have inconsistent effects. MoveOnto (A, B) and MoveOntoTable(A) are mutex, because one has the effect of adding On (A, B) and the other adds On (A, Table) Effect of one action interferes with the precondition of another. MoveOnto(A, B) deletes Clear (B), while MvoeOnto(B, A) has the precondition Clear (B) One action has P as precondition, and the other has as precondition ¬P Mutex Conditions Initial state Goal state

39 Planning Graphs The planning graph for even a simple problem can be extremely complex. By producing a complete planning graph for a problem, it can be determined whether a plan is possible, and the plan itself can also be derived. Algorithms such as GraphPlan can be used to extract the plan.

40 GraphPlan Problems are expressed in STRIPS notation. GraphPlan iteratively builds a planning graph, starting from the initial state and working towards the goal state. All applicable operators are applied at each level to produce the next level. When the propositions necessary for the goal are included in the current level, and they are not mutex, a possible solution may have been reached. A plan is found by backtracking from final level and including operators that are not mutex and that provide all of the conditions required at each level. The GraphPlan produces a partial order plan.

References Chapter 15, 16 of “AI Illuminated” by Ben Coppin.