53a3eddca64c2020e5115d9b89c2655e.ppt
- Количество слайдов: 62
Introduction to Robot Planning Slides modified from Dana S. Nau University of Maryland
Some Dictionary Definitions of “Plan” plan n. 1. A scheme, program, or method worked out beforehand for the accomplishment of an objective: a plan of attack. 2. A proposed or tentative project or course of action: had no plans for the evening. 3. A systematic arrangement of elements or important parts; a configuration or outline: a seating plan; the plan of a story. 4. A drawing or diagram made to scale showing the structure or arrangement of something. 5. A program or policy stipulating a service or benefit: a pension plan.
plan n. 1. A scheme, program, or method worked out beforehand for the accomplishment of an objective: a plan of attack.
plan n. 2. A proposed or tentative project or course of action: had no plans for the evening. Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-Non. Commercial-Share. Alike License: http: //creativecommons. org/licenses/by-nc-sa/2. 0/
plan n. 3. A systematic arrangement of elements or important parts; a configuration or outline: a seating plan; the plan of a story. Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-Non. Commercial-Share. Alike License: http: //creativecommons. org/licenses/by-nc-sa/2. 0/
plan n. 4. A drawing or diagram made to scale showing the structure or arrangement of something. Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-Non. Commercial-Share. Alike License: http: //creativecommons. org/licenses/by-nc-sa/2. 0/
plan n. 5. A program or policy stipulating a service or benefit: a pension plan.
Some Dictionary Definitions of “Plan” plan n. 1. A scheme, program, or method worked out beforehand for the accomplishment of an objective: a plan of attack. 2. A proposed or tentative project or course of action: had no plans for the evening. • These two are closest to the meaning used in AI 3. A systematic arrangement of elements or important parts; a configuration or outline: a seating plan; the plan of a story. 4. A drawing or diagram made to scale showing the structure or arrangement of something. 5. A program or policy stipulating a service or benefit: a pension plan.
[a representation] of future behavior … usually a set of actions, with temporal and other constraints on them, for execution by some agent or agents. - Austin Tate [MIT Encyclopedia of the Cognitive Sciences, 1999] A portion of a manufacturing process plan Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-Non. Commercial-Share. Alike License: http: //creativecommons. org/licenses/by-nc-sa/2. 0/
Generating Plans of Action • Computer programs to aid human planners – Project management (consumer software) – Plan storage and retrieval • e. g. , variant process planning in manufacturing – Automatic schedule generation • various OR and AI techniques • For some problems, we would like generate plans (or pieces of plans) automatically – Much more difficult – Automated-planning research is starting to pay off • Here are some examples …
Space Exploration • Autonomous planning, scheduling, control – NASA: JPL and Ames • Remote Agent Experiment (RAX) – Deep Space 1 • Mars Exploration Rover (MER) Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-Non. Commercial-Share. Alike License: http: //creativecommons. org/licenses/by-nc-sa/2. 0/
Manufacturing • Sheet-metal bending machines - Amada Corporation – Software to plan the sequence of bends [Gupta and Bourne, J. Manufacturing Sci. and Engr. , 1999] Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-Non. Commercial-Share. Alike License: http: //creativecommons. org/licenses/by-nc-sa/2. 0/
Games • Bridge Baron - Great Game Products – 1997 world champion of computer bridge [Smith, Nau, and Throop, AI Magazine, 1998] – 2004: 2 nd place Us: East declarer, West dummy Finesse(P 1; S) Lead. Low(P 1; S) Play. Card(P 1; S, R 1) Opponents: defenders, South & North Contract: East – 3 NT On lead: West at trick 3 East: KJ 74 West: A 2 Out: QT 98653 Finesse. Two(P ; S) 2 Easy. Finesse(P 2; S) West— 2 Standard. Finesse(P 2; S) … … (North— Q) Standard. Finesse. Two(P 2; S) Play. Card(P 2; S, R 2) Busted. Finesse(P 2; S) (North— 3) Standard. Finesse. Three(P 3; S) Play. Card(P 3; S, R 3) Play. Card(P 4; S, R 4) Finesse. Four(P 4; S) Play. Card(P 4; S, R 4’) Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-Non. Commercial-Share. Alike License: http: //creativecommons. org/licenses/by-nc-sa/2. 0/ North— 3 East— J South— 5 South— Q
Outline of lecture • • Conceptual model for planning Example planning algorithms What’s bad What’s good
Conceptual model for planning
Conceptual Model 1. Environment System State transition system = (S, A, E, ) S = {states} A = {actions} E = {exogenous events} = state-transition function
State Transition System = (S, A, E, ) • • S = {states} A = {actions} E = {exogenous events} State-transition function : S x (A E) 2 S – S = {s 0, …, s 5} – A = {move 1, move 2, put, take, load, unload} – E = {} – : see the arrows s 1 s 0 put take location 1 move 2 move 1 location 2 move 1 s 3 s 2 put take location 1 unload location 2 location 1 location 2 load s 4 s 5 move 2 move 1 location 2 location 1 location 2 The Dock Worker Robots (DWR) domain
Conceptual Model 2. Controller Observation function h: S O s 3 location 1 location 2 Given observation o in O, produces action a in A
Conceptual Model Planning problem 3. Planner’s Input Planner Omit unless planning is online
Planning Problem Description of Initial state or set of states Initial state = s 0 Objective Goal state, set of goal states, set of tasks, “trajectory” of states, objective function, … Goal state = s 5 s 1 s 0 put take location 1 move 2 move 1 location 2 move 1 s 3 s 2 put take location 1 unload location 2 location 1 location 2 load s 4 s 5 move 2 move 1 location 2 location 1 location 2 The Dock Worker Robots (DWR) domain
Conceptual Model 4. Planner’s Output Planner Instructions to the controller
Plans Classical plan: a sequence of actions take, move 1, load, move 2 s 1 put take location 1 move 2 location 1 move 2 location 2 move 1 s 3 s 2 put Policy: partial function from S into A {(s 0, take), (s 1, move 1), (s 3, load), (s 4, move 2)} s 0 take location 1 unload location 2 location 1 location 2 load s 4 s 5 move 2 move 1 location 2 location 1 location 2 The Dock Worker Robots (DWR) domain
Planning Versus Scheduling • Scheduling – Decide when and how to perform a given set of actions • Time constraints • Resource constraints • Objective functions Scheduler – Typically NP-complete • Planning – Decide what actions to use to achieve some set of objectives – Can be much worse than NP-complete; – worst case is undecidable
Three Main Types of Planners 1. Domain-specific 2. Domain-independent 3. Configurable • I’ll talk briefly about each
Domain-Specific Planners
1. Domain-Specific Planners • Made or tuned for a specific domain • Won’t work well (if at all) in any other domain • Most successful real-world planning systems work this way
Domain-Independent Planners
Types of Planners 2. Domain-Independent • In principle, a domainindependent planner works in any planning domain • Uses no domain-specific knowledge except the definitions of the basic actions
Types of Planners 2. Domain-Independent • In practice, – Not feasible to develop domain-independent planners that work in every possible domain • Make simplifying assumptions to restrict the set of domains – Classical planning – Historical focus of most automated-planning research Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-Non. Commercial-Share. Alike License: http: //creativecommons. org/licenses/by-nc-sa/2. 0/
Restrictive Assumptions for planners • • A 0: Finite system: – finitely many states, actions, events A 1: Fully observable: – the controller always ’s current state A 2: Deterministic: – each action has only one outcome A 3: Static (no exogenous events): – no changes but the controller’s actions A 4: Attainment goals: – a set of goal states Sg A 5: Sequential plans: – a plan is a linearly ordered sequence of actions (a 1, a 2, … an) A 6: Implicit time: – no time durations; linear sequence of instantaneous states A 7: Off-line planning: – planner doesn’t know the execution status
Classical Planning • Classical planning requires all eight restrictive assumptions – Offline generation of action sequences for a deterministic, static, finite system, with complete knowledge, attainment goals, and implicit time • Reduces to the following problem: – Given ( , s 0, Sg) – Find a sequence of actions (a 1, a 2, … an) that produces a sequence of state transitions (s 1, s 2, …, sn) such that sn is in Sg. • This is just path-searching in a graph – Nodes = states – Edges = actions • Is this trivial?
Classical Planning: how to search extremely large spaces? s 1 • Generalize the earlier example: – Five locations, three robot carts, 100 containers, three piles • Then there are 10277 states • Number of particles in the universe is only about 1087 put take location 1 location 2 move 1 – The example is more than 10190 times as large! • Automated-planning research has been heavily dominated by classical planning – Dozens (hundreds? ) of different algorithms – I’ll briefly describe a few of the best-known ones
c a Plan-Space Planning b 1. Decompose sets of goals into the individual goals 2. Plan for them separately Start clear(x), with x = a unstack(x, a) clear(b), handempty clear(a) putdown(x) pickup(b) handempty pickup(a) holding(a) stack(b, c) For classical planning, not used much any more A temporal-planning extension was used in the Mars rovers – Bookkeeping info to detect and resolve interactions clear(b) stack(a, b) on(b, c) a b c Goal: on(a, b) & on(b, c)
Level 0 Literals in s 0 c a b Level 1 All actions applicable to s 0 All effects of those actions unstack(c, a) pickup(b) Planning Graphs Level 2 no-op • Relaxed problem [Blum & Furst, 1995] • Apply all applicable actions at once • Next “level” contains all the effects of all of those actions All actions applicable to subsets of Level 1 All effects of those actions unstack(c, a) pickup(b) c b pickup(a) stack(b, c) c a b stack(b, a) • • • putdown(b) stack(c, b) c a stack(c, a) putdown(c) no-op Breadth first
Graphplan 1. 2. 3. 4. Planning graph State space search N-levels Many ideas can be derived
Level 0 Literals in s 0 c a b Level 1 All actions applicable to s 0 Level 2 All effects of those actions unstack(c, a) Graphplan pickup(b) no-op • For n = 1, 2, … – Make planning graph of n levels (polynomial time) – State-space search within the planning graph • Graphplan’s many children – IPP, CGP, DGP, LGP, PGP, SGP, TGP, … All actions applicable to subsets of Level 1 All effects of those actions unstack(c, a) pickup(b) c b pickup(a) stack(b, c) c a b stack(b, a) putdown(b) stack(c, b) c a stack(c, a) putdown(c) no-op • • •
Level 0 Literals in s 0 c a b Level 1 All actions applicable to s 0 Level 2 All effects of those actions unstack(c, a) Graphplan pickup(b) no-op pickup(a) stack(b, c) b a b stack(b, a) putdown(b) stack(c, b) • Graphplan’s many children – IPP, CGP, DGP, LGP, PGP, SGP, TGP, … pickup(b) c c a – Make planning graph of n levels (polynomial time) – State-space search within the planning graph All effects of those actions unstack(c, a) b • For n = 1, 2, … All actions applicable to subsets of Level 1 c a stack(c, a) putdown(c) Running out of names no-op • • •
Heuristic Search • Can we do an A*-style heuristic search? • For many years, nobody could come up with a good h function – But planning graphs make it feasible • Can extract h from the planning graph • Problem: A* quickly runs out of memory – So do a greedy search • Greedy search can get trapped in local minima – Greedy search plus local search at local minima • HSP [Bonet & Geffner] • Fast. Forward [Hoffmann]
Translation of Planning Problem to Other Domains • Translate the planning problem or the planning graph into another kind of problem for which there are efficient solvers – Find a solution to that problem – Translate the solution back into a plan • Satisfiability solvers, especially those that use local search – Satplan and Blackbox [Kautz & Selman] • Integer programming solvers such as Cplex – [Vossen et al. ]
Configurable Planners
Types of Planners: 3. Configurable • Domain-independent planners are quite slow compared with domain-specific planners – Blocks world in linear time [Slaney and Thiébaux, A. I. , 2001] – Can get analogous results in many other domains • But we don’t want to write a whole new planner for every domain! • Configurable planners 1. Domain-independent planning engine 2. Input includes info about how to solve problems in the domain • Hierarchical Task Network (HTN) planning HTN • Planning with control formulas
Hierarchical Task Network planning Task: travel(x, y) Method: taxi-travel(x, y) get-taxi ride(x, y) pay-driver Method: air-travel(x, y) get-ticket(a(x), a(y)) travel(x, a(x)) • Problem reduction 1. Tasks (activities) rather than goals 2. Methods to decompose tasks into subtasks 3. Enforce constraints, backtrack if necessary • Real-world applications • Many special planners: – Noah, Nonlin, O-Plan, SIPE-2, SHOP 2 fly(a(x), a(y)) travel(a(y), y)
Task: travel(x, y) Method: taxi-travel(x, y) get-taxi ride(x, y) pay-driver Method: air-travel(x, y) get-ticket(a(x), a(y)) fly(a(x), a(y)) travel(a(y), y) travel(x, a(x)) travel(UMD, Toulouse) get-ticket(BWI, TLS) get-ticket(IAD, TLS) go-to-Orbitz find-flights(IAD, TLS) find-flights(BWI, TLS) buy-ticket(IAD, TLS) BACKTRACK travel(UMD, IAD) get-taxi ride(UMD, IAD) pay-driver fly(BWI, Toulouse) travel(TLS, LAAS) get-taxi ride(TLS, Toulouse) pay-driver Example of HTN Planning
Planning with Control Formulas a 1 = pickup(b) a 2 = pickup(c) c a b s 1, f 1 s 1 doesn’t satisfy f 1 s 2, f 2 s 0, f 0. . . a b c goal • At each state si we have a control formula fi in temporal logic “never pick up x from table unless x needs to be on another block” Control Formula • For each successor of s, derive a control formula using logical progression • Prune any successor state in which the progressed formula is false 1. TLPlan [Bacchus & Kabanza] 2. TALplanner [Kvarnstrom & Doherty]
Comparisons of domain-specific and domainindependent planners up-front human effort Domain-specific Configurable Domain-independent performance • Domain-specific planner – Write an entire computer program - lots of work – Lots of domain-specific performance improvements • Domain-independent planner – Just give it the basic actions - not much effort – Not very efficient
Comparisons of domain-specific and domainindependent planners coverage Configurable Domain-independent Domain-specific • A domain-specific planner only works in one domain • In principle, configurable and domain-independent planners should both be able to work in any domain • In practice, configurable planners work in a larger variety of domains 1. Partly due to efficiency 2. Partly due to expressive power
Examples of Planning Software Competitions 1. International Planning Competitions 1. 1998, 2000, 2002, 2004, 2006, 2008 2. All of them included domain-independent planners 2. The 2000 and 2002 competitions also included configurable planners 3. The configurable planners 1. 2. 3. 4. Solved the most problems Solved them the fastest Usually found better solutions Worked in non-classical planning domains that were beyond the scope of the domain-independent planners
configurable planners not longer in competitions… • IPC 2002 was the last planning competition to include configurable planners. • Two reasons for this: (1) It’s hard to enter them in the competition • Must write all the domain knowledge yourself • Too much trouble except to make a point • The authors of those planners felt they had already made their point (2) Cultural bias …
Cultural Bias in past and now • Most automated-planning researchers feel that using domain knowledge is “cheating” • Researchers in other fields have trouble comprehending this – Operations research, control theory, engineering, … – Why would anyone not want to use the knowledge they have about a problem they’re trying to solve? • In the past, the bias has been very useful – Without it, automated planning wouldn’t have grown into a separate field from its potential application areas • But it’s less useful now 1. 2. The field has matured The bias is too restrictive
Example of applications: • Typical characteristics of application domains: 1. 2. 3. 4. Dynamic world Multiple agents Imperfect/uncertain info External info sources • users, sensors, databases 5. Durations, time constraints, asynchronous actions 6. Numeric computations • geometry, probability, etc. • Classical planning excludes all of these North Q 9 A A J 7 K 9 6 5 5 3 West 6 East 2 Q 8 South Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-Non. Commercial-Share. Alike License: http: //creativecommons. org/licenses/by-nc-sa/2. 0/
Classical and non-classical planning domains • Classical planning research has produced some very powerful techniques for reducing the size of the search space • Some of these can be generalized to non-classical domains • Examples: 1. Plan-space planning was originally developed for classical planning 2. In the Mars rovers, it was extended for reasoning about time
Good ideas are implemented in AI planning algorithms • AI planning is gradually generalizing beyond classical planning • Example: the planning competitions – 1998, 2000: classical planning – 2002: added elementary notions of time durations, resources – 2004: added inference rules, derived effects, and a separate track for planning under uncertainty – 2006: added soft goals, trajectory constraints, preferences, plan metrics – 2008: new track for planners that can learn
Mars Rovers Planners are a good example Success in high-profile applications like the Mars rovers Creates excitement about building planners that work in the real world Provides opportunities for synergy between theory and practice Understanding real-world planning leads to better theories Better theories lead to better realworld planners
A running example: Dock Worker Robots
A running example: Dock Worker Robots • Generalization of the earlier example – A harbor with several locations • e. g. , docks, docked ships, storage areas, parking areas – Containers • going to/from ships – Robot carts • can move containers – Cranes • can load and unload containers
A running example: Dock Worker Robots • Locations: l 1, l 2, … • Containers: c 1, c 2, … – can be stacked in piles, loaded onto robots, or held by cranes • Piles: p 1, p 2, … – fixed areas where containers are stacked – pallet at the bottom of each pile • Robot carts: r 1, r 2, … – can move to adjacent locations – carry at most one container • Cranes: k 1, k 2, … – each belongs to a single location – move containers between piles and robots – if there is a pile at a location, there must also be a crane there
A running example: Dock Worker Robots • Fixed relations: same in all states adjacent(l, l’) attached(p, l) belong(k, l) • Dynamic relations: differ from one state to another occupied(l) at(r, l) loaded(r, c) unloaded(r) holding(k, c) empty(k) in(c, p) on(c, c’) top(c, p) top(pallet, p) • Actions: take(c, k, p) load(r, c, k) put(c, k, p) unload(r) move(r, l, l’)
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-Non. Commercial-Share. Alike License: http: //creativecommons. org/licenses/by-nc-sa/2. 0/
Any Questions? Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-Non. Commercial-Share. Alike License: http: //creativecommons. org/licenses/by-nc-sa/2. 0/
Lecture slides for Automated Planning: Theory and Practice SLIDES FROM Chapter 1 Introduction Dana S. Nau University of Maryland Fall 2009 Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-Non. Commercial-Share. Alike License: http: //creativecommons. org/licenses/by-nc-sa/2. 0/
• April 16. • Edison, Alan, Matthew, etc Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-Non. Commercial-Share. Alike License: http: //creativecommons. org/licenses/by-nc-sa/2. 0/
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-Non. Commercial-Share. Alike License: http: //creativecommons. org/licenses/by-nc-sa/2. 0/
53a3eddca64c2020e5115d9b89c2655e.ppt