$8QLILHG%UDQGQDPH)UHH ,QWURGXFWLRQWR3ODQQLQJ 6XEEDUDR.DPEKDPSDWL $UL]RQD6WDWH8QLYHUVLW\ rao@asu.edu http://rakaposhi.eas.asu.edu/yochan.html Planning is hot... New people. Conferences. Workshops. Competitions. Inter-planetary explorations. So, Why the increased interest? * Significant scale-up in the last 4-5 years – Before we could synthesize about 5-6 action plans in minutes – Now, we can synthesize 100-action plans in minutes » Further scale-up with domain-specific control $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ * Significant strides in our understanding – Rich connections between planning and CSP(SAT) OR (ILP) » Vanishing separation between planning & Scheduling – New ideas for heuristic control of planners – Wide array of approaches for customizing planners with domain-specific knowledge 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Overview * * * * * * * 7K 7KH H3 3OOD QQ LQJ S SUREO UREOH HP ² ² 2 XU IR IRF FXV 0RGHOLQJ 0RGHOLQJ 3 UR URY YLQJ FR FRU UUHFWQHVV 5H IL ILQ QHP HPHQ HQW W3 3OODQ QL QLQJ QJ ) )R RUPD UPDOO )UDPHZ )UDPHZR RUN & RQ MX QF WLY WLYH HU UHIL HILQ QHP HPHQ HQW W SOD SODQQH QQHUV UV 'LVM 'LVMX XQF WLY WLYH H UH IL ILQ QHP HPHQ HQW W SOD SODQQ QQH HU V ² ² 5H IL ILQ QHP HPHQ HQW GLVMMXQ FWLY W RI GLV FWLYH H SOD SODQ QV 6R OX OXW WLR LRQ Q H[ H[W WUDF UDFW WLR LRQ Q IU IUR RP GLVMX GLVMXQF QFWLYH WLYH S SOODQ V ª 'LUH 'LUHF FW & &R RPSL PSLOOHG 6$7 & 63 , ,/ /3%'' 3%'' +H XULVWLFV XULVWLFV2S WLPL]DWL WLPL]DWLRQ RQV V & XVW XVWR RPL]LQ PL]LQJ J 3 3OD ODQQ QQHUV HUV ² ² 8V 8VH HU DV DVV VLVWHG & XVW RPL]DWL L]DWLR RQ $XW $XWR RPDWH DWHG G FXVWRPL]DW FXVWRPL]DWL LR Q 6X 6XS SSR SRU UW IRU QR QRQ Q FO DVVLFD DVVLFDOO ZRU ZRUOOGV $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Planning : The big picture * Synthesizing goal-directed behavior * Planning involves – Action selection; Handling causal dependencies – Action sequencing and handling resource allocation » typically called SCHEDULING – Depending on the problem, plans can be » action sequences » or “policies” (action trees, state-action mappings etc.) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L The Many Complexities of Planning 6 WD WLF Y V '\ '\Q QDPLF DPLF 2 EV HUYDEOH YV Environment ) XOO YV YV Goals , QV WD WDQ QWD QHRX QHRXV V Y V tio n 3D UW LDO V VD DWL WLV VID FW LRQ ac S HUIHFW YV ,P ,PS SHUIHFW HUIHFW perception 3 DUWL DUWLD DOO\ 2 EV HUYDEOH ' XUD WLYH ' HWHUPLQL HWHUPLQLV VWLF YV 6 WRFKD WRFKDVW VWLF LF What action next? H 7K $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ '\ '\Q QDPLF 6W RFKD RFKDV VWLF 3D UW LDOO\ 'XUD 'XUDWWLYH 4 V XH W LR Q 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L &RQ &RQWWLQXRX LQXRXV V 6W DW LF 'HWHUPL 'HWHUPLQ QLV WLF 2 EVHU EVHUY YDEOH ,Q VW DQ DQWWDQ HRXV /3 /3 ,/3 1XPH 1XPHUULF &RQVWUDLQW UH DVR QLQJ 7H PSR UD UDOO 5H 5HD DVR QLQJ 3R 3ROOLFLHV 6HP 6HPLL0'3 &R QWLQ WLQJ JH QW W& &RQI RQIR RUPDQ UPDQWW 3O DQV ,QWHU QWHUOOHDYH HDYHG G H[HFXWLRQ 320'3 3ROLF 3ROLFLLH V 0'3 3R 3ROOLFLH V 5HS 5HSOODQQ DQQLLQJ QJ 6LWX WXD DWH G 3O 3OD D QV 2 EVHU EVHUY YDEOH 3UR 3URS SRVL RVLWWLRQ LRQD DO o&ODVVLFDO3ODQQLQJp $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Broad Aims & Biases of the Tutorial AIM: We will concentrate on planning in deterministic, quasi-static and fully observable worlds Will start with “classical” domains; but discuss handling durative actions and numeric constraints, as well as replanning 1H 1HR R& ODVV ODVVLLFD FDOO 3O DQQ DQQLLQJ BIAS: To the extent possible, we shall shun brand-names and concentrate on unifying themes Better understanding of existing planners Normalized comparisons between planners Evaluation of trade-offs provided by various design choices Better understanding of inter-connections Hybrid planners using multiple refinements Explication of the connections between planning, CSP, SAT and ILP $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Why Care about “neo-classical” Planning? * Most of the recent advances occurred in neo-classical planning * Many stabilized environments satisfy neo-classical assumptions – It is possible to handle minor assumption violations through replanning and execution monitoring o 7KLV I RUP R I VR OX WLRQ KDV WKH D DG GYD QWDJ WDJH H R RII UUH HO\LQ O\LQJ J R Q Z LG HO \XVHG DQG RI WHQ Y %R %RX XWLO LHU YH HU\ HI HIIILFLH QW FODVV FODVVLLFD FDOO SO DQQ DQQLLQJ WH FK QRO QROR RJ\p * Techniques developed for neo-classical planning often shed light on effective ways of handling non-classical planning worlds – Currently, most of the efficient techniques for handling non-classical scenarios are still based on ideas/advances in classical planning $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Applications (Current & Potential) * Scheduling problems with action choices as well as resource handling requirements – Problems in supply chain management – HSTS (Hubble Space Telescope scheduler) – Workflow management * Autonomous agents – RAX/PS (The NASA Deep Space planning agent) * Software module integrators – VICAR (JPL image enhancing system); CELWARE (CELCorp) – Test case generation (Pittsburgh) * Interactive decision support – Monitoring subgoal interactions » Optimum AIV system * Plan-based interfaces $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L The (too) many brands of classical planners J Q L \ N I L U R Q 8 PHZ D U ) Planning as Theorem Proving (Green’s planner) Planning as Model Checking Planning as Search Search in the space of States (progression, regression, MEA) (STRIPS, PRODIGY, TOPI, HSP, HSP-R, UNPOP, FF) Search in the space of Plans (total order, partial order, protections, MTC) (Interplan,SNLP,TOCL, UCPOP,TWEAK) Search in the space of Task networks (reduction of non-primitive tasks) (NOAH, NONLIN, O-Plan, SIPE) Planning as CSP/ILP/SAT/BDD (Graphplan, IPP, STAN, SATPLAN, BLackBOX,GP-CSP,BDDPlan) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L A Unifying View 6($5&+ Refinement Planning :KDW DU DUH H 3 3ODQV ODQV" " 5H 5HI I LQHP QHPH H QWV" Conjunctive Refinement Planning &DQ &DQG G LG D WH VH W VHPDQW VHPDQWLLFV ) 66 % %6 66 3 36 6 Disjunctive Refinement Planning +R Z D DU U H VH W V R I SODQV U H SU HVHQWHG FRPSDFWO\" +R Z D DU U H WKH\ U UH H IL ILQ QH G" +R Z D DU U H WKH\ VHD VHDU U FK HG" , 5 7 3$ Graph-based &21752 &21752// 5 7 3$ CSP Directed Partial Consistency enforcement Reachability Relax Subgoal Relevance interactions Heuristics/Optimizations SAT ILP HTN Schemas TL Formulas Cutting Planes BDD Case-based Abstraction-based Failure-based Domain Analysis* +DQ +DQG GFR GH GHG G /H /HD DUQHG Domain-customization $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 5 7 $ 3 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Overlap with other courses WV K J RX * Hector will talk more on heuristics VWK Gn R * LOVdomain-specific Ztalk moreHWon D * Dana & Derek will R Q N H U H G knowledge R W Q W L V P D Z , VW H U * Paolo will talk more on model-checking HL Q W V 7 KH Q (L W U * Malik will talk more EHon temporal planning O $ * Bernhard will talk more on the formal stuff $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L , 5 7 $ 3 0RGHOLQJ3ODQQLQJ3UREOHPV $FWLRQV6WDWHV&RUUHFWQHVV $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Modeling Classical Planning *States are modeled in terms of (binary) state-variables *Actions are modeled as state transformation functions -- Syntax: ADL language (Pednault) -- Apply(A,S) = (S \ eff(A)) + eff(A) (If Precond(A) hold in S) Effects In(o1) Prec. Load(o1) At(o1,l1), At(R,l1) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ ¬In(o1) Unload(o1) In(o1) Earth Earth Appolo 13 At(A,M),At(B,M) ¬In(A), ¬In(B) -- Complete initial state, partial goal state At(A,E), At(B,E),At(R,E) At(R,M), ¬At(R,E) ∀xIn ( x) ⇒ At( x, M) & ¬At(x, E) Fly() At(R,E) 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Some notes on action representation * STRIPS Assumption: Actions must specify all the Action A state variables whose values they change... * No disjunction allowed in effects – Conditional effects are NOT disjunctive » (antecedent refers to the previous state & consequent refers to the next state) * Quantification is over finite universes – essentially syntactic sugaring * All actions can be compiled down to a canonical representation where preconditions and effects are propositional – Exponential blow-up may occur (e.g removing conditional effects) Eff: If P then R If Q then W ª Action A1 Prec: P, Q Eff: R, W Action A2 Prec: P, ~Q Eff: R, ~W Action A3 Prec: ~P, Q Eff: ~R, W Action A4 Prec: ~P,~Q Eff: :H ZLO ZLOOO DDVVVXPH WKWKHH FFDDQRQLFLFDDO UHUHSSUHV UHVHHQWDWL DWLRRQ $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Actions with Resources and Duration Load(P:package, R:rocket, L:location) Resources: ?h : robot hand Preconditions: Position(?h,L) Free(?h) Charge(?h) > 5 Effects: Constraints: [?s, ?e] ?s ?s holding(?h, P) [?s, ?t1] depositing(?h,P,R) [?t2, ?e] Busy(?h) [?s, ?e] Free(?h) ?e Charge - = .03*(?e - ?s) ?e ?t1 < ?t2 ?e - ?s in [1.0, 2.0] &DSDFLW\URERW $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ "H "V > >@ 3RV 3RV"K/ "K/ +R OG" OG"K K3 )UH )UHH H "K %XV\"K GH S"K 3 )UH )UHH H "K 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Planning vs. Scheduling $&RQWLQXXP Planning Scheduling – Initial state & a set of Goals, – A library of actions » Preconditions/effects O Discrete/Continuous » Resource requirements Synthesize a sequence of actions capable of satisfying goals I = initial state [I] Oi G = goal state Oj Ok (prec) Oi – Set of jobs (may have of tasks in some (partial) order) – Temporal constraints on jobs » EST, LFT, Duration – Contention constraints » Each task can be done on a subset of machines Find start times for jobs that are optimal (wrt make-spans, resource consumption etc) 7 (effects) /)7 'XU Om [ G ] 7 (6 7 $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Checking correctness of a plan: The State-based approaches * Progression Proof: Progress the initial state over the action sequence, and see if the goals are present in the result progress At(A,E) At(R,E) At(B,E) Load(A) progress At(B,E) At(R,E) In(A) Load(B) In(A) At(R,E) In(B) \ LI\ SDFLW U H R Y &D \ W XUFH WV V D ( HVR WUDLQ 5 R QV & * Regression Proof: Regress the goal state over the action sequence, and see if the initial state subsumes the result regress At(A,E) At(R,E) At(B,E) Load(A) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ regress At(B,E) At(R,E) In(A) Load(B) In(A) In(B) 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Checking correctness of a plan: The Causal Approach Contd.. * Causal Proof: Check if each of the goals and preconditions of the action are » “established” : There is a preceding step that gives it » “unclobbered”: No possibly intervening step deletes it O Or for every preceding step that deletes it, there exists another step that precedes the conditions and follows the deleter adds it back. Causal proof is – “local” (checks correctness one condition at a time) – “state-less” (does not need to know the states preceding actions) » Easy to extend to durative actions – “incremental” with respect to action insertion » Great for replanning ~At(A,E) ~At(B,E) In(A) In(A) In(B) At(A,E) At(B,E) Load(A) Load(B) At(A,E) At(B,E) At(R,E) At(R,E) In(B) At(R,E) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L 7KH5HILQHPHQW3ODQQLQJ )UDPHZRUN 6\QWD[6HPDQWLFVRISDUWLDOSODQV 5HILQHPHQWVWUDWHJLHVWKHLUSURSHUWLHV 7KHJHQHULF5HILQHPHQWSODQQLQJWHPSODWH A Unifying View 6 ( $ 5& + Refinement Planning 5H ILQ LQH HP HQ WV " Conjunctive Refinement Planning 57 3$ &2 &2117 52 52// 5 3$ &DQ &DQG GL G D WH VH W VH PDQ DQW WLF LFV V ) 66 66 % %66 66 3 6 Disjunctive Refinement Planning +R +RZ Z DU DUH H V HW HWV V RI SODQ ODQV V U HS U HV HQ WH WHG G FR FRP PS DF DFW WO \" +R +RZ Z DU DUH H W KH KH\ \ UUH HI LQ LQHG HG" " +R +RZ Z DU DUH H W KH KH\ \ V VH HD U F KH KHG G" , Graph-based 7 CSP Directed Partial Consistency enforcement Reachability Relax Subgoal Relevance interactions Heuristics/Optimizations 0$ $ 5 5HF HFHHQ W $ GYD Q $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ : KD W DU DUH H 3ODQ ODQV V" L $, 3 SAT ILP BDD HTN Schemas TL Formulas Cutting Planes Case-based Abstraction-based Failure-based Domain Analysis* +DQ +DQG GF FR RG HG / HDUQ DUQH HG Domain-customization 3$ 5 7 6X EED UDR. DPE KD PS PSDD WL 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Refinement Planning:Overview All action sequences P Refine All Sol P’ P’ P All Seq. All Solutions Partial plans Refinements Narrowing sets of action sequences to progress towards solutions Remove non-solutions $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Partial Plans: Syntax 0 Steps, Orderings, Aux. Constraints 1: Load(A) 2:Fly() 4:Unload(A) ∞ In(A)@2 At(R,E) IPC 3: Load(B) precedence contiguity Earth Auxiliary Constraints: Interval preservation constraint (IPC) ‹ s1 , p , s2 › p must be preserved between s1 and s2 Appolo 13 Partial plan = Point truth Constraint (PTC) p@s p must hold in the state before s $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Partial Plans: Semantics Candidate is any action sequence that -- contains actions corresponding to all the steps, -- satisfies all the ordering and auxiliary constraints P: 0 1: Load(A) 4:Unload(A) ∞ 2:Fly() In(A)@2 At(R,E) 3: Load(B) Candidates (∈ «P») Non-Candidates (∉ «P») [Load(A),Load(B),Fly(),Unload(A)] [Load(A),Fly(),Load(B),Unload(B)] Minimal candidate. Corresponds to safe linearization [ 01324 ∞ ] Corresponds to unsafe linearization [ 01234 ∞ ] [Load(A),Load(B),Fly(), Unload(B),Unload(A)] [Load(A),Fly(),Load(B), Fly(),Unload(A)] $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Linking Syntax and Semantics Partial Plan Linearization 1 Linearization 2 Linearization 3 Safe linearization 1 Safe linearization 2 Minimal Cand. 1 + derived candidates Minimal Cand. 2 + derived candidates Refinements $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ Linearization n Safe Linearization m Minimal Cand. m + derived candidates Reduce candidate set size Increase length of minimal candidates 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Refinement (pruning) Strategies actions & their inter-relations “Canned” inference procedures -- Prune by propagating the consequences of domain theory and meta-theory of planning onto the partial plan *A refinement strategy R : P –R –R –R –R Æ P’ ( «P’ » a subset of «P » ) is complete if «P’ » contains all the solutions of «P » is monotonic if «P’ » has longer minimal candidates than «P » is progressive if «P’ » is a proper subset of «P » is systematic if components of P’ don’t share candidates R ∞ 0 0 1: Load(A) ∞ 0 1: Load(B) ∞ 0 1: Fly() ∞ § A plan set P is a set of partial plans {P1,P2 ... Pm} $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L At(A,E) At(B,E) At(R,E) progression 1: Unload(A) ∞ 0 2: Load(B) 1: Unload(A) ∞ 0 2: Fly() 1: Unload(A) ∞ State-Space Ext end Suf fix 0 0 1: Fly() Regression ∞ At(A,M) At(B,M) ¬In(A) ¬In(B) 0 1: Fly() 2: Unload(A) ∞ 0 1: Fly() 2: Unload(B) ∞ $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 1:Unload(A) ∞ At(A,M)@ • PSR At(A,M)@• At(A,M) Ad 2: Load(A) 0 Plan-Space mid dle ∞ 1: Unload(A) the 0 d in Ext end Pre fix Existing Refinement Strategies ¬At(A,M) 0 2:Fly() 3:Unload(A) ∞ In(A)@2 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L The Refinement Planning P Template All Sol Refineplan( P : Plan set) P’ 8 VH SU RR RRIIV R I FRUU FRUUH HFWQHVV 0*. If «P » is empty, Fail. 1. If a minimal candidate of P is a solution, return it. End 2. Select a refinement strategy R Apply R to P to get a new plan set P’ 3. Call Refine(P’ ) PRQRWRQRQLFLF FRPS PSOOHWHWHH and -- Termination ensured if R is -- Solution check done using one of the proofs of correctness Issues: 1. Representation of plan sets (Conjunctive vs. Disjunctive) 2. Search vs. solution extraction 3. Affinity between refinement and proof used for solution check $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L A flexible Split&Prune search for refinement planning Null Plan set Null Plan set R1 R2 Refineplan( P : Plan) Rk P1 P2 Pk R1 R2 Rk P1 P2 Pk 0*. If «P » is empty, Fail. 1. If a minimal candidate of P is a solution, terminate. 2. Select a refinement strategy R . Appply R to P to get a new plan set P’ 3. Split P’ into k plansets 4. Non-deterministically select one of the plansets P’ i Call Refine(P’ i) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Two classes of refinement planners Conjunctive planners * Search in the space of conjunctive partial plans – Disjunction split into the search space » search guidance is nontrivial – Solution extraction is trivial * Examples: – – – – STRIPS & Prodigy SNLP & UCPOP NONLIN & SIPE UNPOP & HSP Disjunctive planners * Search in the space of disjunctive partial plans – Disjunction handled explicitly – Solution extraction is nontrivial » CSP/SAT/ILP/BDD methods * Examples: – – – – Graphplan,IPP,STAN SATPLAN GP-CSP BDDPlan, PropPlan $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L A Unifying View Refinement Planning 6 ( $ 5& + 3D UW &21-81&7,9( 5(),1(0(17 3/$11,1* 5H ILQ LQH HP HQ WV " Conjunctive Refinement Planning 57 3$ &2 &2117 52 52// 5 3$ &DQ &DQG GL G D WH VH W VH PDQ DQW WLF LFV V ) 66 66 % %66 66 3 6 Disjunctive Refinement Planning +R +RZ Z DU DUH H V HW HWV V RI SODQ ODQV V U HS U HV HQ WH WHG G FR FRP PS DF DFW WO \" +R +RZ Z DU DUH H W KH KH\ \ UUH HI LQ LQHG HG" " +R +RZ Z DU DUH H W KH KH\ \ V VH HD U F KH KHG G" , Graph-based 7 CSP Directed Partial Consistency enforcement Reachability Relax Subgoal Relevance interactions Heuristics/Optimizations 0$ $ 5 5HF HFHHQ W $ GYD Q $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ : KD W DU DUH H 3ODQ ODQV V" L $, 3 SAT ILP BDD HTN Schemas TL Formulas Cutting Planes Case-based Abstraction-based Failure-based Domain Analysis* +DQ +DQG GF FR RG HG / HDUQ DUQH HG Domain-customization 3$ 5 7 6X EED UDR. DPE KD PS PSDD WL 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Forward State-space Refinement * Grow plan prefix by adding 0 applicable actions 1: Unload(A) ∞ – Complete, Monotonic » consideration of all executable prefixes At(A,E) At(B,E) At(R,E) – Progressive » elimination of unexecutable prefixes – Systematic » each component has a different prefix Completely specified state » Easier to control? – Higher branching factor 0 2: Load(A) 1: Unload(A) ∞ 0 2: Load(B) 1: Unload(A) ∞ 0 2: Fly() 1: Unload(A) ∞ $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Backward State-space Refinement * Grow plan suffix by adding relevant actions 0 – Complete, Monotonic » consideration of all relevant suffixes » elimination of irrelevant suffixes » each component has a different suffix Goal directed » Lower branching – Partial state » Harder to detect inconsistency ∞ At(A,M) At(B,M) ¬In(A) ¬In(B) – Progressive – Systematic 1: Fly() 0 1: Fly() 2: Unload(A) ∞ 0 1: Fly() 2: Unload(B) ∞ $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Plan-space Refinement Goal selection: Select a precondition Establishment: Select a step (new or existing) and make it give the condition De-clobbering: Force intervening steps to preserve the condition Book-keeping: (Optional) Add IPCs to preserve the establishment ⇒ Systematicity 1:Unload(A) ∞ 0 At(A,M)@• PSR At(A,M)@• At(A,M) ¬At(A,M) 0 3:Unload(A)∞ 2:Fly() In(A)@2 (PSR is complete, and progressive) causation precondition ∀x In(x) ⇒ At(x,M) (Sacerdoti, 1972; Pednault, 1988; McAllester, 1991) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Tradeoffs among Refinements FSR and BSR must commit to both position and relevance of actions + Give state information (Easier plan validation) - Too many states when actions have durations 0 Plan-space refinement (PSR) avoids constraining position + Reduces commitment (large candidate set /branch) - Increases plan-validation costs - Leads to premature commitment Pf W HD V JU V DU H Z W DV O\ R 7 K KH QJ 7 OOL )L V V /H + Easily extendible to actions with duration ∞ 1: Fly() Pp Pb 0 1: Fly() $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 0 1: Fly() ∞ ∞ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Issues in instantiating Refineplan * Although a planner can use multiple different refinements, most implementations stick to a single refinement * Although refinement can be used along with any type of correctness check, there is affinity between specific refinements and proof technqiues (support finite differencing) – FSR and Progression based proof – BSR and Regression based proof – PSR and Causal proof * Although it is enough to check if any one of the safe linearizations are solutions, most planners refine a partial plan until all its linearizations are safe – Tractability refinements (pre-order, pre-satisfy) :LWKWKHVHFKDQJHVDQLQVWDQWLDWHGDQGVLPSOLILHGSODQQHU PD\oORRNpFRQVLGHUDEO\GLIIHUHQWIURPWKHJHQHUDOWHPSODWH $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Generating Conjunctive Refinement Planners Refineplan ( P : Plan) V H QW P H R P H F I H H D Q V E IL LW UH \ QV V J H LR VR QW W K WH W D H \ UD L] J P W R U W V D WH QH H FW IL UD QW H OLQ H VW UH O S P I V \ DO H W R UH LOL S UR ILQ E H S H LWK UH WD H . F Z H O UD WK DO QJ 7 QW FW VL H OH D P H H 6 WR FU LQ FN WL 6 0*. If «P » is empty, Fail. 1. If a minimal candidate of P is a solution, terminate. 2. Select a refinement strategy R . Appply R to P to get a set of new plans P1…Pj Add all plans to the search queue. 4. Non-deterministically select one of the plans P i Call Refine(P i) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Case Study: UCPOP Refineplan ( P : Plan) tal en ck 0*. If P is order inconsistent, FAIL. rm he nc ln. c I 1. If no open conditions and no unsafe lPCs, SUCCESS. So 2. Generate new plans using either 2’ or 2’’ Add the plans to the search queue 2’. Remove an open condition c@s in P. 2.1. For each step s’ in P that gives c, make a new plan P’ = P + (s’ < s) + IPC s’-c-s 2.2. For each action A in the domain that gives c, make a new ing nc re plan P’ = P + sn:A + (sn <s) + IPC sn-c-s. e f if -d s 2.2.1. For each precondition c’ of A, add ite ure Fin ruct c’@sn to the list of open conditions of P’. st 2.2.2. For each IPC s’-p-s’’, if sn deletes p, add y [s’-p-s’’; sn] to the list of unsafe IPCs of P’. ilit tab ent c 2’’. Remove an unsafe IPC [s’-p-s’’; s’’’] from P. a em Tr Make two plans: P’ = P + s’’’< s’ P’’ = P + s’’ < s’’’ refin 3. Non-deterministically select one of the plans P I from the search queue and Call Refine(P i) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Many variations on the theme.. Planner TWEAK UA Termination MTC MTC Goal Sel. Tractability Bookkeeping refinements MTC -none- MTC -none- -nonepre-order SNLP / UCPOP Causal proof arbitrary Contrib. Prot pre-satisfaction TOCL Causal proof arbitrary Contrib. Prot. pre-order arbitrary Interval Prot. McNonlin/ Pedestal SNLP-UA Causal proof MTC MTC Contrib. Prot. pre-satisfaction unambig. ord. (Kambhampati, Knoblock & Yang, 1995) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Some implemented conjunctive planners Refinement UCPOP, SNLP [Weld et. al. ] UNPOP [McDermott] HSP [Geffner & Bonet] FF [Hoffman] IxTET [Ghallab et al] RAX [Muscettola et al] Prodigy [Carbonell et. al. ] $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ Plan-space Forward state space Plan-space Forward state space Heuristics Fail-first Flaw selection Distance heuristics Hand-coded search control Means-ends analysis 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Conjunctive planners: The State of the Art * Vanilla state-space (FSR/BSR) planners were known to be less efficient than vanilla plan-space planners – Several research efforts concentrated on extending plan-space approaches to non-classical scenarios * However, State-space planners seem to have better heuristic support than plan-space planners at this time – Distance-based heuristics seem particularly useful for state-space planners * But, plan-space planners are alleged to provide better support for incremental planning, durative actions etc. – replanning, reuse and plan modification, temporal reasoning » IXTET, HSTS, RAX…. Charge: Either develop effective approaches for replanning etc. in state-space planners or develop good heuristics for plan-space planners $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L 3 W U D ',6-81&7,9( 5(),1(0(17 3/$11,1* A Unifying View 6 ( $ 5& + Refinement Planning 5 3$ &DQ &DQG GL G D WH VH W VH PDQ DQW WLF LFV V ) 66 66 % %66 66 3 6 Disjunctive Refinement Planning Graph-based CSP Directed Partial Consistency enforcement Reachability Relax Subgoal Relevance interactions Heuristics/Optimizations 0$ $ 5 5HF HFHHQ W $ GYD Q +R +RZ Z DU DUH H V HW HWV V RI SODQ ODQV V U HS U HV HQ WH WHG G FR FRP PS DF DFW WO \" +R +RZ Z DU DUH H W KH KH\ \ UUH HI LQ LQHG HG" " +R +RZ Z DU DUH H W KH KH\ \ V VH HD U F KH KHG G" 7, 57 3$ : KD W DU DUH H 3ODQ ODQV V" 5H ILQ LQH HP HQ WV " Conjunctive Refinement Planning &2 &2117 52 52// 5HILQLQJGLVMXQFWLYHSODQV 6ROXWLRQ([WUDFWLRQ 'LUHFW &RPSLODWLRQ &636$7,/3%'' SAT ILP BDD HTN Schemas TL Formulas Cutting Planes Case-based Abstraction-based Failure-based Domain Analysis* +DQ +DQG GF FR RG HG / HDUQ DUQH HG Domain-customization $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 3$ 5 7 6X EED UDR. DPE KD PS PSDD WL L $, 3 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Disjunctive Planning * Idea: Consider Partial plans with disjunctive step, ordering, and auxiliary constraints * Motivation: Provides a lifted search space, avoids re-generating the same failures multiple times (also, rich connections to combinatorial problems) * Issues: – Refining disjunctive plans » Graphplan (Blum & Furst, 95) – Solution extraction in disjunctive plans » Direct combinatorial search » Compilation to CSP/SAT/ILP $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Disjunctive Representations --Allow disjunctive step, ordering and auxiliary constraints in partial plans 0 1: Load(A) 0 1: Load(B) 0 1: Fly(R) ∞ ∞ 1: Load(A) or 2 : Load(B) or 3 : Fly(R) 0 ∞ ∞ < 1,In(A), ∞ > V < 1 ,In(B), ∞ > In(A) 0 ∞ 1: Load(A) In(x)@ ∞ In(B) 0 1: Load(B) Load(A) 0 1: Load(B) ∞ In(x)@ ∞ ∞ or At(A,E)@1 V At(B,E)@1 $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Refining Disjunctive Plans (1) 1: Load(A) 0 1: Load(A) or 2 : Load(B) or 3 : Fly(R) or 1: Load(A) or 2 : Load(B) or 3 : Fly(R) • 0 or 2 : Load(B) or 3 : Fly(R) Indirect unioned approach • 4 : Unload(A,E) or 5 : Unload(B,E) + Maximum pruning power - Exponential refinement cost INFEASIBLE 0 1: Load(A) • 0 1: Load(B) • 1: Fly(R) • 0 $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 0 1: Load(A) 2: Fly(R) • 0 1: Load(B) 2: Fly(R) • 0 1: Load(A) 2: Unload(A,E) • 0 1: Load(B) 2: Unload(B,E) • 0 1: Load(A) 2: Load(B) • 0 1: Load(B) 2: Load(A) • 0 1: Fly(R) • 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Refining Disjunctive plans (2) Direct naive approach Put all actions at all levels --Proposition list contains all conditions In(A) union of states In(B) + Trivial to construct - Loss of pruning power (progressivity) At(R,M) => too many (minimal) candidates => Costlier solution extraction At(R,E) At(A,E) At(B,E) At(A,M) At(B,M) LA TP 1: Load(A) 0 or 2 : Load(B) or 3 : Fly(R) • D in SA N 0 SE 1: Load(A) or 2 : Load(B) or 3 : Fly(R) 1: Load(A,E) or 2 : Load(B,E) or 3 : Fly(R) or 4 : Unload(A,E) or • 5 : Unload(B,E) 6 : Unload(A,M) U 7 : Unload(B,M) 8 : load(A,M) 9 : load(B,M) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Refining Disjunctive plans (3) Enforce partial 1-consistency Proposition list avoids unsupported conditions In(A) + Polynomial refinement time -- Loss of pruning power (progressivity) In(B) At(R,M) At(R,E) At(A,E) At(B,E) At(A,M) At(B,M) 1: Load(A) 0 or 2 : Load(B) or 3 : Fly(R) • 0 1: Load(A) or 2 : Load(B) or 3 : Fly(R) 1: Load(A,E) or 2 : Load(B,E) or 3 : Fly(R) or 4 : Unload(A,E) or • 5 : Unload(B,E) 6 : Unload(A,M) 7 : Unload(B,M) 8 : load(A,M) 9 : load(B,M) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Refining Disjunctive plans (4) Enforce (partial) 2-consistency Proposition list maintains interactions between pairs of conditions + Polynomial refinement time In(A) higher pruning power + Better balance between refinement cost In(B) and solution extraction cost At(R,M) At(R,E) At(A,E) At(B,E) 1: Load(A) 0 or 2 : Load(B) or 3 : Fly(R) 0 • Q &D U JK H KLLJ GR V UD LW LLV R HO F O HY K Z R UW UH O \ 1: Load(A) or 2 : Load(B) or 3 : Fly(R) E XW F\ WHQ QV LV W FRV WKH 1: Load(A,E) or 2 : Load(B,E) or 3 : Fly(R) or 4 : Unload(A,E) or • 5 : Unload(B,E) 6 : Unload(A,M) 7 : Unload(B,M) 8 : load(A,M) 9 : load(B,M) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Open issues in disjunctive refinement * Directed partial consistency – Mutex propagation is a form of reachability analysis » Relevance analysis? – Higher levels of directional consistency? » Typically not cost effective * Supporting refinements other than FSR – Direct naïve refinements are easy to support; enforcing an appropriate level of consistency is harder – Some “relevance” based approaches exist for BSR » Inseperability, backward mutex [ O Kambhampati et. al. ECP, 1997 » Can be used in conjunction with reachability analysis – Enforcing effective consistency for PSR is still virgin territory… $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Solution Extraction in Disjunctive Plans * Verify if some minimal candidate of the disjunctive plan is a solution (“Model Finding” ) » Involves (implicit or explicit) use of proof strategies * Direct methods: Can be solved using special techniques customized to the disjunctive structure » Graphplan backward search; Graphplan local search * Compilation methods: Generate a set of constraints, whose satisfaction ensures that a substructure of the disjunctive structure is a solution. Find a model for the constraints. » Constraints will correspond to lines of proof O Progression proof, regression proof, causal proof » Constraints can be in any standard form O e.g. CSP, SAT, ILP, BDD $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Graphplan Backward Search (Direct Search I) Objective: Find a sub-graph of the plangraph that corresponds to a valid plan. Method: Start from the goal propositions at the last level Select actions to support the goals so that no two are mutex (choice) Recurse on the preconditions of the selected actions (recursion ends at the initial state) (When backtracking over the goals at a level, memoize them) Optimizations: Adaptation of DVO, FC, EBL, DDB etc… [Kambhampati, JAIR 2000] 1: Load(A) 2 : Load(B) In(A) In(B) 3 : Fly(R) At(R,E) At(R,M) At(A,E) P-At(R,E) At(R,E) At(B,E) P-At(A,E) At(A,E) P-At(B,E) At(B,E) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Backward Search Z HYLH 5 DQ O SKS D U * A5 P11 I1 X A6 A1 X A7 I2 I3 P22 P33 A8 A2 P55 A10 P66 A11 G2 G3 P44 A9 X P1 G1 A3 G4 P6 A4 $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Other Direct Extraction Strategies * Motivation: No compelling reason for making the search for a valid subgraph backward, or systematic... * Alternatives: – Forward Search (dynamic programming) [Parker & Kambhampati; 98,99; Blum & Langford 98] – Systematic Undirectional search [Rintanen, 98] » Select an action anywhere in the plan-graph for inclusion in the solution; Propagate consequences (adapts normal CSP Search to plan-graph) – Local Search [Gerevini et. al., 99] 1: Load(A) 2 : Load(B) In(A) In(B) 3 : Fly(R) At(R,E) At(R,M) At(A,E) P-At(R,E) At(R,E) At(B,E) P-At(A,E) At(A,E) P-At(B,E) At(B,E) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L > 'R @ W L Compilation PSD D K E .DP to CSP *R DO V ,Q$ Q$, ,Q Q% 1: Load(A) In(A) 2 : Load(B) In(B) &63 *LYHQ D VH W R I GL VF VFU UHWH YD YDU ULD LDE EOHV 3 : Fly(R) WKH GR GRP PDL QV R RI I WKH Y YD DULD ULDE EOHV DQG FRQVWUDLQWV At(R,E) RQ WKH VSH VSHF FL IL F YD YDO OXH XHV V D VHW RI YD YDU UL DEOHV FDQ W WD DNH At(A,E) P-At(R,E) At(R,E) LQ FR PELQDWL LQDWLR RQ ),1' DQ DV VLJQPHQW RI YDOXHV WR At(B,E) P-At(A,E) At(A,E) P-At(B,E) At(B,E) DO DOO O WKH YDULD DULDE EOHV ZKLFK UHVSHFWV D DO OO FR QVW QVWU UDLQWV At(R,M) (At-R-M-1 = Fly-R-1)] ; etc.. >& RU UH VS UH RQ JU GV HV VLR WR Q D ED VH G SU RR I Constraints: Mutual exclusion ~[ ( In-A-1 = Load-A-1) & @ Variables: Propositions (In-A-1, In-B-1, ..At-R-E-0 …) Domains: Actions supporting that proposition in the plan In-A-1 : { Load-A-1, #} At-R-E-1: {P-At-R-E-1, #} Activation In-A-1 != # & In-B-1 != # (Goals must have action assignments) In-A-1 = Load-A-1 => At-R-E-0 != # , At-A-E-0 != # (subgoal activation constraints) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ W] >.DX Q@ HOPD 6 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Compilation to SAT *R DO V ,Q$ Q$, ,Q Q% 1: Load(A) In(A) 2 : Load(B) In(B) 6$7 L LV V &6 &63 3 ZLW ZLWK K %R ROHDQ 9D 9DU ULDEOH DEOHV V 3 : Fly(R) At(R,E) At(R,M) At(A,E) P-At(R,E) At(R,E) At(B,E) P-At(A,E) At(A,E) P-At(B,E) At(B,E) Init: At-R-E-0 & At-A-E-0 & At-B-E-0 Goal: In-A-1 & In-B-1 Graph: “cond at k => one of the supporting actions at k-1” In-A-1 => Load-A-1 In-B-1 => Load-B-1 At-R-M-1 => Fly-R-1 At-R-E-1 => P-At-R-E-1 Load-A-1 => At-R-E-0 & At-A-E-0 Load-B-1 => At-R-E-0 & At-B-E-0 P-At-R-E-1 => At-R-E-0h ~In-A-1 V ~ At-R-M-1 $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ “Actions => preconds” ~In-B-1 V ~At-R-M-1 “Mutexes” 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Compilation to Integer Linear Programming ,/ ,/3 3 * LYHQ D V VH HW R I UHDO YD YDO OX HG YDULD YDULDE EOHV D OLQHDU REMHFWLY REMHFWLYH H I XQFWLRQ RQ W WK KH YD YDU ULD LDE EOHV OHV D VHW R I O OL RI LQ HDU LQHTXDOLWLHV R Q WKH YDULDE I LQWHJ LQWHJU UDO DOL LW \ U HVW ULFWLRQV RQ W YDULDEO OHV DQ G D VHW R WK KH YD YDU ULDEO DEOH HV )LQG WK H YDOXHV R I W WK KH I HD HDV VLE LEOOH YD YDU ULDEO DEOH HV I IR RU Z ZK K LF K W WKH KH REMH REMHF FW LYH I IX X Q FW L R Q DWWDLQV WKH PD[L D[LP PXP YDOXH LQWHJ LQWHJH HU SU SUR RJUDP JUDPP PLQJ FR UU HVS RQG RQGV V FORVHO\ W R 6$7 SU REOH REOHP P * Motivations – Ability to handle numeric quantities, and do optimization – Heuristic value of the LP relaxation of ILP problems * Conversion – Convert a SAT/CSP encoding to ILP inequalities » E.g. X v ~Y v Z => x + (1 - y) + z >= 1 – Explicitly set up tighter ILP inequalities (Cutting constraints) » If X,Y,Z are pairwise mutex, we can write x+y+z <= 1 DXW] (instead of x+y <=1 ; y+z <=1 ; z +x <= 1) UH . $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ & > WL DW LP HW DO RORX O V > :DVO VHQ HW D 'LPRS 9R FNPD\U %R V@ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L DQ P @ XU HU )R HW 3 V DQ + Compilation to Binary Decision Diagrams (BDDs) %''V VXSSR DQG VXSSRU ERR G GLU HFW PDQ LSX ODWL UW FR PSDFW UHS ROHDQ UHSU UHVHQ HQW WDW LR Q DQ DWLR RQ RI ER ; IR UPX UPXOODH RQ D ILQLWH V VH HW R I SU SUR RSRVLWLR SRVLWLRQ QV 3 RSXOD RSXODU U LQ &$' FRP FRPP PXQLW\ 6W IRU 6WD UP XODH LQWR %''V DQG IR U DQG DUG DO DOJ JR ULWKP LWKPV V IRU FRQYHUWLQJ D ERR OH DQ IR VXSSRUWLQJ VWDQGDUG ERR OH DQ RSHU RSHUD DWL RQV RQ W WK KH P > %U\DQW HW HW DO DO@ ; * Idea: Represent disjunctive plans as BDDs and plan extension as BDD operations – Proposition list at level k is an approximation to the set of states reachable in k steps. » The set can be represented compactly as BDDs » Plan growth can be modeled as direct manipulations on BDD O Operations such as “action projection” need to be modeled as BDD modifications $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ %'' IR IRUU ; ; 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Relative Tradeoffs Offered by the various compilation substrates * CSP encodings support implicit representations – More compact encodings [Do & Kambhampati, 2000] – Easier integration with Scheduling techniques * ILP encodings support numeric quantities – Seamless integration of numeric resource constraints [Walser & Kautz, 1999] – Not competitive with CSP/SAT for problems without numeric constraints * SAT encodings support axioms in propositional logic form – May be more natural to add (for whom ;-) * BDDs are very popular in CAD community – Commercial interest may spur faster algorithms (which we can use) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L CSP Encodings can be more compact: GP-CSP Graphplan Satz Relsat GP-CSP Problem time (s) mem time(s) mem time (s) mem time (s) bw-12steps 0.42 1M 8.17 64 M 3.06 70 M 1.96 mem 3M bw-large-a 1.39 3M 47.63 88 M 29.87 87 M 1.2 11M rocket-a 68 61 M 8.88 70 M 8.98 73 M 4.01 3M rocket-b 130 95 M 11.74 70 M 17.86 71 M 6.19 4M log-a 1771 177 M 7.05 72 M 4.40 76 M 3.34 4M log-b 787 80 M 16.13 79 M 46.24 80 M 110 4.5M hsp-bw-02 0.86 1M 7.15 68 M 2.47 66 M .89 4.5 M hsp-bw-03 5.06 24 M > 8 hs - 194 121 M 4.47 13 M hsp-bw-04 19.26 83 M > 8 hs - 1682 154 M 39.57 64 M 'R .DP .DPEEKDPSDW KDPSDWLL $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Advantages of CSP encodings over SAT encodings: GP-CSP Size-based EBL Rel-based EBL Problems time (s) mem time mem GP-CSP Speedup/Mem-ratio for Rel-10 EBL GP SATZ Relsat bw-12steps 1.31 11 M 1.46 10 M 1.34x/0.30x 0.28x/0.1x 5.60x/6.40x 2.10x/7.00x bw-large-a 259 24 M 134 26 M 9.21x/0.42x 0.01x/0.12x 0.36x/3.38x 0.22x/3.34x rocket-a 2.08 8M 2.39 11 M 1.68x/0.27x 28.45x/5.54x 3.72x/6.36x 3.76x/6.63x rocket-b 3.55 9M 4.00 10 M 1.55/0.40x 32.50x/9.50x 2.94x/7.00x 4.47x/7.10x log-a 2.37 18 M 2.30 18 M 1.45x/0.22x 770x/9.83x 3.07x/4.00x 1.91x/4.22x log-b 39.55 19 M 35.13 19 M 3.13x/0.29x 22.40x/4.21x 0.46x/4.16x 1.32x/4.21x log-c 61 24 M 48.72 hsp-bw-02 1.03 12 M 1.09 12 M 0.82x/0.37x 0.79x/0.08x 6.56x/5.67x 2.27x/5.50x hsp-bw-03 5.04 26 M 5.17 41 M 0.86x/0.32x 0.98x/0.59x > 5570x 37.52x/2.95x hsp-bw-04 38.01 86 M 23.89 86 M 1.65x/0.75x 0.81x/0.97x > 1205x 70.41x1.79x 25 M 10.47x/0.88x > 220x 24.42x/3.36x 2.61x/3.56x Size of learning: k = 10 for both size-based and relevance-based 6SHHGXS RYHU *3&63 XS WR [ )DVWHU WKDQ 6$7 LQ PRVW FDVHV XS WR [ RYHU %ODFNER[ $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Direct vs. compiled solution extraction Compiled DIRECT Need to adapt CSP/SAT techniques Can exploit approaches for compacting the plan Can make the search incremental across iterations $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ Can exploit the latest advances in SAT/CSP solvers Compilation stage can be time consuming, leads to memory blowup Makes it harder to exploit search from previous iterations Makes it easier to add declarative control knowledge 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Disjunctive planners based on BSS and PS refinements? Graphplan can be seen as a disjunctive planner based on state-space refinement. – How about planners based on other refinements? * Chief difficulty lies in generalizing the refinements to disjunctive plans, while retaining their progressivity * – The mutex propagation step of Graphplan is what makes it progressive Generalization is however quite easy If we sacrifice “progressiveness” of refinements Basic idea: – Set up bounded length disjunctive structure – Search for a substructure that satisfies solution properties » Use lines of proofs $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L >0DOL .DPEKDPSDWL PEKDPSDWL @ @ Lines of Proof as basis for (naïve) encodings * Loop from k=1, until a solution is found – Set up k-length sequence of disjunctive actions (a1 V a2 V ….V an) » In effect, a direct naïve refinement is used (monotonic, complete, but not progressive) – Impose constraints, satisfaction of which ensures that some subsequence of the disjunctive sequence is a solution » The constraints set up lines of proof O State-space proofs – Graphplan’s backward search can be thought of as setting up backward proof O Causal proofs – Convert the constraints into your favorite combinatorial substrate and solve $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ a1 a2 a3 …. an a1 a2 a3 …. an 1 2 a1 a2 a3 …. an a1 a2 a3 …. an k 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Encodings based on state-based proofs Propositions corresponding to initial conditions and goals are true at their respective levels P1-0 & P2-0 & P7-k & P9-k At least one of the actions at each level will occur a1-j V a2-J V … V an-j Actions imply their preconditions and effects ai-k => precai-k-1 & Effai-k P1 P2 a1 a2 a3 .. .. .. .. .. a99 a100 P1 P2 P3 P4 ... a1 a2 a3 .. .. .. .. .. a99 a100 P1 P2 P7 P9 ... >&RU *UDDSKSODQ >&RUUUHVSRQGV WR *U %DFN %DFNZZDUDUGG 6HDUFK@ Backward proof (explanatory frame) Forward proof (classical Frame) A proposition P changes values between j and j+1 only if an action occurs that makes it so ~Pi-j & Pi-(j+1) => al-j V am-j .. Where al, am… add Pi No pair of interacting actions must occur together ~aj-k V ~am-k forall k forall aj,am that interfere A proposition P at j remains true if no action occuring at j+1 deletes P Pi-j & Ak-(j+1) => Pi-j forall Ak that don’t affect Pi No more than one action occurs at each step ~aj-k V ~am-k forall j,m,k $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Encodings based on Causal proofs G1 S Needs(S I1 Needs(S I2 Needs(S In S1 a1 a2 a3 …. an S2 a1 a2 a3 …. an S3 a1 a2 a3 …. an Each step is mapped to exactly one action Si = A1 V Si = A2 … ; ~( Si = Ai & Si = Aj) A step inherits the needs, adds and deletes of the action it is mapped to Si = Aj => Adds(Si, Pa) & Needs(Si, Pp) & Deletes(Si, Pd) A Step get needs, adds and deletes only through mapped actions Adds(Si, Pa) => Si = Aj V Si = Ak … (Ai, Ak add Pa) Every need is established by some step Needs(Si,Pj) => Estab(S1, Pj, Si) V Estab(S2, Pj, Si) … V Estab(Sk, Pj, Si) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ Sk a1 a2 a3 …. an Sf Needs(Sf G1 Needs(Sf G2 Establishment with causal links Estab(S1,Pj,Si) => Link(S1,Pj,Si) Link implies addition & precedence Link(Si,Pj,Sk) => Adds(Si,Pj) & Precedes(Si,Pj) Link implies preservation by intervening steps Link(Si,Pj,Sk) & Deletes(Sm,Pj) => Precedes(Sm, Si) V Precedes(Sk, Si) Precedence is irreflexive, asymmetric and transitive... 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L >0DOL .DPEKDPSDWL PEKDPSDWL $$ $$$$, ,@ Alternative causal encodings G1 S Needs(S I1 Needs(S I2 Needs(S In S1 a1 a2 a3 …. an S2 a1 a2 a3 …. an S3 a1 a2 a3 …. an Sk a1 a2 a3 …. an Sf Needs(Sf G1 Needs(Sf G2 Whiteknight based establishment Contiguity based precedence Some preceding step adds Estab(S1,Pj,Si) => Adds(S1, Pj) & Precedes (S1, Sj) For every preceding step deleting a needed condition, there is a white-knight that adds it back Needs(Sj, Pj) & Deletes(Sd, Pj) & Precedes(Sd,Sj) => Wknight(S1, Sj, Sd, Pj) V Wknight(S2,Sj,Sd,Pj) V …. Wknight(Sw,Sj,Sd,Pj) => Precedes(Sw, Sj) & Precedes(Sd, Sw) & Adds(Sw, Pj) Step Sj is in position j Precedes(S1,S2) Precedes(S1, S3) ……. Precedes(Sj,Sj+k) Eliminates the need for O(k3) Transitivity clauses Eliminates the need for O(k2) causal link variables $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Tradeoffs between encodings based on different proof strategies * * * Progression (classical frame) encodings lead to higher number of clauses, and allow only serial plans – O( #prop * #actions * #levels) – To allow parallel plans, we need to look at frame axioms with sets of actions, increasing the clauses exponentially Regression (explanatory frame) encodings reduce clauses, and allow parallel plans – O( #prop * #levels) Empirical results validate dominance of regression over progression encodings – The SAT compilation of Graphplan plan-graph corresponds to a form of regression-proof based encoding $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Tradeoffs between encodings based on different proof strategies * * Causal encodings in general have more clauses than statespace encodings – O( #actions x #actions x #fluents) for causal link variables » Could be reduced by using white-knight based proofs – O(#actions x #actions x #actions) clauses for partial ordering » Could be reduced by using contiguous ordering – However, the best causal encodings will still be dominated by the backward state-space encodings [Mali & Kambhampati, 99] Paradoxical given the success of partial order planners in conjunctive planning? – Not really! We are using causal proof which is typically longer than state-based proofs, and are not using the flexibility of step insertion. » Can be helpful in incremental planning & Plan reuse » Are helpful in using causal domain specific knowledge (e.g. HTN schemas) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Some implemented disjunctive planners Refinement Graphplan (Blum/Furst) IPP (Koehler) STAN (Fox/Long) GP-EBL (Kambhampati) SATPLAN (Kautz/Selman) Direct Partially 2-consistent refinement with FSR Naïve direct refinement with FSR, BSR, PSR Solution Extraction Direct search on the disjunctive plan Compilation to SAT Blackbox (Kautz/Selman) Same as Graphplan GP-CSP (Do/Kambhampati) Same as Graphplan Compilation to CSP Naïve direct refinement with FSR Compilation to ILP IPP Plan (Walser/Kautz) BDDPlan (Hans-Peter) PROPPlan (Stoerr) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ Naïve direct refinement with FSR Compilation to BDDs 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Conjunctive vs. Disjunctive planners * * * Progress depends on the effectiveness of the heuristics for judging the goodness of a partial plan Space consumption can be regulated Better fit with mixedinitiative, incremental planning scenarios(?) * * * Space consumption is a big issue – Creation and storage of disjunctive structures » CSPs do better by supporting implicit representations Connection to combinatorial substrate Better integration with nonpropositional reasoners (?) +\EULG SOD SODQQQHU QHUVV&RQ &RQWWUROROOOHG VS VSOLWOLWWWLQLQJJ 6H 6HDDUFK LQ WKH VVSSDFH RI GLVMXQF MXQFWWLYH SODODQQV $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 3 7 $5 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L +(85,67,&6 237,0,=$7,216 A Unifying View 6 ( $ 5& + Refinement Planning 5H ILQ LQH HP HQ WV " Conjunctive Refinement Planning 57 3$ &2 &2117 52 52// 5 3$ &DQ &DQG GL G D WH VH W VH PDQ DQW WLF LFV V ) 66 66 % %66 66 3 6 Disjunctive Refinement Planning +R +RZ Z DU DUH H V HW HWV V RI SODQ ODQV V U HS U HV HQ WH WHG G FR FRP PS DF DFW WO \" +R +RZ Z DU DUH H W KH KH\ \ UUH HI LQ LQHG HG" " +R +RZ Z DU DUH H W KH KH\ \ V VH HD U F KH KHG G" , Graph-based 7 CSP Directed Partial Consistency enforcement Reachability Relax Subgoal Relevance interactions Heuristics/Optimizations 0$ $ 5 5HF HFHHQ W $ GYD Q $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ : KD W DU DUH H 3ODQ ODQV V" L $, 3 SAT ILP BDD HTN Schemas TL Formulas Cutting Planes Case-based Abstraction-based Failure-based Domain Analysis* +DQ +DQG GF FR RG HG / HDUQ DUQH HG Domain-customization 3$ 5 7 6X EED UDR. DPE KD PS PSDD WL 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Distance Heuristics from Relaxed Problems Null Plan set R1 Problem: Estimating the distance of a (partial) state from the initial (or goal) state R2 Rk Solution: Relax the problem by assuming that all subgoals are independent (ignore +ve / -ve interactions between actions) Solve the relaxed problem and use the length of the solution as part of the heuristic " P1 P2 Pk " Properties: The heuristic is neither a lower bound (-ve interactions) nor an upper-bound (+ve interactions). --leads to inoptimal solutions (in terms of plan length) >>Possible to reduce inoptimality by considering interactions History: First used in IxTET [Ghallab et. al. 1995] hinted at by Smith’s Operator Graphs [Smith et. al., 1995] independently re-discovered in UNPOP [McDermott, 1996] independently re-re-discovered in HSP [Bonet & Geffner, 1997] $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ P1,P2 Q11 Q11 Q13 Q12 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L A1 G1 B1 P1 B2 P2,~P1 C2 P2 D1 Q11 Init: Q12 Goal: G1 2 2 B1 P1 5 G1 5 A1 Top down greedy distance computation H G H QF Q H S Q ,QGH XPSWLR V V $ +ve as well as 2 P2 2 B2 C2 ∞+1 -ve interactions between P1 and P2 are ignored…. 1 Q11 Q13 ∞ 1 D1 Q12 0 $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 1 : HQ 2 ULY ' ' G Q D HP ' 3 72 For each partial plan in the search queue, estimate its h-value using this procedure 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Bottom-up Distance computation * Each condition (state-variable & value combo) has a distance – Initialized to 0 for all conditions in the initial state – ∞ for everything else * Repeat until reaching fix-point (until no distances change) – Select an action A to be applied. Let P1 …Pm be its preconditions and E1 ……En be the conditions it adds. – Reset the distance values of Ei as follows %R § · Dist ( Ei ) Min¨¨ Dist ( Ei ), Dist ({P1..Pi }) 1¸¸ © Old Dist ¹ ,QG HSHQG HSHQGH HQFH Dist ({P1..Pi }) ¦i Dist ( Pi ) DV DVV VX PS PSWWLRQ $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ XS P R WW 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Improving the Heuristic * Subgoal independence assumption leads to – Inadmissibility (when subgoals interact positively; A is +ve) – Un-informedness (when subgals interact negatively; I is large) * Informedness improved by accounting for -ve interactions – Use information about infeasible subgoal sets (“Mutexes”) » No plan of length k can achieve p and q » No plan can ever achieve p and q * Admissibility can be improved by accounting for +ve +HXU +HXULLVW LF 7UXH 'L VWDQFH – Solve the planning problems ignoring -ve interactions between actions to get lower bound on plan length (distance) &R VW! interactions A = Maxs [h(s) -h*(s)] I = Maxs | h(s) - h*(s) | 6WD WH V! $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L D WL D PS K E .DP@ Using J , >/RQ $$$ the Planning Graph to account for +ve/-ve Interactions * Mutex relations can help account for -ve interactions – Grow the PG until level-off (Polynomial operation) – Distance of a set {P1 P2 …Pn} is the index of the first level of the PG where P1…Pn are present without any mutexes » Easy to generalize to n-ary mutexes » Informedness can be improved by partitioning P1…Pn into some k partitions, S1…Sk and summing the distances of Si * +ve interactions can be accounted for by extracting a plan from the PG ignoring mutex relations – Run Graphplan algorithm, but do not do any mutex propagation. ,QVLJKW,GHDVRIGLVMXQFWLYHSODQQLQJKHOS LQJHQHUDWLQJKHXULVWLFVIRUFRQMXQFWLYHSODQQHUV $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Plan Graph produces a large spectrum of effective heuristics with differing tradeoffs >/RQJ .DPEK .DPEKDDPSDWL $$$, @@ $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Action Templates Planning Graph Graphplan Plan extension phase (based on STAN) Extraction of Heuristics Actions in the Last Level Heuristic Problem Spec (Init, Goal state) Regression Planner (based on HSP-R) Solution Plan $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L AltAlt shows quite impressive performance Logistics Domain(AIPS-00). 100000 STAN3.0 HSP2.0 Action Templates HSP-r 10000 Graphplan Plan extension phase (based on STAN) Actions in the Last Level AltAlt1.0 Extraction of Heuristics 1000 Time(Seconds) Planning Graph Heuristic Problem Spec (Init, Goal state) 100 /RJLVLVWWLF LFVV :RU :RUOOG 10 Regression Planner (based on HSP-R) 1 Schedule Domain (AIPS-00) 0.1 100000 Solution Plan 0.01 10000 Proble ms. Blocks-world domain (AIPS-00) STAN3.0 10000 HSP2.0 1000 STAN3.0 AltAlt1.0 HSP-r AltAlt1.0 %ORFNV : :RRUOUOGG Time(seconds) 100 Time(Seconds) HSP2.0 1000 100 10 10 1 1 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 0.1 0.1 11 21 31 41 51 61 71 81 91 101 111 121 131 141 151 161 6FKHG HGXXOLQ OLQJJ :R :RUUOG 0.01 Problems 0.01 0.001 Problems $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L The cost of heuristic computation can be controlled... Heuristic extracted from partial graph vs. leveled graph 100000 Comparing Solution Qualities 30 Levels-off Lev(S) 10000 25 6R 6ROOXW XWLLRQ 4XDOLW\ 20 Levels off 1000 Time(Seconds) 15 10 100 5 10 0 0 5 10 15 20 25 30 Lev(S) 1 1 11 21 31 41 51 61 71 81 91 101 111 121 131 141 151 161 0.1 Problems $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Distance based heuristics help 6DQFKH] DWL S CSP Search too! P KD 6 E ,3 .DP $ q9DULDEOHRUGHULQJ3LFNWKHJRDOZLWKWKHKLJKHVWOHYHOILUVW q9DOXHRUGHULQJ3LFNWKHDFWLRQZKRVHSUHFRQGLWLRQOLWHUDOVDSSHDU XQPXWH[HGDWWKHORZHVWOHYHO &DQJLYHKXJHVSHHGXSV [RQURFNHWZRUOG[RQJULSSHUSUREOHPV ,VLQVHQVLWLYHWRWKHOHQJWKRIWKHSODQQLQJJUDSK &DQVWDUWVHDUFKLQSODQQLQJJUDSKVRIOHQJWKVKLJKHUWKDQWKH PLQLPDOVROXWLRQEHDULQJSODQQLQJJUDSK 5RFNHWH[WE JRH JRHV V IURP W R VW HS HSV V D DQ QG WWR R V VH HF ZKHQ VH VHD DUFKL KLQ QJ RQ D SO SOD DQQL QQLQ QJ JUD JUDS SK R RII OH OHQ QJW K LQV QVWHD WHDG G RI $YRLGVH[KDXVWLYHVHDUFKLQIDLOLQJOHYHOV $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Using Distance Heuristics * Conjunctive FSS planners need to recompute the heuristic as the init state changes – UNPOP [McDermott], HSP [Bonet & Geffner], FF [Hoffman] » GRT [Refanidis & Vlahavas] elaborates the goal state and computes heuristic in the reverse direction * Conjunctive BSS planners can get by with a single computation of the heuristic – HSP-R [Bonet & Geffner], AltAlt [Long & Kambhampati &..] * Conjunctive PS planners can use distance heuristics and mutex information to rank partial plans and flaw resolution choices – IxTET [Ghallab et. al.]; AltAlt-UC [Long & Kambhampati] * Disjunctive planners can use distance heuristics as the basis for variable and value ordering heuristics – GP-HSP [Kambhampati & Nigenda], GP-CSP [Do & Kambhampati] $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Actions with Resources and Duration Load(P:package, R:rocket, L:location) Resources: ?h : robot hand Preconditions: Position(?h,L) Free(?h) Charge(?h) > 5 Effects: Constraints: [?s, ?e] ?s ?s holding(?h, P) [?s, ?t1] depositing(?h,P,R) [?t2, ?e] Busy(?h) [?s, ?e] Free(?h) ?e Charge - = .03*(?e - ?s) ?e ?t1 < ?t2 ?e - ?s in [1.0, 2.0] &D SD FL W\ W\UU RE RW RW "V "H > @ 3 R V "K / + R O G G" "K 3 )UH )UHH H " K GH S "K 3 % XV XV\ \ " K )UH )UHH H " K 0$ $ 5HF HFHHQW $ GY GYD D QFHV L $, 3 3OO 6X EE .DPE EKD PS EED D UDR .DP PSD D WL +DQGOLQJ5HVRXUFHV0HWULF DQG7HPSRUDO&RQWUDLQWV $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L / '8 +( 6& 6F KG XO H (5 1 1 3/ $ &D XVD O3 O DQ Adapting to Metric/Temporal Planning (5 Schedulers already routinely handle resources and metric/temporal constraints. – Let the “planner”concentrate on causal reasoning – Let the “scheduler” concentrate on resource allocation, sequencing and numeric constraints for the generated causal plan 1HHGEHWWHUFRXSOLQJWRDYRLGLQWHUPRGXOHWKUDVKLQJe $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Issues in handling time and resources HU Z &D XVD O3 – Low level constraint propagation (5 » Loose path consistency on TCSPs 11 $ 3/ » Bounds on resource consumption, » LP relaxations of metric constraints – Pre-emptive conflict resolution The more aggressive you do this, the less need for a scheduler.. * How do the modules interact? 6F KG XOH * Monolithic or loosely-coupled? * How can the Planner keep track of consistency? ODQ QV $ ( 8/ ' +( 5 6& – Failure explanations; Partial results * Which Planners are best suited for time and resources?** $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L RealPlan--Master/Slave 0DVWHU6ODYH 5HDO3ODQ06 3 YD SDWL D W V YD DP >6UL DPEK @ . & 3 ( $ $, $ 9DULDEOHV $FWLRQV 6 9DOXHV 5HVRXUFHV 3ODQQHUGRHVFDXVDOUHDVRQLQJ 6FKHGXOHUDWWHPSWVUHVRXUFH DOORFDWLRQ ,IVFKHGXOHUIDLOVSODQQHUKDVWR UHVWDUW $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L RealPlan: Peer-to-Peer F W HG HQ H U L H G WLRQ EHWZ XOHU D Q J D G O Q ([S WUDFNL G6FKH N EDF QHUDQ 3ODQ 3 9DULDEOHV )DFWV 9DOXHV $FWLRQV Shuf_b8r4 Shuf_b8r4 RealPlan-PP Class Time INFRES FIX 7 6 9DULDEOHV $FWLRQV 9DOXHV 5HVRXUFHV #bk BTPWF Time RealPlan-MS Class Time Speedup (x) BTPWF RealP lanMS 2.52 4 >3 hr SAMELEN 9373 >4170 3619 8.74 1 >3 hr SAMELEN 9373 >1236 1072 Huge_r6 INFRES 4.53 4 976 INCRLEN 11056 215 2441 Huge_r6 FIX 17.48 3 991 INCRLEN 11056 56.7 632 Huge_r6 SAMELEN 20.59 2 983 INCRLEN 11056 47.7 537 UH D D N D SR VK OS OD LH Q DV K D WP VX O H GX Problem 5 5HDO3ODQ33 3HHU3HHU $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L What planners are good for handling resources and time? * State-space approaches have an edge in terms of ease of monitoring resource usage – Time-point based representations are known to be better for multi-capacity resource constraints in scheduling * Plan-space approaches have an edge in terms of durative actions and continuous change – Notion of state not well defined in such cases (Too many states) – PCP representations are known to be better for scheduling with single-capacity resources * Disjunctive compilation approaches may provide better basis for interacting with schedulers and other external constraint reasoners – Conjunctive approaches better for monolithic architectures (disjunctive ones may lead to very large encodings) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L >$G DSWHG IIUURP 'DY 'DYLLG 6P 6PLLWKnV ,QY ,QYLLWHG 7 DO DON N D DWW $,3 $,36 6 @ Tradeoffs in the current implementations Multi-capacity Metric Resources Quantities Graphplan Optimization Continuous Time Speed hard? hard IPP hard? hard TGP good SAT Compilation moderate? moderate LPSAT moderate? very hard? good ILP Compilation easy? easy ILP-plan easy ILP-plan very hard? fair? Conjunctive PS moderate IxTeT moderate Zeno moderate? easy HSTS fair? Work on loosely-coupled architectures is just starting… [Srivastava, 2000] $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L 3 7 $5 &86720,=,1* 3/$11(56:,7+ '20$,163(&,),& .12:/('*( A Unifying View 6 ( $ 5& + Refinement Planning 1. User-assisted customization 2. Automated customization 5H ILQ LQH HP HQ WV " Conjunctive Refinement Planning 5 3$ &2 &2117 52 52// &DQ &DQG GL G D WH VH W VH PDQ DQW WLF LFV V ) 66 66 % %66 66 3 6 Disjunctive Refinement Planning Graph-based CSP Directed Partial Consistency enforcement Reachability Relax Subgoal Relevance interactions SAT U HS U HV HQ WH WHG G FR FRP PS DF DFW WO \" +R +RZ Z DU DUH H W KH KH\ \ UUH HI LQ LQHG HG" " ILP BDD HTN Schemas TL Formulas Cutting Planes Heuristics/Optimizations 0$ $ 5 5HF HFHHQ W $ GYD Q +R +RZ Z DU DUH H V HW HWV V RI SODQ ODQV V +R +RZ Z DU DUH H W KH KH\ \ V VH HD U F KH KHG G" 7, 57 3$ : KD W DU DUH H 3ODQ ODQV V" Case-based Abstraction-based Failure-based Domain Analysis* +DQ +DQG GF FR RG HG / HDUQ DUQH HG Domain-customization $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 3$ 5 7 6X EED UDR. DPE KD PS PSDD WL L $, 3 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Improving Performance through Customization * Biasing the search with control knowledge acquired from experts – Non-primitive actions and reduction schemas – Automated synthesis of customized planners » Combine formal theory of refinement planning and domain-specific control knowledge * Use of learning techniques – Search control rule learning – Plan reuse $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L User-Assisted Customization (using domain-specific Knowledge) * Domain independent planners tend to miss the regularities in the domain * Domain specific planners have to be built from scratch for every domain An “Any-Expertise” Solution: Try adding domain specific control knowledge to the domainindependent planners 0 ( R VH & US X $ HU S Q Q OO D OD S 'RPDLQ 6SHF 6SHFLLILF .QR .QRZ ZOH GJH 2 OH E 5 ]D L & P HU $ R Q VW Q X OD S & UOG QFR ZR 5R FNV % O R QQ H U 3O D $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ QFR 5R LVWLFV O R J QQ H U 3O D QFR 5R VKRS MRE QQHU 3O D 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Many User-Customizable Planners * Conjunctive planners – HTN planners » SIPE [Wilkins, 85-] » NONLIN/O-Plan [Tate et. al., 77-] » NOAH [Sacerdoti, 75] » Also SHOP (Nau et. al., IJCAI-99) – State-space planners » TLPlan [Bacchus & Kabanza, 95; 99] » TALPlan [Kvarnstrom & Doherty, 2000] WH" V" HOD HRII U \ G WKH WUD G R H W KH Z U +R DW D K : – Customization frameworks » CLAY [Srivastava & Kambhampati, 97] * Disjunctive planners – HTN SAT [Mali & Kambhampati, 98] – SATPLAN+Dom [Kautz & Selman, 98] $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L With right domain knowledge any level of performance can be achieved... * HTN-SAT, SATPLAN+DOM beat SATPLAN… * TLPLAN beats SATPLAN, GRAPHPLAN – But uses quite detailed domain knowledge * SHOP beats TLPLAN…(but not KH 7 KH 7 : KR – Expects user to write a “program” for the domain in its language » Explicit instructions on the order in which schemas are considered and concatenated JH W TALPlan) V WK H SU FU RY HG L GH LW" SO DQ U R QH I G U W RP KD DL W L Q V NQ FD RZ SD OH EO GJ H RI H" XV LQ J L W" – Expect reduction schemas, declarative knowledge about inoptimal plans $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Types of Guidance * Declarative knowledge about desirable or undesirable solutions and partial solutions (SATPLAN+DOM; Cutting Planes) * Declarative knowledge about desirable/undesirable search paths (TLPlan & TALPlan) * A declarative grammar of desirable solutions (HTN) O ODDUJHO UJHO\\ LQGHS LQGHSH HQG HQW R I WKH G HWD HWDLLO V R I WKH VSHF VSHFLLI LF SODQQH SODQQHUU >DIILQ >DIILQLLWLH V G R H[LV H[LVWW E HWZ HWZH HHQ VSH FLIL LILF F W\SHV R RII JX LGD QFH D QG SO DQQHUV 3O DQQH U VSH FLIL LILF F ([S ([SH HUW Q QH HHGV WR XQG XQGH HUVWDQG WK WKH H VSH FLILF G HWDLOV RI WK WKH H SO DQQHUn DQQHUnVV VHD VHDUUFK VSDFH * Procedural knowledge about how the search for the solution should be organized (SHOP) * Search control rules for guiding choice points in the planner’s search (NASA RAX) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Ways of using the Domain Knowledge * As search control – HTN schemas, TLPlan rules, SHOP procedures – Issues of Efficient Matching * To prune unpromising partial solutions – HTN schemas, TLPlan rules, SHOP procedures – Issues of maintaining multiple parses * As declartative axioms that are used along with other knowledge – SATPlan+Domain specific knowledge – Cutting Planes (for ILP encodings) – Issues of domain-knowledge driven simplification * Folded into the domain-independent algorithm to generate a new domain-customized planner – CLAY – Issues of Program synthesis $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Task Decomposition (HTN) Planning * The OLDEST approach for providing domain-specific knowledge – Most of the fielded applications use HTN planning * Domain model contains non-primitive actions, and schemas for reducing them * Reduction schemas are given by the designer – Can be seen as encoding user-intent » Popularity of HTN approaches a testament of ease with which these schemas are available? * Two notions of completeness: – Schema completeness » (Partial Hierarchicalization) – Planner completeness Travel(S,D) GobyTrain(S,D) GobyBus(S,D) BuyTickt(T) Getin(B,S) Getin(T,S) BuyTickt(B) Getout(B,D) Getout(T,D) Hitchhike(S,D) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Modeling Action Reduction GobyBus(S,D) In(B) Hv-Tkt t1: Getin(B,S) t2: BuyTickt(B) t3: Getout(B,D) Hv-Money At(D) Get(Money) GobyBus(Phx,Msn) Buy(WiscCheese) Hv-Money In(B) t1: Getin(B,Phx) Hv-Tkt t2: BuyTickt(B) Get(Money) Af fin ity be tw pl een an -s red pa u ce cti pl on an sc ni he ng m as an d At(Msn) t3: Getout(B,Msn) Hv-Money At(D) Buy(WiscCheese) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Dual views of HTN planning * Capturing hierarchical structure of the domain – Motivates top-down planning » Start with abstract plans, and reduce them * Many technical headaches – Respecting user-intent, maintaining systematicity and minimality [Kambhampati et. al. AAAI-98] » Phantomization, filters, promiscuity, downwardunlinearizability.. * Capturing expert advice about desirable solutions – Motivates bottom-up planning » Ensure that each partial plan being considered is “legal” with respect to the reduction schemas » Directly usable with disjunctive planning approaches [Mali & Kambhampati, 98] * Connection to efficiency is not obvious Relative advantages are still unclear... [Barrett, 97] $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L [Mali & Kambampati, AIPS-98] SAT encodings of HTN planning * Abstract actions can be seen as disjunctive constraints &R QVWUDLQ VWUDLQWWV IU RP DF DFWWLRQE LRQEDDVHG HQFR HQFRG GLQJ QJVV $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6R 6ROOXW XWLLR QV +7 1 FRQVWUD FRQVWUDLLQWV +7 1FRPS SOOLDQW 6R 6ROOXW XWLLR QV IIR RU DF DFWWLRQ ED VH G HQFRGLQ GLQJ JV – K-step encoding has each of the steps mapped to a disjunction of the non-primitive tasks – If a step s is mapped to a task N, then one of the reductions of N must hold (**The heart of encoding setup**) – + The normal constraints of primitive action-based encoding » Causal encodings seem to be a natural fit (given the causal dependencies encoded in reduction schemas) 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Solving HTN Encodings Puzzle: How can increasing encoding sizes lead to efficient planning? Abstract actions and their reductions put restrictions on the amount of step-action disjunction at the primitive level. --Reduction in step-action disjunction propagates e.g. Fewer causal-link variables, Fewer exclusion clauses… Savings won’t hold if each non-primitive task has MANY reductions 7,0( & &OODXVHV [Kambhampati & Mali, AIPS-98] $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L >1D X HW D OO @ Full procedural control: The SHOP way Shop provides a “high-level” programming language in which the user can code his/her domain specific planner -- Similarities to HTN planning -- Not declarative (?) The SHOP engine can be seen as an interpreter for this language 7 U D YH O E E\\ E EXV XV RQO\ LI JRLQ JRLQJ J E \ WD [L G RHVQ RHVQnnW Z RUN R XW Blurs the domain-specific/domain-independent divide How often does one have this level of knowledge about a domain? $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L >.DXW] 6HOPDQ 6HOPDQ $,36 ,36@@ Non-HTN Declarative Guidance Invariants: A truck is at only one location at(truck, loc1, I) & loc1 != loc2 => ~at(truck, loc2, I) Optimality: Do not return a package to the same location at(pkg, loc, I) & ~at(pkg,loc,I+1) & I<J => ~at(pkg,loc,j) Simplifying: Once a truck is loaded, it should immediately move ~in(pkg,truck,I) & in(pkg,truck,I+1) & at(truck, loc, I+1) => ~at(truck, loc, I+2) Once again, additional clauses first increase the encoding size but make them easier to solve after simplification (unit-propagation etc). $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Rules on desirable State Sequences: TLPlan approach TLPlan [Bacchus & Kabanza, 95/98] controls a forward state-space planner Rules are written on state sequences using the linear temporal logic (LTL) LTL is an extension of prop logic with temporal modalities U until [] always O next <> eventually Example: If you achieve on(B,A), then preserve it until On(C,B) is achieved: [] ( on(B,A) => on(B,A) U on(C,B) ) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L TLPLAN Rules can get quite baroque Good towers are those that do not violate any goal conditions Keep growing “good” towers, and avoid “bad” towers s” iou s? v b le “O ru w ese o H th are The heart of TLPlan is the ability to incrementally and effectively evaluate the truth of LTL formulas. $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L 6U .DPEKDDPSD WL - $,5 6ULLYDVWDYD .DPEK Folding the Control Knowledge into the planner: CLAY approach * Control knowledge similar to TLPlan’s * Knowledge is folded using KIDS semi-automated software synthesis tool into a generic refinement planning template – Use of program optimizations such as » Finite differencing » Context-dependent & independent simplification * Empirical results demonstrate that folding can be better than interpreting rules Z DUH VRIW WH G R PD WR XW QW D X UUH & HD W RO V &DY LV WR K HV H V\ QW FX UY LQJ OH D UQ S H WH U\ V H Y D K D YH $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Conundrums of user-assisted cutomization * Which planners are easier to control? – Conjunctive planners are better if you have search control knowledge » Forward State Space (according to TLPlan) » Plan-space planners (according to HTN approaches) – Disjunctive planners are better if your knowledge can be posed as additional constraints on the valid plans » Which SAT encoding? O HTN knowledge is easier to add on top of causal encodings * Which approach provides the best language for expressing domain knowledge for the lay user? – (Mine--no, no, Mine!) * What type of domain knowledge is easier to validate? * When does it become “cheating”/ “wishful-thinking” – Foolish not to be able to use available knowledge – Wishful to expect deep procedural knowledge... $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L * Domain pre-processing FR RVW QW H RI [W WKH RI Z &R RUN QMX KD QF V E WL Y HH H5 Q HIL GR Q QH H PH L Q QW WKH 3OD QQ HU V Automated Customization of Planners – Invariant detection; Relevance detection; Choice elimination, Type analysis » STAN/TIM, DISCOPLAN etc. » RIFO; ONLP * Abstraction 0 » ALPINE; ABSTRIPS, STAN/TIM etc. * Learning Search Control rules » UCPOP+EBL, » PRODIGY+EBL, (Graphplan+EBL) * Case-based planning (plan reuse) » DerSNLP, Prodigy/Analogy $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Symmetry & Invariant Detection * Generate potential invariants and test them – DISCOPLAN [Gerevini et. al.] » Allows detection of higher-order mutexes – Rintanen’s planner » Uses model-verification techniques – STAN/TIM » Type analysis of the domain is used to generate invariants – ONLP (Peot & Smith) » Use operator graph analysis to eliminate non-viable choices $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Abstraction * Idea – Abstract some details of the problem or actions. – Solve the abstracted version. – Extend the solution to the detailed version * Precondition Abstraction – Work on satisfying important preconditions first » Importance judged by: O Length of plans for subgoals [ABSTRIPS, PABLO] O Inter-goal relations [ALPINE] O Distribution-based [HighPoint] – Strong abstractions (with downward refinement property) are rare – Effectiveness is planner-dependent » Clashes with other heuristics such as “most constrained first” $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Example: Abstracting Resources * Most planners thrash by addressing planning and scheduling considerations together – Eg. Blocks world, with multiple robot hands * Idea: Abstract resources away during planning – Plan assuming infinite resources – Do a post-planning resource allocation phase – Re-plan if needed (with Biplav Srivastava) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Learning Search Control Rules with EBL Explain leaf level failures Regress the explanations to compute interior node failure explanations 8 &323(% &323(%// Use failure explanations to set up control rules Problems: -- Most branches end in depth-limits >No analytical explanation >Use preference rules? -- THE Utility problem >Learn general rules >Keep usage statistics & prune useless rules If Polished(x)@S & ~Initially-True(Polished(x)) Then REJECT Stepadd(Roll(x),Cylindrical(x)@s) .DPE .DWXNDP 4X 4X .DPEK KDPSDW DPSDWLL .DWXNDP $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Example Rules (Learned) UCPOP If Polished(x)@S & ~Initially-True(Polished(x)) Then REJECT Stepadd(Roll(x),Cylindrical(x)@s) Pruning rule $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ Prodigy If (and (current-node node) (candidate-goal node (shape obj Cyl)) (candidate-goal node (surface-condition obj polished))) Then: Prefer (shape obj cyl) to (surface-condition obj polished) Preference rule 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Case-based Planning Macrops, Reuse, Replay * Structures being reused – Opaque vs. Modifiable – Solution vs. Solving process (derivation) * Acquisition of structures to be reused – Human given vs. Automatically acquired * Mechanics of reuse – Phased vs. simultaneous * Costs – Storage & Retrieval costs; Solution quality $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L ( Ihrig & Kambhampati, JAIR 97) Case-study: DerSNLP * Modifiable derivational traces are reused * Traces are automatically acquired during problem solving – Analyze the interactions among the parts of a plan, and store plans for non-interacting subgoals separately » Reduces retrieval cost – Use of EBL failure analysis to detect interactions * All relevant trace fragments are retrieved and replayed before the control is given to from-scratch planner – Extension failures are traced to individual replayed traces, and their storage indices are modified appropriately » Improves retrieval accuracy 2O 2OG G FDVH FDVHVV $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L DerSNLP: Results 45000 100 90 80 70 0 Performance with increased Training 30000 60 50 40 30 25000 20000 20 5 6 600 500 400 300 200 100 120 4 5 3 1 80 60 0 0 40 3 20 2 3U 3UR REO HP VL]H JR JRDDOV OV Library Size 1 80 0 0 20 10 0 100 60 120 60 40 5000 40 10000 % Solvability with increased traning 20 15000 120 35000 100 40000 (JAIR, 97) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Reuse in Disjunctive Planning * Harder to make a disjunctive planner commit to extending a specific plan first * Options: – Support opaque macros along with primitive actions » Increases the size of k-step disjunctive plan » But a solution may be found at smaller k – Modify the problem/domain specification so the old plan’s constraints will be respected in any solution (Bailotti et. al.) – MAX-SAT formulations of reuse problem » Constrain the encoding so that certain steps may have smaller step-action mapping and ordering choices » Causal encodings provide better support [with Amol Mali] $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Summary * Focus on “Neo-classical” planning Refinement planning provides a unifying view – Conjunctive Refinement Planners – Disjunctive Refinement Planners » Refinement » Solution Extraction O Direct vs. compilation to CSP/SAT * Heuristics/Optimizations – Relaxed Problem heuristics – Consistency enforcement * Customization of planners – User-assisted – Automated * Related approaches to non-classical planning $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L But who is winning??? (Using AIPS-2000 Competition as a benchmark) * 15 planners took part in AIPS-2000 competition * * * * – Representatives from all types of planners we discussed Competition focussed on pure classical problems – Separate tracks for domain-independent and usercustomized planners Domain independent: – FF (Forward state-space planning; Heuristics based on planning graphs, local search) Customized: – TALPlan (control knowledge about good and bad state sequences, applied to a forward state-space planner) Million Dollar question: Will the line-up be same for neoclassical planning (durative actions, continuous change etc?) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Status * Exciting times… – Many approaches with superior scale-up capabilities » Broadened views of planning – Many influences (CSP; OR; MDP; SCM) * Ripe for serious applications – VICAR [JPL]; DeepSpace monitoring [NASA/AMES] – Plant monitoring [Ayslett et. al.] – Manufacturing Process Planning [Nau et. al.; Kambhampati et. al] – Supply chain management/ Logistics » Industrial “Planning” does not have to the optimal scheduling of an inoptimal action selection! $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Resources * Mailing Lists – Planning list digest » http://rakaposhi.eas.asu.edu/planning-list-digest – U.K. P & S List » http://www.salford.ac.uk/planning/home.html * Special Conferences – Intl. Conf. on AI Planning & Scheduling » http://www.isi.edu/aips (April 2000, Breckenrdige, CO) – European Conference on Planning » http://www.informatik.uni-ulm.de/ki/ecp-99.html – Also, AAAI, IJCAI, ECAI, Spring/Fall Symposia * Courses – ASU Planning Seminar Online Notes (2000,1999, 1997, 1995,1993) » http://rakaposhi.eas.asu.edu/planning-class.html $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L $GDSWLQJWR,QFRPSOHWHQHVV 8QFHUWDLQLW\DQG'\QDPLVP Environment (not Static) (not fully Observable) Conflicting Goals perception (imperfect) action (nondeterministic) The most efficient approaches to all these ills $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ are stil 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Incomplete Information * PROBLEM: Values of some state variables are unknown; There are actions capable of sensing (some) of them. – If k boolean state variables are unknown, then we are in one of 2k initial states – Two naïve approaches » PLAN/SENSE/EXECUTE : Solve each of the 2k problems separately; At the execution time sense the appropriate variables, and execute the appropriate plan » SENSE/PLAN/EXECUTE: First sense the values of the variables. Solve the problem corresponding to the sensed values – Problems with naïve approaches » Solving the 2k problems separately is wasteful O Shared structure (Tree structured plans) » Not all variables may be observable (or worth observing) O Conformant planning – (Find non-sensing plans that work in all worlds) O Irrelevant variables (Goal directed planning) $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Incomplete Information: Some Implemented Approaches * Conjunctive planners – CNLP [Peot & Smith; 92] CASSANDRA [Pryor & Collins, 96] add sensing actions to UCPOP; support tree-shaped plans – SADL/PUCCINI [Golden & Weld; 96-98] integrates planning and sensing in the context of a UCPOP-like planner * Disjunctive planners – CGP [Smith & Weld, 98] supports conformant planning on Graphplan – SGP [Weld et. al., 98] supports conditional planning on Graphplan » One plan-graph per possible world/ Interactions among plangraphs captured through induced mutexes – [Rintanen, 99] converts conditional planning to QBF encodings $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Dynamic Environments * PROBLEM: The world doesn’t sit still. Blind execution of a “correct” plan may not reach goals * APPROACHES: – PLAN/MONITOR/REPLAN: Monitor the execution; when the observed state differs from the expected one, REPLAN » Replanning is like reuse except there is added incentive for minimal modification O Easy to support with conjunctive plan-space planners – PRIAR [Kambhampati; 92]; DerSNLP [Ihrig & Kambhampati, 97] O Possible to support with disjunctive causal encodings – [Mali, 1999] – MONITOR/REACT/LEARN: » Policy construction (Universal plans)… – MODEL OTHER AGENTS CAUSING CHANGE: » Collaborative/Distributed planning $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Stochastic Actions * PROBLEM: Action effects are stochastic – Actions transform state-distributions to state-distributions – Maximize “probability” of goal satisfaction – Plan assessment itself is hard * APPROACHES: – Conjunctive planners » BURIDAN [Hanks et. al., 95] uses UCPOP techniques to put candidate plans together and assesses them O Multiple /redundant supports – Disjunctive planners » Pgraphplan [Blum & Langford, 98] modifies Graphplan to support some forms of stochastic planning O Forward search; value propagation; Envelope extension » Maxplan [Majercik & Littman, 98] uses EMAJSAT encodings to solve stochastic planning problems O Chance variables & Choice variables. Equivalence classes of models that have the same values of choice variables. Find the equivalence class with maximum probability mass. $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Complex & Conflicting Goals * Problems & Solutions: – Goals that have temporal extent (stay alive) » UCPOP, TLPlan, TGP [Smith& Weld, 99] – Goals that have mutual conflicts (Sky-dive & Stay Alive) – Goals that take cost of achievement into account – Goals that admit degrees of satisfaction (Get rich) » Branch & Bound approaches; MAXSAT approaches O Pyrrhus [Williamson & Hanks; 92] 'H 'HF FLVLR LVLRQ Q 7KH 7KHR RUH WLF $ $S SSU SUR RDFKHV 0R 0RGH GHO O JR DO V L LQ Q WH UPV RI ID IDF FWR UHG U UH HZDUG IX IXQF QFWLR WLRQ QV DUN IRU 0 DU FLVLR NRY 'H FLVL RQ 3 UR FHVV FHVVH HV &D Q X XW WLOL]H W WU ULF LFN NV D DQG QG LQ VL VLJ J KW V I IU URP F ODVVLF ODVVLFD DO SO SOD DQQ LQJ %RX XWLOL DQN WLOLH NV 'HD HU + DQ 'HDQ Q -$, >%R -$,5 5 @ $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L &636$77&635HYLHZ $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L (very) Quick overview of CSP/SAT concepts x,y,u,v: {A,B,C,D,E} w: {D,E} l : {A,B} x=A ⇒ w≠E y=B ⇒ u≠D u=C ⇒ l≠A v=D ⇒ l≠B * Constraint Satisfaction Problem (CSP) – Given » A set of discrete variables » Legal domains for each of the variables » A set of constraints on values groups of variables can take – Find an assignment of values to all the variables so that none of the constraints are violated A solution: x=B, y=C, u=D, v=E, w=D, l=B x←A N1: {x=A} ←B y← * SAT Problem = CSP with boolean N2: {x= A & y = B } ←D v← variables N : {x= A & y = B & v = D } ←C u← * TCSP = CSP where variables are time N : {x= A & y = B & v = D & u = C } points and constraints describe ←E w← ←D w← N : {x= A & y = B & v = D & u = C & w= E } allowed distances 3 4 5 N6: {x= A & y = B & v = D & u = C & w= D } $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Important ideas in solving CSPs Variable order heuristics: Pick the most constrained variable --Smallest domain, connected to most other variables, causes most unit propagation, causes most resource contention, has the most distance etc… x ←A N1: {x=A} y← B N2: {x= A & y = B } v← D N3: {x= A & y = B & v = D } u← C N4: {x= A & y = B & v = D & u = C } w← E Value ordering heuristics Pick the least constraining value N5: {x= A & y = B & v = D & u = C & w= E } w← D N6: {x= A & y = B & v = D & u = C & w= D } x,y,u,v: {A,B,C,D,E} w: {D,E} l : {A,B} x=A wzE y=B uzD u=C lzA v=D lzB Consistency enforcement k-consistency; adaptive consistency. (pre-processing) Forward Checking, unit propagation during search (dynamic) Search/Backtracking DDB/EBL: Remember and use interior node failure explanations Randomized search $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ Z DO 6FK HU FKW > 'H $,E 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L @ Temporal Constraint Satisfaction Problem (TCSP) * Variables correspond to time points * Constraints retrict allowable * * distances between time points Constraints can be represented as sets of intervals – Simple temporal problem (STP) » All constraints have at most one interval (TRACTABLE!!!) Solution of general TCSP involves enforcing path-constistency – Approximations such as loose path consistency can be used to detect inconsistencies c02 W [0,3] W [ 7,20] [1,5] [7,9] W [ 7,12] [1,12] (0 d t1 t0 d 3) (1 d t 2 t1 d 5) (7 d t 2 t1 d 9) (t0t 1) $ (t1t 2 ) [1,8][7,12] [1,12] c02 (t0t 2 ) [7,20] [1,12] [7,12] $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L What makes CSP problems hard? Asignments to individual variables that seem locally consistent are often globally infeasible, causing costly backtracking. The difficulty of a CSP/SAT problem depends on – Number of variables (propositions) – Number of constraints (clauses) – Arity of constraints – Degree of local consistency $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 7 $ VH KD 3 D 7U RQ LWL QV 6 ~4.3FRQV FRQVWWU DLQWV 9DU LDE OHV 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L Hardness & Local Consistency * An n-variable CSP problem is said to be k-consistent iff every consistent assignment for (k-1) of the n variables can be extended to include any k-th variable » Directional consistency: Assignment to first k-1 variables can be extended to the k-th variable » Strongly k-consistent if it is j-consistent for all j from 1 to k * Higher the level of (strong) consistency of problem, the lesser the amount of backtracking required to solve the problem – A CSP with strong n-consistency can be solved without any backtracking * We can improve the level of consistency of a problem by explicating implicit constraints – Enforcing k-consistency is of O(nk) complexity » Break-even seems to be around k=2 (“arc consistency”) or 3 (“path consistency”) » Use of directional and partial consistency enforcement techniques – $ $ 8 8Q Q LI LHG %UDQGQDPH)U %UDQGQDPH)UH H H ,QWURGXF ,QWURGXFW WLRQ WR 3 3OODQQLQJ 6XEE 6XEED .DPEKD DU DR .DPEK DPS PSD DW L