160 likes | 272 Views
02/09/98 Planning. Administrative PS3 out today 5PM Midterm next Friday 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 Last time the planning problem STRIPS operators operator regression This time
E N D
02/09/98 Planning • Administrative • PS3 out today 5PM • Midterm next Friday • 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 • Last time • the planning problem • STRIPS operators • operator regression • This time • regression planning algorithm • regression planning and premature commitment • plan-space least-commitment planning
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
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) A Bad Choice: Irreconcilable Threat
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(?z) 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)
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) Link to a Solution
The POCL (SNLP/McAllester&Rosenblitt) Algorithm • Initialize P the NULL plan • Solution check: if P is a solution, succeed • Otherwise • Choose some flaw in P, F • a flaw is an open condition or threat • 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
Language Extensions • Action language is still STRIPS • conditional effects => multiple actions • the glass breaks if it is in the truck during a TRAVEL • quantification • effects: every item in the truck arrives at the truck’s destination • precondition: • the arm must not be carrying anything in order for the truck to move • goal: every rock must be in cargo bay 1
Conditional Effects, The Syntax travel(?x ?y ?l) Precond: (and (at TRUCK ?x) (fuel ?l) (!= ?l EMPTY)) Effect: (and (at TRUCK ?x) (not (at TRUCK ?x)) (when (fuel FULL) (fuel HALF)) (when (fuel HALF) (fuel EMPTY)) (when (in GLASS TRUCK) (broken GLASS))))
Conditional Effects, The Implementation (at TRUCK A) (fuel FULL) (at GLASS A) (not (broken GLASS)) (at TRUCK B) (broken GLASS) (travel A B FULL) (at TRUCK A) (fuel FULL) (at TRUCK B)
Dynamically Adding a Precondition (at TRUCK A) (fuel FULL) (at GLASS A) (not (broken GLASS)) (at TRUCK B) (broken GLASS)) (travel A B FULL) (at TRUCK A) (fuel FULL) (in GLASS TRUCK) (at TRUCK B) (broken GLASS)
Dynamically Adding Precondition: Final Plan (at TRUCK A) (fuel FULL) (at GLASS A) (not (broken GLASS)) (at TRUCK B) (broken GLASS) (travel A B FULL) (at TRUCK A) (fuel FULL) (in GLASS TRUCK) (at TRUCK B) (broken GLASS) (pickup GLASS A) (at TRUCK A) (at GLASS A) (in GLASS TRUCK) (not (at GLASS A))
Conditional Effects as a Source of Threats (at TRUCK A) (fuel FULL) (in GLASS TRUCK) (not (broken GLASS)) (at TRUCK B) (not(broken GLASS)) (travel A B FULL) (at TRUCK A) (fuel FULL) (at TRUCK B) (when (in GLASS TRUCK) (broken GLASS))
Dynamically generating preconditions to confront threats (at TRUCK A) (fuel FULL) (in GLASS TRUCK) (not (broken GLASS)) (at TRUCK B) (not(broken GLASS)) (travel A B FULL) (at TRUCK A) (fuel FULL) (not (in GLASS TRUCK)) (at TRUCK B)
Threat Confrontation: Final Plan (at TRUCK A) (fuel FULL) (in GLASS TRUCK) (not (broken GLASS)) (at TRUCK B) (not(broken GLASS)) (travel A B FULL) (at TRUCK A) (fuel FULL) (not (in GLASS TRUCK)) (at TRUCK B) (putdown GLASS A) (at TRUCK A) (in GLASS TRUCK) (at GLASS A) (not (in GLASS TRUCK))
Universal Quantification • Quantification in effects: explode breaks all objects • Quantification in preconditions/goals: explode +: (forall (x) (when fragile(x) (broken (x))) cleanup P: (forall (x) (when fragile(x) (broken (x))) +: tidy