Presentation is loading. Please wait.

Presentation is loading. Please wait.

Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.

Similar presentations


Presentation on theme: "Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11."— Presentation transcript:

1 Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11

2 CSE 471/598 by H. Liu2 Acting logically Problem-solving agents are able to plan ahead before acting (Part II). Knowledge-based agents can select actions based on explicit, logical representation of the current state and the effects of actions (Part III). We now build planning agents (Part IV). Plan - a sequence of actions Plans - actions from the initial to the goal state must deal with no plan or plan is infeasible

3 CSE 471/598 by H. Liu3 From problem solving to planning They are different in representing goals, states, and actions, and in ways of constructing action sequences. For a problem-solving agent, Actions - generate successor state descriptions State representations for successor generation, heuristic eval function, and goal testing Goals used in the goal test and the heuristic function

4 CSE 471/598 by H. Liu4 Problems with a search agent Too many actions and too many states to consider Heuristic functions can only choose among states and can’t eliminate actions from consideration; so which action should be taken? Agent is forced to consider actions starting from the initial state.

5 CSE 471/598 by H. Liu5 Solutions to the problems Open up the representation of states, goals, actions States and goals are represented by sets of sentences; actions by logical descriptions of preconditions and effects => direct connections between states and actions. A planner is free to add actions to the plan wherever they are needed So it can make obvious and important decisions first, others later Most parts of the world are independent of each other (nearly decomposable) => so we can solve it independently (Divide & Conquer)

6 CSE 471/598 by H. Liu6 Classical planning environments Fully observable Deterministic outcome Finite steps Static (change happens only due to action) Discrete in time, action, objects, and effects Non-classical planning to be discussed in Chapter 12.

7 CSE 471/598 by H. Liu7 Basic representations STRIPS language for efficient planning States are conjunctions of function-free ground literals At(P1,JFK)^At(P2,SFO)^Plane(P1)^Plane(P2)^... Goals are conjunctions of literals, can contain variables  At(C1,JFK)^At(C2,SFO) Implicit representations of states in planning - only changes are tracked. Actions in STRIPS have three components: action, precondition, and effect

8 CSE 471/598 by H. Liu8 Planning in STRIPS language Action(Fly(p, from, to), PRECOND:At(p,from)^Plane(p)^Airport(from)^Airport(to) EFFECT:!At(p,from)^At(p,to)) The above is an action schema An action schema consists of 3 parts Action name and parameter Precondition – a conjunction of function-free positive literals stating what must be true in a state before the action can be executed Effect – a conjunction of function-free literals describing how the state changes when the action is executed.

9 CSE 471/598 by H. Liu9 STRIPS (2) An action is applicable in any state that satisfies the precondition; else the action has no effect An example about applicable application At(P1,JFK)^At(P2,SFO)^Plane(P1)^Plane(P2) ^Airport(JFK)^Airport(SFO), Is the action Fly(P1,JFK,SFO) applicable? After Fly(P1,JFK,SFO), we have At(P1,SFO)^At(P2,SFO)^Plane(P1)^Plane(P2) ^Airport(JFK)^Airport(SFO), Is Fly(P1,JFK,SFO) applicable? STRIPS assumption: Every literal not mentioned in the effect remains unchanged The Frame problem is avoided The solution for a planning problem is a sequence of actions, starting in the initial state, results in a goal state

10 CSE 471/598 by H. Liu10 Different planners Progression vs. regression planners Partial plans are incomplete plans We can have refinement or modification actions

11 CSE 471/598 by H. Liu11 Examples of STRIPS Problem Descriptions Air cargo transport (Fig 11.2) Initial state, Goal state, and Actions define an application The spare tire problem (Fig 11.3) Remove, PutOn, LeaveOvernight (a bad neighborhood) The blocks world (Fig 11.4) Table, blocks, move (b, x, y) STRIPS is insufficiently expressive for some real domains. Many language variants have been developed such as ADL (action description language) – See Fig 11.1 for a comparison.

12 CSE 471/598 by H. Liu12 Planning with State-Space Search Two approaches to search An example of Fly (Fig 11.5) Forward state-space search - progression planning  Start with the initial state, choose actions (how?), goal test Backward state-space search – regression planning  Starting with the goal state, applying only relevant actions  For actions that achieve some desired literal, the actions should not undo any desired literals (Consistency) Which one is more efficient in theory? Which one is better in practice?  The key is a good heuristic  or which one makes creating a good heuristic easier?

13 CSE 471/598 by H. Liu13 Planning order Types of order: partial and total An example of socks-shoes (Fig 11.6) Forward and backward state-space search are particular forms of totally ordered plan search – strictly linear sequences of actions Another flying example: from Tempe to Hawaii Least commitment - one should only make necessary choices Partial order is of least commitment Why is total order not good in practice? Linearization: from partial order to total order

14 CSE 471/598 by H. Liu14 Some definitions plan steps (actions) ordering constraints (A  B) variable binding constraints causal links (A  p B) – A achieves p for B; also called protection intervals  RightSock  RightsockOn RightShoe An action C conflicts with A  p B if C has !p and if C could come after A and before B

15 CSE 471/598 by H. Liu15 A plan is complete if every precondition of every step is achieved by some other step. A step achieves a condition if the condition is one of the effects of the step. The causal link to protect a precond A plan is consistent if there are no contradictions in the ordering or binding constraints. Ordering is transitive

16 CSE 471/598 by H. Liu16 Partial-order planning (POP) A POP planning example The simple flat tire problem description (Fig 11.7) Regression planning Start Finish  Causal links  Ordering constraints

17 CSE 471/598 by H. Liu17 Partial-order planning It’s nondeterministic It starts with a minimal partial plan. It satisfies one precond at a time. POP is a regression planner. POP is sound and complete.

18 CSE 471/598 by H. Liu18 Heuristics for POP and Beyond POP does not represent states directly, so it is harder to estimate how far a POP is from achieving a goal Heuristics are needed to choose which plan to refine Heuristic 1: to count the number of distinct open preconditions Heuristic 2: the most-constrained-variable Planning graph (a special data structure) to give better heuristic estimation - a sequence of levels that correspond to time steps in the plan GRAPHPLAN algorithm to extract a plan from a planning graph – revitalize the planning field in the late 90’s

19 CSE 471/598 by H. Liu19 Summary Planning uses more flexible representations of state, actions, goals, and plans STRIPS - a specific language that connects states to actions (action, precond, effect); there are other languages like ADL (action description lang) Search through the plan space - regression Least commitment: partial ordering & instantiation Causal links: protect rewriting & detect conflicts early


Download ppt "Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11."

Similar presentations


Ads by Google