92b56ae7213416c1215edf5f7f4ad7a6.ppt
- Количество слайдов: 19
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 a plan § Fill 3 litre § Pour 3 litre into 4 litre § Fill 3 litre … § The sequence of moves in a game is a plan Ø Why not apply same techniques for general planning? § Try going to the shop to buy milk and a light bulb § We need: § § § Initial situation Goal situation Actions that can be done + cost of action Constraints
Planning Initial situation: At home, no milk, broken bulb Read a book Take a nap Take another nap Eat bread Drink juice Make a Browse phone call the Web Go to Uni Go to friend Go out the door Go to beach Go to food shop Go to clothes shop
Planning Ø Why not apply same techniques for general planning? § Try going to the shop to buy milk and light bulb § We need: § § § Ø Initial situation Goal situation Actions that can be done + cost of action Constraints Problem is not tightly constrained (like jugs, or game) § too many silly (irrelevant) actions § We know they’re silly because of commonsense Ø Solution (3 parts):
Planning ØSolution: 1. Represent states, actions with logic sentences § Start state is not just a node, but a description § (NOT have(milk)) AND (NOT have (light_bulb)) AND my_location(home) § Same for goal state § Action is not node to node, where node is complete state § buy(X) achieves have(X) § Action does not affect other aspects 2. Allow planner to add actions in any order § § Not necessary to work from the top, searching E. g. add subgoal “buy(milk)” before leaving house Do important or obvious parts first Note: state representation important here 3. Divide and conquer § Most things in the world are independent § Can solve subgoals separately (compare with jugs/games)
STRIPS Planning (STRIPS = Stanford Research Institute Problem Solver) Ø Initial state: § (NOT have(milk)) AND (NOT have (light_bulb)) AND my_location(home) Ø Goal state: § have(milk) AND have (light_bulb) AND my_location(home) Ø Actions: STRIPS operators Op § Example: go(X) § Precondition § Must be true before action can be performed § Example: my_location(Y) AND path (Y, X) § Effect § How action changes state, ADD facts and DELETE facts § Example: ADD: my_location(X) – DELETE: my_location(Y)
STRIPS Planning (STRIPS = Stanford Research Institute Problem Solver) my_location(home) AND path (home, food_shop) my_location(Y) AND path (Y, X) go(food_shop) go(X) ADD: my_location(food_shop) DELETE: my_location(home) ADD: my_location(X) DELETE: my_location(Y)
How to Search for a Plan? Ø We could search forward from our initial state § We saw that this would search loads of silly actions Ø We could search backwards from our goal state § Works better, but still searching silly actions Ø No heuristic to find actions that get closer to initial state § Need a heuristic… Ø Means-ends analysis § § Find actions that reduce the difference between initial and goal states Newell and Simon’s General Problem Solver Generates heuristics from a table “Table of differences” § identifies operators (actions) to reduce types of differences § Needs a lot of human input
“I want to take my son to nursery school. What’s the difference between what I have and what I want? One of distance. What changes distance? My automobile doesn’t work. What is needed to make it work? A new battery. What has new batteries? An auto repair shop. I want the repair shop to put in a new battery; but the shop doesn’t know I need one. What is the difficulty? One of communication. What allows communication? A telephone. . . ” Newell & Simon " Human Problem Solving" 1972.
How to Search for a Plan? Ø Modern Approach: Search space of plans, not states § Nodes can be partial bits of plans § Search what action to add § Backtrack if stuck Ø Least commitment § Leave choices to be worked out later if possible § Variable values § e. g. shop: buy(milk, X) § Partial Ordering § e. g. socks example Ø What is a plan? § Actions you will take go(X) § Fix variable values in a step § Ordering among actions § Causal links go(Y) X= food_shop go(X) before go(Y) go(X) causes buy(milk, X) Y= hardware_shop
Start Left Sock Right Sock Left Shoe Right Shoe Finish
How to Search for a Plan? go(X) go(Y) Y= hardware_shop go(X) causes buy(milk, X) X= food_shop go(X) go(Y) go(X) causes buy(milk, X) Y= hardware_shop X= food_shop go(X) before go(Y)
How to Search for a Plan? INITIAL STATE: (NOT have(milk)) (NOT have (light_bulb)) my_location(home) my_location(food_shop) Black arrow indicates Causal Link (this implies 1. Causal link protected and 2. Ordering in this way too) buy(milk) GOAL: have(milk) have (light_bulb) my_location(home)
How to Search for a Plan? INITIAL STATE: (NOT have(milk)) (NOT have (light_bulb)) my_location(home) go(home, food_shop) my_location(food_shop) buy(milk) clash go(home, hardware_shop) my_location(hardware_shop) buy(bulb) GOAL: have(milk) have (light_bulb) my_location(home)
How to Search for a Plan? INITIAL STATE: (NOT have(milk)) (NOT have (light_bulb)) my_location(home) Try a different way to achieve my_location(hardware_shop) my_location(food_shop) my_location(home) go(home, food_shop) my_location(food_shop) buy(milk) go(food_shop, hardware_shop) my_location(hardware_shop) buy(bulb) GOAL: have(milk) have (light_bulb) my_location(home)
How to Search for a Plan? INITIAL STATE: (NOT have(milk)) (NOT have (light_bulb)) my_location(home) my_location(food_shop) my_location(home) go(food_shop, hardware_shop) go(home, food_shop) ! h as Cl my_location(food_shop) buy(milk) my_location(hardware_shop) buy(bulb) GOAL: have(milk) have (light_bulb) my_location(home)
How to Search for a Plan? INITIAL STATE: (NOT have(milk)) (NOT have (light_bulb)) my_location(home) my_location(food_shop) my_location(home) go(home, food_shop) go(food_shop, hardware_shop) my_location(food_shop) buy(milk) Red arrow indicates Ordering buy(bulb) GOAL: have(milk) have (light_bulb) my_location(home)
How to Search for a Plan? INITIAL STATE: (NOT have(milk)) (NOT have (light_bulb)) my_location(home) my_location(food_shop) my_location(home) go(home, food_shop) go(food_shop, hardware_shop) my_location(food_shop) buy(milk) buy(bulb) go(hardware_shop, home) GOAL: have(milk) have (light_bulb) my_location(home)
Industrial Planners Ø Applications § Assembly, Integration, Verification of spacecraft (European Space Agency) § Space missions § Job Shop scheduling (Hitachi) Ø Other issues § Hierarchical § Top level: prepare booster, capsule, cargo, launch § Low level: insert nuts, fasten bolts § Conditional effects § Depends on state § Time § e. g. window when machine is available § Resources § Budget § Number of Workers § Number of machines / robots § Changing/uncertain world § Conditional planning § Action/execution monitoring
Planning – Recap… Ø Problem solving was already a type of planning § Why not use it for general planning? § Other way: What about general planning for problem solving? Ø Solution: 1. Represent states, actions with logic sentences 2. Allow planner to add actions in any order 3. Divide and conquer Ø Search… § Forwards, Backwards, Heuristic? Ø Search space of plans, not states § What is a plan? § § Actions you will take Fix variable values in a step Ordering among actions Causal links § Least commitment § § Variable values Partial Ordering Ø Real world planning: § Hierarchical, Conditional effects, Time, Resources, Changing/uncertain world


