700 likes | 879 Views
Planning History and Overview. Susanne Biundo University of Ulm Germany. Artificial Intelligence Planning I. The field of AI Planning and Scheduling is concerned with all aspects of the system-supported synthesis and execution of plans of action.
E N D
Planning History and Overview Susanne Biundo University of Ulm Germany
Artificial Intelligence Planning I The field of AI Planning and Scheduling is concerned with all aspects of the system-supported synthesis and execution of plans of action The history of the field dates back to 1967, when Cordell Green presented the first approach. Summer School 2002, S. Biundo
Artificial Intelligence Planning II General aim Enable intelligent goal-directed behaviour states Basic entities plans actions goals Summer School 2002, S. Biundo
Actions I Actions perform state changes • actions as to be executed by autonomous systems or virtual agents system control Summer School 2002, S. Biundo
Actions II • activities as to be pursued in business and production processes process control production of physical goods workflow management Summer School 2002, S. Biundo
Actions III • tasks as to be performed in management and organisation processes mission planning project planning Summer School 2002, S. Biundo
Artificial Intelligence Planning The field of AI Planning and Scheduling is concerned with all aspects of the system-supported synthesis and executionof plans They range over a variety of functions Summer School 2002, S. Biundo
Dealing with Plans • Synthesis of plans • plan generation • Inspection of plans • plan validation • plan verification • Modification of plans • plan repair • plan merging • Scheduling fully automated interactive Summer School 2002, S. Biundo
States, Actions, and Plans states of the world goal state initial state a1 a2 an-1 an Plans Courses of actions “programs” actions Summer School 2002, S. Biundo
Planning initial state I goal state G operators O find a sequence of operator instances from O to transform I into G select appropriate actions arrange the actions consider causalities Scheduling a set of actions A a set of resources R a set of constraints C find an optimal schedule arrange the actions assign the resources satisfy the constraints such that the schedule is (close to) optimal Planning vs. Scheduling Summer School 2002, S. Biundo
Outline • Representations of planning domains • actions, states, and planning problems • Classical planning • state-space, plan-space, and graph-based approaches • Logic-based planning • satisfiability testing and deduction • Hierarchical planning • task decomposition and hybrid approaches • Applications • Historical remarks Summer School 2002, S. Biundo
Application Domain Characteristics • static vs. dynamic • finite vs. infinite • deterministic vs. non-deterministic • completely vs. partially observable • hierarchically structured vs. flat • instantaneous vs. durative actions • simple vs. complex plans • action sequences • “programs” • “policies” Summer School 2002, S. Biundo
Domain Modelling Requirements • state and operator descriptions • planning problems: initial and goal states, intermediate states • actions as elementary state transitions and elementary constituents of plans • resources (time, costs, material, personnel) • domainstructure • type of orderings on actions • plan structure Summer School 2002, S. Biundo
An Example Domain • Objects: trucks, locations, cargo (barrels, boxes) • Actions: move, load, unload loc4 loc3 loc2 loc1 Summer School 2002, S. Biundo
State Descriptions adapted from STRIPS (Fikes & Nilsson 1971) • first-order language comprising • a finite set of predicate symbols, like {At, On, Colour, ...}, with arities • a finite set of constant symbols, like {loc1, loc2,...,truck, ba1, ...} • an enumerable set of variable symbols, like {x, l, t, ...} • connectives , • states are represented by sets (conjunctions) of ground literals Summer School 2002, S. Biundo
States • states are interpretations • they assign truth values to ground atoms and ground formulae according to • I= iff () true, if atomic • I= iff not I= • I= 1&2 iff I= 1 and I= 2 Summer School 2002, S. Biundo
Operator Descriptions • Operators have three components • an operatorsymbol oO (name) of arity n and a list of terms t1, ..., tn (arguments), which occur in the preconditions and effects of the operator • a set (conjunction) of literals prec(o), the preconditions of the operator • a set (conjunction) of literals eff(o), the effects of the operator Summer School 2002, S. Biundo
Operator Application I • effects of operators are often described by two disjoint sets • add(o) = {l | leff(o) , l atom} (add list) • del(o) = {l | leff(o) } (delete list) • a set S of ground literals describes a set of states • a ground instance a of an operator, i.e. an action, is applicable to S iff • prec(a) S Summer School 2002, S. Biundo
Operator Application II • the application of a to S results in a set of literals T = (S - del(a) - { l| ladd(a) }) eff(a) • T describes the set of possible successor states to S w.r.t a (T = succ (S, a)) • simplification • CWA : S contains only atoms • prec(a) contains only atoms • T = succ(S, a) = (S - del(a)) add(a), if prec(a) S Summer School 2002, S. Biundo
Planning Problems • a planning problem (plan specification) P = (init, goal, O) • init and goal : sets of literals describing the initial and goal states of the problem • O : set of operators • a sequence a1 ... am of operator ground instances (actions) is a plan iff • a1 is applicable to some state description S • ai is applicable to each state description resulting from the application of ai-1 (1 i m) to the resp. predecessor Summer School 2002, S. Biundo
Solutions to Planning Problems • a sequence a1 ... am of actions is a solution to a planning problem P = (init, goal, O) iff • a1 ... am is a plan • a1 is applicable to init • each goal-literal is in the successor state description of am • a1 ... am is a linear (total-order) plan Summer School 2002, S. Biundo
Semantic Properties • an action is sound iff there exist states ,' such that I= prec(a) and 'I= eff(a) • a sound action specifies a state transition • if an action a is applicable to a state description S and I= S for a state , then I= prec(a) • if I= S and a is applicable to S and T is the successor state description to S w.r.t. a, then there exists ' with 'I= T Summer School 2002, S. Biundo
Correctness of Plans • a plan that is a solution to a planning problem P = (init, goal, O) specifies a set of state transitions from each state satisfying init to a state satisfying goal • such a plan is correct w.r.t. the given problem (plan specification) Summer School 2002, S. Biundo
Example I State description At (truck, loc1), On (truck, b3), On(truck, b4) , ..., At (truck, loc1), At (b3, loc1), ..., At (b1, loc4), ..., Connected (loc1, loc2), ... b2 b1 c3 c2 loc4 b3 loc3 b4 c1 b5 loc2 loc1 Summer School 2002, S. Biundo
Example II Operator descriptions • move (t: truck, l1, l2 : location) prec: At (t, l1), Connected (l1, l2) add: At (t, l2) del: At (t, l1) • unload (t: truck , l: location, c: cargo) prec: At (t, l), On (t, c) add: At (c, l) del: On (t, c) • load (t: truck, ...) prec: ... Summer School 2002, S. Biundo
c1 loc3 Example III goal: At(c1, loc3) Planning Problem init: At (truck, loc1), On (truck, c1), .... ?? b2 b1 c3 c2 loc4 b3 b4 c1 loc3 b5 loc2 loc1 Summer School 2002, S. Biundo
c2 c3 plan loc1 Example IV b3 b4 b2 c1 b1 loc4 move (truck, loc1, loc2) ; move (truck, loc2, loc3) ; unload (truck, loc3, c1) loc3 b5 loc2 b2 b1 c2 c3 loc4 loc3 b3 c1 b4 b5 loc2 loc1 Summer School 2002, S. Biundo
How to find a plan • state-space search • search space subset of state space • nodes states • edges actions • find a path from the initial state to a goal state Summer School 2002, S. Biundo
Forward Search progression-planning (init, goal, O) S : init p : repeat if goal S thenreturnp A : { a | prec(a) S and a ground instance of some o O} if A = thenfail choose a A S : succ (S, a) p : p;a Summer School 2002, S. Biundo
Backward Search regression-planning (init, goal, O) S : goal p : repeat if S init thenreturnp A : { a | (eff(a) S) and a ground instance of some o O} if A = thenfail choose a A S : wp (S, a) = (S - eff(a)) eff(a) p : a;p Summer School 2002, S. Biundo
Guiding the Search How to implement efficient planning procedures ? reduction of the search space structuring the search space goal-directed procedures strategies heuristics encodings Summer School 2002, S. Biundo
Example Strategy island search means ends analysis STRIPS - Algorithm (Fikes & Nilsson 1971) • select a goal • achieve the goal from initial state • compute new initial state • select next goal • repeat until all goals achieved i i’ g Summer School 2002, S. Biundo
How to find a plan • plan-space search • search space space of partial plans • nodes partial plans • edges plan refinement operations • find a completeand consistent non-linearplan that leads from the initial state to a goal state Summer School 2002, S. Biundo
c Non-linear Plans I np = (PlanSteps, OrderingConstraints, CausalLinks, VariableBindings, ...) • PlanSteps : a set of labeled operations • OrderingConstraints : a partial order on PlanSteps • CausalLinks : a set of causal relations between plan steps (psi psj) : psiestablishes the precondition c of psj • VariableBindings : x t, x variable, t term Summer School 2002, S. Biundo
Non-linear Plans II a non-linear plan np solves a planning problem P = (init, goal, O) iff np is a complete and consistent refinement of the initial plan ({ps, ps}, {(ps < ps)}, , ) ps and ps are fictive plan steps with eff(ps) = init prec(ps) = goal Summer School 2002, S. Biundo
Non-linear Plans III • np is complete iff • each precondition of each plan step is established by a plan step • each linearisation of np is safe, i.e. no step psk with c del(psk) can occur between psi and psj, if psi establishes a precondition c of psj • np is consistent iff • its ordering constraints are consistent, i.e. if psi < psj then not psj < psi • its variable bindings are consistent, i.e. if x A then not x B, if A B Summer School 2002, S. Biundo
Example At(c1, loc3) At(b5, loc4) ps At (truck, loc1) On (truck, c1) At (b5, loc2) ps Summer School 2002, S. Biundo
At (c1, loc3) unload(c1, loc3) On (truck, c1) unload(b5, loc4) Example At (truck, loc3) ps1 At(c1, loc3) At(b5, loc4) ps At (b5, loc4) At (truck, loc1) On (truck, c1) ps2 At (truck, loc4) At (b5, loc2) ps On (truck, b5) Summer School 2002, S. Biundo
At (truck, loc3) At (c1, loc3) At (truck, loc3) unload(c1, loc3) On (truck, c1) unload(b5, loc4) move(truck, loc2, loc3) Example ps1 ps3 At(c1, loc3) At(b5, loc4) At (truck, loc2) ps At (b5, loc4) At (truck, loc1) On (truck, c1) ps2 At (truck, loc4) At (b5, loc2) ps On (truck, b5) Summer School 2002, S. Biundo
At (truck, loc3) At (c1, loc3) At (truck, loc3) At (truck, loc2) unload(c1, loc3) move(truck, loc1, loc2) At (truck, loc2) On (truck, c1) At (truck, loc1) move(truck, loc2, loc3) Example ps1 ps2 At(c1, loc3) At(b5, loc4) ps ps3 At (truck, loc1) On (truck, c1) At (b5, loc2) ps Summer School 2002, S. Biundo
At (truck, loc3) At (c1, loc3) At (truck, loc3) unload(c1, loc3) At (truck, loc2) On (truck, c1) ps3 unload(b5, loc4) move(truck, loc2, loc3) Example ps1 ps2 At(c1, loc3) At(b5, loc4) ps At (b5, loc4) At (truck, loc1) On (truck, c1) ps4 At (truck, loc4) At (b5, loc2) ps On (truck, b5) Summer School 2002, S. Biundo
At (truck, loc3) At (c1, loc3) At (truck, loc3) At (truck, loc4) unload(c1, loc3) move(truck, loc3, loc4) At (truck, loc2) On (truck, c1) At (truck, loc3) ps3 unload(b5, loc4) move(truck, loc2, loc3) Example ps1 ps2 At(c1, loc3) At(b5, loc4) ps5 ps At (b5, loc4) At (truck, loc1) On (truck, c1) ps4 At (truck, loc4) At (b5, loc2) ps On (truck, b5) Summer School 2002, S. Biundo
At (truck, loc3) At (c1, loc3) At (truck, loc3) At (truck, loc4) move(truck, loc3, loc4) At (truck, loc2) On (truck, c1) At (truck, loc3) ps3 unload(b5, loc4) move(truck, loc2, loc3) Example ps1 unload(c1, loc3) ps2 At(c1, loc3) At(b5, loc4) ps5 ps At (b5, loc4) At (truck, loc1) On (truck, c1) ps4 At (truck, loc4) At (b5, loc2) ps On (truck, b5) Summer School 2002, S. Biundo
c Partial-Order Causal-Link Planning SNLP - Algorithm (McAllister & Rosenblitt 1991) np : initial-plan(init, goal, O) pocl (np) if np inconsistent then return fail if np complete then return np if there is a causal link (psi psj) “threatened “ by a step psk , i.e. c del(psk) and psk possibly inbetween psi and psj then choose Promotion : return pocl (np (psk < psi )) Demotion : return pocl (np (psj < psk )) Summer School 2002, S. Biundo
c c c Partial-Order Causal-Link Planning ctd. choose psk and c prec(psk) where there is no causal link (psl psk)for some psl choose a. choose psm from np such that c eff(psm) return pocl (np (psm psk)) b. choose an operator o O and a variable instantiation such that c eff((o)) generate a new plan step psn from (o) np : insert (np, psn ) return pocl (np (psn psk)) Summer School 2002, S. Biundo
Least commitment w.r.t. variable instantiation Plan-space vs. State-space Planning • plan-space-based planning least commitment principle • generation of non-linear plans partial order on actions • least restricting variable bindings • step-wise plan refinement • state-space-based planning • generation of linear plans total order on actions • step-wise plan extension Summer School 2002, S. Biundo
How to find a plan • planning-graph construction • search space compact representation of • the state space • nodes atoms, actions • edges precondition-, add-, delete- relations • find a sequence of sets of actions that represent a complete and consistent non-linear plan leading from the initial state to a goal state Summer School 2002, S. Biundo
f0.1 f0.2 f0.3 f0.p 0 A 1 a1.k a1.1 a1.2 f1.1 f1.2 f1.3 f1.m F Planning-Graphs F0 : init Fn : goal Summer School 2002, S. Biundo
Graph Construction and Analysis I GRAPHPLAN (Blum & Furst 1995) two phases • construction of the planning graph : forward search • generate successive layers of the planning graph, starting from the initial state, until a layer n is reached, which contains the goals • analysis of the planning graph : backward search • construction of a plan Summer School 2002, S. Biundo
Graph Construction and Analysis II • collect in layer n a set of non-mutex actions that achieve the goals • collect in each layer i a set of independent actions that establish the preconditions of actions collected in layer i+1 (1 < i < n) • F0 (init) contains the preconditions of actions collected in layer 1 • two actions are mutual exclusive (mutex) iff they interact or their preconditions are mutex, i.e. are established by non-mutex actions Summer School 2002, S. Biundo