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 CS 471/598 by H. Liu2 Acting logically zProblem-solving agents are able to plan ahead before acting (Part II). zKnowledge-based agents can select actions based on explicit, logical representation of the current state and the effects of actions (Part III). zWe now build planning agents (Part IV).

3 CS 471/598 by H. Liu3 A simple planning agent zAn algorithm (Fig 11.1, page 338) ycompared to the problem-solving agent in Fig 3.1 zPercepts zState zActions zGoal zPlan - a sequence of actions ymust deal with no plan or plan is infeasible

4 CS 471/598 by H. Liu4 From problem solving to planning zThey are different in representing goals, states, and actions, and in ways of constructing action sequences. zFor a problem-solving agent, yActions - generate successor state descriptions yState representations for successor generation, heuristic eval function, and goal testing yGoals used in the goal test and the heuristic function yPlans - actions from the initial to the goal state

5 CS 471/598 by H. Liu5 Example zGet milk and bananas and a drill yinitial state: agent is at home without the above yoperator set: all things agent can do yheuristic function: the things that haven’t yet been acquired zFig 11.2 - a small part of the first two levels of the search space

6 CS 471/598 by H. Liu6 Example (cont) zProblems with search agent yToo many actions and too many states to consider yHeuristic function can only choose among states and can’t eliminate actions from consideration; so which action should be taken? yAgent is forced to consider actions starting from the initial state.

7 CS 471/598 by H. Liu7 Solutions to the problems zOpen up the representation of states, goals, actions yStates and goals are represented by sets of sentences; actions by logical descriptions of preconditions and effects -> direct connections between states and actions. zPlanner is free to add actions to the plan wherever they are needed ySo it can make obvious and important decisions first, others later zMost parts of the world are independent of each other -> so we can solve it independently (Div&Conq)

8 CS 471/598 by H. Liu8 Planning in situation calculus zInitial state: At(H,S0)^!Have(M,S0)^!Have(B,S0)^!Have(D,S0) zGoal state: there exists s, At(H,s)^Have(M,s)^Have(B,s)^Have(D,s) zOperators: for all a, s Have(M,Result(a,s)) [(a=Buy(M)^At(SM,s) v (Have(M,s)^a!=Drop(M))] zDefinition of Result’(l,s) for sequence l yfor all s Result’([],s) = s yfor all a,p,s Result’([a|p],s)=Result’(p,Result(a,s))

9 CS 471/598 by H. Liu9 A solution to the shopping problem zIn order to achieve At(Home,Res’(p,S0))^Have(Milk,Res’(p,S0))^ Have(Bananas,Res’(p,S0))^Have(Drill,Res’(p,S0)) zWhat’s the plan p? Go(SupMar),Buy(Milk),Buy(Bananas),Go(Hardwere),Buy(Drill ),Go(Home) zWhat are the problems? yInefficient (unguided search) yIrrelevant steps [Nothing|p] and [A,A’|p]

10 CS 471/598 by H. Liu10 Basic representations zSTRIPS language for efficient planning yStates are conjunctions of function-free ground literals At(Home)^!Have(Milk)^!Have(Bananas)^!Have(Drill)^... yGoals are conjunctions of literals, contain variables xAt(Home)^Have(Milk)^… xAt(x)^Sells(x,Milk) yImplicit representations of states in planning - only changes are tracked. yOperators in SRIPS have three components: action, precondition, and effect

11 CS 471/598 by H. Liu11 STRIPS zA plan is a data structure of the following yplan steps (operators) yordering constraints (S i  S j ) yvariable binding constraints ycausal links (S i  c S j ) zAn example (Fig 11.3) represents Op(ACTION:Go(there),PRECOND:At(here)^Path(here,th ere),EFFECT:At(there)^!At(here)

12 CS 471/598 by H. Liu12 STRIPS (2) zOperator Schema - an operator with variables zApplicable operators - precond’s can be met zProgression vs. regression planners zPartial plans are incomplete plans zWe can have refinement or modification operators zA solution is a plan that can be executed to achieve the goal

13 CS 471/598 by H. Liu13 STRIPS (3) zAn example: RightShoeOn^LeftShoeOn yFig 11.4 zTypes of order: partial and total yLeast commitment - one should only make necessary choices yPartial order is of least commitment yLinearization: from partial to total order yWhy not total order? Fig 11.5

14 CS 471/598 by H. Liu14 zA plan is complete if every precondition of every step is achieved by some other step. yA step achieves a condition if the condition is one of the effects of the step. yThe need for promotion and demotion (Fig 11.10) yThe causal link to protect a precond zA plan is consistent if there are no contradictions in the ordering or binding constraints. yOrdering is transitive

15 CS 471/598 by H. Liu15 Partial-order planning (POP) zRevisit the shopping example yInitial state: Op(Action:Start,Effect:At(home)^Sells(HWS,Drill)^ Sells(SM,Milk),Sells(SM,Bananas)) yWe have Go and Buy actions Op(Action:Go(there),Precond:At(here),Effect:At(there)^!At(here)) Op(Action:Buy(x),Precond:At(store)^Sells(store,x),Effect:Have(x)) yGoal state: Op(Action:Finish,Precond:At(home)^Have(Drill)^ Have(Milk),Have(Bananas)) zLet’s plan...

16 CS 471/598 by H. Liu16 Partial-order planning (Algorithm) zAlgorithm - Fig 11.13 zIt’s nondeterministic zIt starts with a minimal partial plan. zIt satisfies one precond at a time. zPOP is a regression planner. zPOP is sound and complete.

17 CS 471/598 by H. Liu17 Partially instantiated operators zDealing with variable binding constraints yIs !At(x) a threat to the condition At(Home)? yIt’s a possible threat xResolve now with an equality constraint, At(HWS) xResolve now with an inequality constraint, x!=Home xResolve later => partially instantiated opererators yModified POP in Fig 11.14, p358 zFull instantiation of operators before returning a plan

18 CS 471/598 by H. Liu18 More examples on planning zThe blocks world yOn(b,x), Move(b,x,y), Clear(x) yOp(Action:Move(b,x,y), Precond:On(b,x)^Clear(b)^Clear(y), Effect:On(b,y)^Clear(x)^!On(b,x)^!Clear(y)) yWhat if y is a table? Clear(Table)? yOp(Action:MoveToTable(b,x), Precond:On(b,x)^Clear(b), Effect:On(b,Table)^Clear(x)^!On(b,x)) zShakey’s world (Fig 11.15) - the domain for STRIPS

19 CS 471/598 by H. Liu19 Summary zPlanning uses more flexible representations of state, actions, goals, and plans zSTRIPS - a specific language that connects states to actions (action, precond, effect) zSearch through the plan space - regression zLeast commitment: partial ordering & instantiation zCausal links: protect rewriting & detect conflicts early


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

Similar presentations


Ads by Google