290 likes | 416 Views
Cost-Optimal Planning with Constraints and Preferences in Large State Spaces. Stefan Edelkamp, Shahid Jabbar, Mohammed Nazih University of Dortmund. PDDL3. Outcome IPC-6. Optimal Planning STRIPS: SATPLAN, MAXPLAN SIMPLE TIME: CPT PDDL3: MIPS-XXL Suboptimal Planning
E N D
Cost-Optimal Planning with Constraints and Preferences in Large State Spaces Stefan Edelkamp, Shahid Jabbar, Mohammed Nazih University of Dortmund
Outcome IPC-6 • Optimal Planning • STRIPS: SATPLAN, MAXPLAN • SIMPLE TIME: CPT • PDDL3: MIPS-XXL • Suboptimal Planning • PDDL3, 1st: SGPLAN, PDDL3, Special: YoChan (Simple), MIPS-XXL (Simple/Complex), ??? (Qualitative)
Motivation The Metric-FF Planner computes good plans for PDDL2.1 Level 2 Planning Problems How can it be extended to feature full expressiveness for the 2006 International Planning Competition?
Overview • 3-Phase Compiler • LTL Translation • Automata translation • Merging • Constraint Hierarchy • Hard- and Soft Constraints • Large-Scale Search • Conclusion, Future Work
Automata-based Model Checking • Model M L(M)L(S) • Specification S L(M)L(S) = {} L(M)@L(S) = {}
Images • T(x,x‘) encodes Transition Relation for • Image(x‘) = x States(x) T(x,x‘) • Pre-Image(x) = x States(x‘) T(x,x‘) Forward and Backward Search very much the same • Partition Computation: • 1 Transition Relation for each Planning Operator • ( and vcommute) Disjunctive Partition
PDDL3 Expressions and LTL • PDDL3 State Trajectory Constraints model temporally extended goals and control rules • They are „close“ to LTL-expressions, e.g sometimes <>, always [] LTL Standard in Automata-based Model Checking (e.g. SPIN) • Gerevini and Long give semantics in LTL • Core Difference STC / LTL: Expression evaluated on finite / infinite trajectories
Three Phase-Compiler: PDDL3 Grounded PDDL 2 -1- For each constraint: parse specificatoin, flatten quantifiers and flush corresponding LTL formula to disk -2- Derive Büchi Automaton for each LTL formula and generate corresponding PDDL code -3- Merge results of first and second phase Poster on Main Conference
Compilation PDDL3 domain.pddl problem.pddl State Trajectory Constraints preprocess grounded-domain.pddl grounded-problem 1.pddl LTL1 Grounded PDDL 2 merge 2.pddl LTL2 3.pddl LTL3 domain.pddl problem.pddl n.pddl LTLn Grounded PDDL 2
Constraint Hierarchy State Trajectory Constraints Soft Constraints Hard Constraints Normal Timed Normal Timed within at end within at end
„Hard“ Automata Translation (sometime (at person4 city3)) <> (at person4 city3) (:predicates (accepting-a) (sync-automaton-a) (at-a-init) (at-a-accept)) (:init (at-a-init)) (:goal (accepting-a)) true (at person4 city3) true
„Hard“ Automata Translation (:action sync-trans-a-init-a-accept :precondition (and (at-a-init) (sync-automaton-a) (at person4 city3)) :effect (and (accepting-a) (not (at-a-init)) (at-a-accept (not (sync-automaton-a)) (sync-next))) true (at person4 city3) true
„Soft“ Automata Translation (preference z (sometime (at person4 city3))) <> (at person4 city3) (:predicates (alive-p-z) (sync-automaton-p-z) (at-p-z-init) (at-p-z-accept)) (:init (alive-p-z) (at-p-z-init) (= (IS_VIOLATED p-z) 1)) true (at person4 city3) true
„Soft“Automata Translation (:action sync-trans-p-z-init-p-z-accept :precondition (and (alive-p-z) (at-p-z-init) (sync-automaton-p-z) (at person4 city3)) :effect (and (assign (IS_VIOLATED p-z) 0) (not (at-p-z-init)) (at-p-z-accept) (not (sync-automaton-p-z)) (sync-next))) true (at person4 city3) true
„Hard“ Compilation of Hold(thanks to Derek) • (hold-during t1 t2 P) Timed Initial Literal (at t1 dummy) (at t2 (not (dummy)) • (hold-after t) (at t dummy) (durative-action supplement :duration (= ?duration 0) :condition (and (over all (P)) (over all (dummy))) :effect (and (over all (done-dummy))))
„Soft“ Compilation of Hold(thanks to Derek) • (hold-during t1 t2 P) Timed Initial Literal (at t1 dummy) (at t2 (not (dummy)) • (hold-after t) (at t dummy) (durative-action supplement :duration (= ?duration 0) :condition (and (over all (P)) (over all (dummy))) :effect (and (over all (assign (is-violated p) 0))))
Compilation of „Within“ • Timed Initial Literal (TI) • (at 0 wfact) • (at t (not (wfact)) • LTL/BA • (within t p) (<> p) • (always-within t p q) ([ ] (p (<> q))) • Constraint automata acceptance with TIL
Compilation of „Within“ (:durative-action sync-trans-a-accept-a-accept :duration (= ?duration 0 ) :condition (and (at start (at-a-accept)) (over all (sync-automaton-a)) (over all (wfact))) :effect (and (at start (not (sync-automaton-a))) (at end (sync-next))))
Planner Architecture Metric-FF + • PERT Scheduling (Durative FF) PDDL2.1 Level 3 • Multiple Time Windows for Action Execution (Timed Initial Literals) PDDL2.2 • PDDL3 PDDL2 Compiler • Branch-And-Bound Wrapper • Externalization
(Internal) Branch-And-Bound • Finding Plans: • f = |PrefixPlan| + k|RelaxedPlan| (standard) • f = PERT(PrefixPlanoRelaxedPlan) (temporal) • Plan P, quality Q • Optimizing Plans wrt. Metric F • Wrapper includes F(P) < Q as new goal for next iteration • terminates (full exploration, time-out) with best Q • If Plan-Finding / Optimization fails Externalize
External Branch-And-Bound Planning • External Algorithms utilize Secondary Memory • Primitives: External Scanning, External Scanning - sort(|E|), scan(|V|) • External BFBnB • External Enforced Hill-Climbing • Solution Reconstruction: Double State Vector: (State, Predecessor)
External BF Branch-And-Bound • O(sort(|E|)+scan(|V|)) Upper Bound Constraints
External Enforced Hill Climbing AAAI-06 • h Every BFS-Layer is a file O(h(s) *(sort(|E|)+scan(|V|))) … actually executed in (g-h Matix) External A*
Conclusion • 1st PDDL3-to-PDDL2 Compiler • Full PDDL Expressiveness (ass. linear expr.) • Advantages for Heuristic Search Planning: • Accepting states • Wrapper on Metric • Eager Preference EvaluationEarly Application of Pruning Rules in BnB • 1st External Planner - Useful even in Competition Context (cf. Results)
Future Work • Proving Correctness of the Compilation • Integration of Acceleration Techniques: Symmetry Pruning, Partial Order Reduction, Goal Ordering … • Application to Model Checking • Extension to PDDL4 (Processes and Events) • Evaluate Automata Compilation vs. Formula Progression
BDD-based Planning • Symbolic Representation of Planning State Sets • 1 Bit per Proposition Inefficient Use Multivariate (SAS+) Encoding • Variable Ordering is important • Breadth-First Symbolic Search:Si(x) represents all states reachable in i steps
Images • T(x,x‘) encodes Transition Relation for • Image(x‘) = x States(x) T(x,x‘) • Pre-Image(x) = x States(x‘) T(x,x‘) Forward and Backward Search very much the same • Partition Computation: • 1 Transition Relation for each Planning Operator • ( and vcommute) Disjunctive Partition
Weaknesses • Automata Translation in LTL2BA not optimal • Wrapper Approach with Relaxed Planning Heuristic not optimal (Duplicate Anomaly)