160 likes | 169 Views
Introduction to plan-space (least-commitment) planning algorithm, emphasizing on partial plans and the resolution of threats and open conditions. Review of world-state orientation and premature commitment.
E N D
02/11/98 Planning • Administrative • PS3 due 2/23 • Midterm Friday • Last time • regression planning algorithm • introduction to plan-space (least-commitment) planning • This time • plan-space least-commitment planning algorithm • midterm review
World-State Orientation and Premature Commitment • In state-space planning, there is close relationship between “states of the world” and “states in the search space” • in progression planning a search node corresponds to exactly one world state • in regression planning a search node corresponds to a set of world states • This emphasis on states causes the premature commitment: the planner always needs to know what state(s) it is in, so actions have to be totally ordered, and all variables must be bound
Searching in a space of partial plans • Suppose we concentrate on “what we do” rather than on “where we are” • there is no explicit state, only some actions • the actions might be unordered with respect to each other, and might have unbound variables • The planning process • the initial plan (search node) is one in which the agent does nothing • every iteration of the search adds more structure to the plan: actions, orderings, variable bindings • planning stops when the agent does enough to prove it achieves the goal • every action’s precondition is true (established and not clobbered) • every goal proposition is achieved
An Representation Trick • Since we’re talking about doing things rather than states, we transform the initial state and goal state description into “pseudo-actions” • The action initial has no preconditions, and its postconditions are exactly what is true initially • The action goal has the goal as a precondition, and no postconditions • There is exactly one instance of initial in every plan, and it must be “executed” first • There is exactly one instance of goal in every plan, and it must be “executed” last
Initial Goal at(TRUCK,B) fuel(FULL) at(TRUCK,A) connected(A,B) refuel-at(B) fuel(FULL) Plan Space Example: Initial Plan One node in the search space Open preconditions in red
Initial Goal at(TRUCK,B) fuel(FULL) at(TRUCK,A) connected(A,B) refuel-at(B) fuel(FULL) The initial choice • What open precondition should I try to satisfy? • How should I satisfy it? • with an existing step in the plan • by adding a new step
Initial Goal at(TRUCK,B) fuel(FULL) at(TRUCK,A) connected(A,B) refuel-at(B) fuel(FULL) A Single Refinement A causal link from initial to goal fuel(FULL) is true initially and no action in the plan can change it
Initial Goal at(TRUCK,B) fuel(FULL) at(TRUCK,A) connected(A,B) refuel-at(B) fuel(FULL) A Second Refinement: Adding a Step travel(?x, B, ?l) at(truck, ?x) connected(?x, B) fuel(?l) (?l ~= EMPTY) +at(truck, B) +fuel(EMPTY) -at(truck, A) -fuel(?l) • Note the unbound variables (least-commitment) • There is a potential threat to the fuel(FULL) link
travel(A, B, FULL) at(truck, A) connected(A, B) fuel(FULL) +at(truck, B) +fuel(EMPTY) -at(truck, A) -fuel(FULL) Initial Goal at(TRUCK,B) fuel(FULL) at(TRUCK,A) connected(A,B) refuel-at(B) fuel(FULL) Three more refinements All variables are bound No open conditions But an actual threat
The three ways of resolving a threat Clobberer ~P(?x) Producer Consumer P(A) P(A) Promotion: order Clobberer after Consumer Demotion: order Clobberer before Producer Separation: constrain ?x’s binding, ?x ~= A
Initial Goal at(TRUCK,B) fuel(FULL) at(TRUCK,A) connected(A,B) refuel-at(B) fuel(FULL) refuel(B) at(truck, B) refuel-at(B) +fuel(FULL) -fuel(EMPTY) -fuel(HALF) Alternate Choice: Adding a Second Operator travel(A, B, FULL) at(truck, A) connected(A, B) fuel(FULL) +at(truck, B) +fuel(EMPTY) -at(truck, A) -fuel(FULL) At this point, travel and refuel are unordered with respect to each other.
Initial Goal at(TRUCK,B) fuel(FULL) at(TRUCK,A) connected(A,B) refuel-at(B) fuel(FULL) refuel(B) at(truck, B) refuel-at(B) +fuel(FULL) -fuel(EMPTY) -fuel(HALF) Resolving the threat by demotion travel(A, B, FULL) at(truck, A) connected(A, B) fuel(FULL) +at(truck, B) +fuel(EMPTY) -at(truck, A) -fuel(FULL)
travel(A, B, FULL) at(truck, A) connected(A, B) fuel(FULL) +at(truck, B) +fuel(EMPTY) -at(truck, A) -fuel(FULL) Initial Goal at(TRUCK,B) fuel(FULL) at(TRUCK,A) connected(A,B) refuel-at(B) fuel(HALF) refuel(B) at(truck, B) refuel-at(B) +fuel(FULL) -fuel(?z) A Solution: No Open Conditions or Threats
The POCL (SNLP/McAllester&Rosenblitt) Algorithm • Initialize P the NULL plan • Solution check: if P has no flaws, succeed • a flaw is an open condition or potential threat • Otherwise • Choose some flaw in P, F • Choose some method to repair F; if none, fail • if F is an open condition, methods are the existing plan steps or any operator that asserts the condition can be added to the plan • if F is a threat, then promote, demote, or separate
Formal properties of POCL Planners • Soundness: if the algorithm returns a plan, that plan is a solution to the planning problem. • Completeness: if there is a solution plan, the algorithm will eventually find it • assuming a complete search algorithm • Systematicity: the algorithm will consider each partial plan only once
Midterm Review • Material covered: through today’s lecture • introductory material on AI, intelligence, agents • reactive agent and Lisp programming • search • optimizing versus satisficing • informed versus blind • single-agent versus adversarial • planning • planning as search • STRIPS operators, states and state descriptions • POCL planning • Reading for midterm • Chapter 1, skim • Chapter 2 as required • Chapter 4, skip 4.4, 4.6 • Chapter 7, 7.1 and 7.2 only