Planning and Optimization
D8. M&S: Strategies and Label Reduction
Gabriele R¨oger and Thomas Keller
Universit¨at Basel
November 7, 2018
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 1 / 47
Planning and Optimization
November 7, 2018 — D8. M&S: Strategies and Label Reduction
D8.1 Merging Strategies D8.2 Shrinking Strategies D8.3 Label Reduction D8.4 Summary
D8.5 Literature
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 2 / 47
Content of this Course
Planning
Classical
Tasks Progression/
Regression Complexity Heuristics
Probabilistic
MDPs Uninformed Search
Heuristic Search
Content of this Course: Heuristics
Heuristics
Delete Relaxation
Abstraction
Abstractions in General
Pattern Databases
Merge &
Shrink Landmarks
Potential Heuristics Cost Partitioning
D8. M&S: Strategies and Label Reduction Merging Strategies
D8.1 Merging Strategies
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 5 / 47
D8. M&S: Strategies and Label Reduction Merging Strategies
Content of this Course: Merge & Shrink
Merge & Shrink
Synchronized Product Merge & Shrink Algorithm
Heuristic Properties Strategies Label Reduction
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 6 / 47
D8. M&S: Strategies and Label Reduction Merging Strategies
Generic Algorithm Template
Generic M&S computation algorithm abs := {Tπ{v} |v ∈V}
whileabs contains more than one abstract transition system:
selectA1,A2 from abs
shrinkA1 and/orA2 until size(A1)·size(A2)≤N abs :=abs \ {A1,A2} ∪ {A1⊗ A2}
return the remaining abstract transition system inabs Remaining question:
I Which abstractions to select? merging strategy
D8. M&S: Strategies and Label Reduction Merging Strategies
Linear Merging Strategies
Linear Merging Strategy
In each iteration after the first, choose the abstraction computed in the previous iteration as A1.
Rationale: only maintains one “complex” abstraction at a time Fully defined by an ordering of atomic projections.
D8. M&S: Strategies and Label Reduction Merging Strategies
Linear Merging Strategies: Choosing the Ordering
Use similar causal graph criteria as for growing patterns.
Example: Strategy of hHHH
hHHH: Ordering of atomic projections
I Start with a goal variable.
I Add variables that appear in preconditions of operators affecting previous variables.
I If that is not possible, add a goal variable.
Rationale: increasesh quickly
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 9 / 47
D8. M&S: Strategies and Label Reduction Merging Strategies
Non-linear Merging Strategies
I Non-linear merging strategies only recently gained more interest in the planning community.
I One reason: Better label reduction techniques (later in this chapter) enabled a more efficient computation.
I Examples:
I DFP: preferrably merge transition systems that must synchronize on labels that occur close to a goal state.
I UMCandMIASM: Build clusters of variables with strong interactions and first merge variables within each cluster.
I Each merge-and-shrink heuristic computed with a non-linear merging strategy can also be computed with a linear merging strategy.
I However, linear merging can require a super-polynomial blow-up of the final representation size.
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 10 / 47
D8. M&S: Strategies and Label Reduction Shrinking Strategies
D8.2 Shrinking Strategies
D8. M&S: Strategies and Label Reduction Shrinking Strategies
Content of this Course: Merge & Shrink
Merge & Shrink
Synchronized Product Merge & Shrink Algorithm
Heuristic Properties Strategies Label Reduction
D8. M&S: Strategies and Label Reduction Shrinking Strategies
Generic Algorithm Template
Generic M&S computation algorithm abs := {Tπ{v} |v ∈V}
whileabs contains more than one abstraction:
selectA1,A2 from abs
shrinkA1 and/orA2 until size(A1)·size(A2)≤N abs :=abs \ {A1,A2} ∪ {A1⊗ A2}
return the remaining abstraction inabs
N: parameter bounding number of abstract states Remaining Questions:
I Which abstractions to select? merging strategy
I How to shrink an abstraction? shrinking strategy
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 13 / 47
D8. M&S: Strategies and Label Reduction Shrinking Strategies
Shrinking Strategies
How to shrink an abstraction?
We cover two common approaches:
I f-preserving shrinking
I bisimulation-based shrinking
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 14 / 47
D8. M&S: Strategies and Label Reduction Shrinking Strategies
f -preserving Shrinking Strategy
f-preserving Shrinking Strategy
Repeatedly combine abstract states with identical abstract goal distances (h values) and identical abstract initial state distances (g values).
Rationale: preserves heuristic value and overall graph shape Tie-breaking Criterion
Prefer combining states whereg +h is high.
In case of ties, combine states where h is high.
Rationale: states with high g+h values are less likely to be explored by A∗, so inaccuracies there matter less
D8. M&S: Strategies and Label Reduction Shrinking Strategies
Bisimulation
Definition (Bisimulation)
LetT =hS,L,c,T,s0,S?i be a transition system. An equivalence relation∼on S is abisimulation for T if for everyhs, `,s0i ∈T and everyt ∼s there is a transitionht, `,t0i ∈T with t0 ∼s0. A bisimulation∼isgoal-respectingif s ∼t implies that either s,t ∈S? ors,t 6∈S?.
D8. M&S: Strategies and Label Reduction Shrinking Strategies
Bisimulation: Example
1
2
3
4
5
o p
o
o p
q o q
o
p
∼with equivalence classes {{1,2,5},{3,4}}is a goal-respecting bisimulation.
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 17 / 47
D8. M&S: Strategies and Label Reduction Shrinking Strategies
Bisimulations as Abstractions
Theorem (Bisimulations as Abstractions)
LetT =hS,L,c,T,s0,S?i be a transition system and∼be a bisimulation forT. Thenα∼:S → {[s]∼|s ∈S}with α∼(s) = [s]∼ is an abstraction of T .
Note: [s]∼ denotes the equivalence class ofs.
Note: Surjectivity follows from the definition of the codomain Note: as the image ofα∼.
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 18 / 47
D8. M&S: Strategies and Label Reduction Shrinking Strategies
Abstractions as Bisimulations
Definition (Abstraction as Bisimulation)
Let T =hS,L,c,T,s0,S?ibe a transition system andα:S →S0 be an abstraction of T. The abstraction induces the equivalence relation∼α as s ∼αt iff α(s) =α(t).
We say that αis a (goal-respecting) bisimulation for T if ∼α is a (goal-respecting) bisimulation forT.
D8. M&S: Strategies and Label Reduction Shrinking Strategies
Abstraction as Bisimulations: Example
Abstractionα with
α(1) =α(2) =α(5) =Aandα(3) =α(4) =B is a goal-respecting bisimulation forT.
T
1
2
3
4
5
o p
o
o p
q o q
o
p
Tα
A B
o p
o,q
D8. M&S: Strategies and Label Reduction Shrinking Strategies
Goal-respecting Bisimulations are Exact (1)
Theorem
Let X be a collection of transition systems. Let α be an
abstraction for Ti ∈X . Ifα is a goal-respecting bisimulation then the transformation from X to X0 := (X \ {Ti})∪ {Tiα}is exact.
Proof.
Let TX =T1⊗ · · · ⊗ Tn =hS,L,c,T,s0,S?iand w.l.o.g.
TX0 =T1⊗ · · · ⊗ Ti−1⊗ Tiα⊗ Ti+1⊗ · · · ⊗ Tn =hS0,L0,c0,T0,s00,S?0i.
Consider σ(hs1, . . . ,sni) =hs1, . . . ,si−1, α(si),si+1, . . . ,sni for the mapping of states andλ= id for the mapping of labels.
1 Mappingsσ andλsatisfy the requirements of safe transformations becauseα is an abstraction and we have chosen the mapping functions as before.
. . .
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 21 / 47
D8. M&S: Strategies and Label Reduction Shrinking Strategies
Goal-respecting Bisimulations are Exact (2)
Proof (continued).
2 If hs0, `,t0i ∈T0 with s0 =hs10, . . . ,sn0i andt0=ht10, . . . ,tn0i, then for j 6=i transition system Tj has transitionhsj0, `,tj0i (*) andTiα has transitionhsi0, `,ti0i. This implies thatTi has a transitionhsi00, `,ti00i for some si00∈α−1(si0) andti00∈α−1(ti0).
As αis a bisimulation, there must be such a transition for all such si00 andti00 (**).
Each s ∈σ−1(s0) has the form s =hs1, . . . ,sni with sj =sj0 for j 6=i andsi ∈α−1(si0). Analogously for each
t =ht1, . . . ,tni ∈σ−1(t0). From (*) and (**) follows thatTj has a transitionhsj, `,tji for allj ∈ {1, . . . ,n}, so for each such s andt,T contains the transitionhs, `,ti.
. . .
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 22 / 47
D8. M&S: Strategies and Label Reduction Shrinking Strategies
Goal-respecting Bisimulations are Exact (3)
Proof (continued).
3 Fors?0 =hs10, . . . ,sn0i ∈S?0, each sj0 with j 6=i must be a goal state of Tj (*) andsi0 must be a goal state ofTiα. The latter implies that at least onsi00∈α−1(si0) is a goal state ofTi. As α is goal-respecting, all states fromα−1(si0) are goal states of Ti (**).
Considers? =hs1, . . . ,sni ∈σ−1(s?0). By the definition ofσ, sj =sj0 forj 6=i andsi ∈α−1(si0). From (*) and (**), eachsj (j ∈ {1, . . . ,n}) is a goal state ofTj and, hence, s? a goal state of TX.
4 Asλ= id and the transformation does not change the label cost function, c(`) =c0(λ(`)) for all`∈L.
D8. M&S: Strategies and Label Reduction Shrinking Strategies
Bisimulations: Discussion
I As all bisimulations preserve all relevant information, we are interested in the coarsestsuch abstraction (to shrink as much as possible).
I There is always a unique coarsest bisimulation for T and it can be computed efficiently (from the explicit representation).
I In some cases, computing the bisimulation is still too expensive or it cannot sufficiently shrink a transition system.
D8. M&S: Strategies and Label Reduction Shrinking Strategies
Greedy Bisimulations
Definition (Greedy Bisimulation)
Let T =hS,L,c,T,s0,S?ibe a transition system. An equivalence relation∼on S is agreedy bisimulation forT if it is a bisimulation for the system hS,L,c,TG,s0,S?i, where
TG ={hs, `,ti | hs, `,ti ∈T,h∗(s) =h∗(t) +c(`)}.
Greedy bisimulation only considers transitions that are used in an optimal solution of some state of T.
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 25 / 47
D8. M&S: Strategies and Label Reduction Shrinking Strategies
Greedy Bisimulation is h-preserving
Theorem
LetT be a transition system and let αbe an abstraction of T. If
∼α is a goal-respecting greedy bisimulation forT then h∗Tα =hT∗. (Proof omitted.)
Note: This does not mean that replacingT with Tα in a collection of transition systems is a safe transformation! Abstraction α preserves solution costs “locally” but not “globally”.
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 26 / 47
D8. M&S: Strategies and Label Reduction Label Reduction
D8.3 Label Reduction
D8. M&S: Strategies and Label Reduction Label Reduction
Content of this Course: Merge & Shrink
Merge & Shrink
Synchronized Product Merge & Shrink Algorithm
Heuristic Properties Strategies Label Reduction
D8. M&S: Strategies and Label Reduction Label Reduction
Label Reduction: Motivation (1)
T
5
o,o0 p
o
o p
q
o,o0 q
o
p0
T0
o,o0 o,o0,p,p0,q
Whenever there is a transition with labelo0 there is also a
transition with label o. If o0 is not cheaper thano, we can always use the transition with o.
Idea: Replaceo ando0 with labelo00 with cost of o
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 29 / 47
D8. M&S: Strategies and Label Reduction Label Reduction
Label Reduction: Motivation (2)
T
s t
o00 p
o00
o p
q
o00 q
o00
p0
T0
o00
o00,p,p0,q
Statess andt are not bisimilar due to labels p andp0. InT0 they label the same (parallel) transitions. Ifp andp0 have the same cost, in such a situation there is no need for distinguishing them.
Idea: Replacep andp0 with labelp00 with same cost.
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 30 / 47
D8. M&S: Strategies and Label Reduction Label Reduction
Label Reduction: Motivation (3)
T
s t
o00 p00
o00
p00 o
q
o00 q
o00
p00
T0
o00 o00,p00,q
Label reductions reduce the time and memory requirement for merge and shrink steps and enable coarser bisimulation abstractions.
When is label reduction a safe transformation?
D8. M&S: Strategies and Label Reduction Label Reduction
Label Reduction: Definition
Definition (Label Reduction)
LetX be a collection of transition systems with label setLand label cost functionc. Alabel reduction hλ,c0i for X is given by a functionλ:L→L0, where L0 is an arbitrary set of labels, and a label cost functionc0 on L0 such that for all`∈L,c0(λ(`))≤c(`).
ForT =hS,L,c,T,s0,S?i ∈X the label-reduced transition system isThλ,c0i =hS,L0,c0,{hs, λ(`),ti | hs, `,ti ∈T},s0,S?i.
Thelabel-reduced collectionis Xhλ,c0i={Thλ,c0i| T ∈X}.
L0∩L6=∅ andL0 =Lare allowed.
D8. M&S: Strategies and Label Reduction Label Reduction
Label Reduction is Safe (1)
Theorem (Label Reduction is Safe)
Let X be a collection of transition systems and hλ,c0i be a
label-reduction for X . Thetransformation from X to Xhλ,c0i is safe.
Proof.
We show that the transformation is safe, using σ= id for the mapping of states andλ for the mapping of labels.
The label cost function of TXhλ,c0i isc0 and has the required property by the definition of label reduction. . . .
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 33 / 47
D8. M&S: Strategies and Label Reduction Label Reduction
Label Reduction is Safe (2)
Theorem (Label Reduction is Safe)
Let X be a collection of transition systems andhλ,c0ibe a
label-reduction for X . Thetransformation from X to Xhλ,c0iis safe.
Proof (continued).
By the definition of synchronized products,TX has a transition hhs1, . . . ,s|X|i, `,ht1, . . . ,t|X|iiif for alli,Ti ∈X has a transition hsi, `,tii. By the definition of label-reduced transition systems, this implies thatThλ,c0i has a corresponding transitionhsi, λ(`),tii, so
TXhλ,c0i has a transitionhs, λ(`),ti=hσ(s), λ(`), σ(t)i (definition
of synchronized products).
For each goal state s? of TX, stateσ(s?) =s? is a goal state of
TXhλ,c0i because the transformation replaces each transition system
with a system that has the same goal states.
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 34 / 47
D8. M&S: Strategies and Label Reduction Label Reduction
More Terminology
Let X be a collection of transition systems with labelsL. Let
`, `0 ∈Lbe labels and let T ∈X.
I Label `isalive in X if allT0 ∈X have some transition labelled with`. Otherwise, `is dead.
I Label `locally subsumeslabel`0 in T if for all transitions hs, `0,ti ofT there is also a transition hs, `,ti inT.
I `globally subsumes`0 if it locally subsumes `0 in all T0∈X.
I `and`0 are locally equivalentin T if they label the same transitions inT, i.e.`locally subsumes`0 in T and vice versa.
I `and`0 are T-combinableif they are locally equivalent in all transition systemsT0 ∈X \ {T }.
D8. M&S: Strategies and Label Reduction Label Reduction
Exact Label Reduction
Theorem (Criteria for Exact Label Reduction)
Let X be a collection of transition systems with cost function c and label set L that contains no dead labels.
Lethλ,c0ibe a label-reduction for X such that λ combines labels
`1 and`2 and leaves other labels unchanged. The transformation from X to Xhλ,c0i is exactiff c(`1) =c(`2), c0(λ(`)) =c(`) for all
`∈L, and
I `1 globally subsumes`2, or
I `2 globally subsumes`1, or
I `1 and`2 are T-combinable for someT ∈X . (Proof omitted.)
D8. M&S: Strategies and Label Reduction Label Reduction
Back to Example (1)
T
5
o,o0 p
o
o p
q
o,o0 q
o
p0
T0
o,o0 o,o0,p,p0,q
Label o globally subsumes labelo0.
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 37 / 47
D8. M&S: Strategies and Label Reduction Label Reduction
Back to Example (2)
T
s t
o00 p
o00
o p
q
o00 q
o00
p0
T0
o00
o00,p,p0,q
Labels p andp0 are T-combinable.
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 38 / 47
D8. M&S: Strategies and Label Reduction Label Reduction
Computation of Exact Label Reduction (1)
I For given labels`1, `2, the criteria can be tested in low-order polynomial time.
I Finding globally subsumed labels involves finding subset relationsships in a set family.
no linear-time algorithms known
I The following algorithm exploits onlyT-combinability.
D8. M&S: Strategies and Label Reduction Label Reduction
Computation of Exact Label Reduction (2)
eqi := set of label equivalence classes ofTi ∈X Label-reduction based onTi-combinability
eq:={L}
forj ∈ {1, . . . ,|X|} \ {i}
Refineeq with eqj
// two labels are in the same set ofeq
// iff they are locally equivalent in allTj 6=Ti. λ= id
forB ∈eq
samecost := {[`]∼c |`∈B, `0 ∼c `00 iff c(`0) =c(`00)}
for L0 ∈samecost
`new := new label
c0(`new) := cost of labels in L0 for `∈L0
λ(`) =`new
D8. M&S: Strategies and Label Reduction Label Reduction
Application in Merge-and-Shrink Algorithm
Generic M&S Computation Algorithm with Label Reduction abs := {Tπ{v} |v ∈V}
whileabs contains more than one abstract transition system:
selectT1,T2 from abs
possiblylabel-reduce allT ∈abs
(e.g. based onT1- and/orT2-combinability).
shrinkT1 and/orT2 until size(T1)·size(T2)≤N possiblylabel-reduce allT ∈abs
abs :=abs \ {T1,T2} ∪ {T1⊗ T2}
return the remaining abstract transition system inabs
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 41 / 47
D8. M&S: Strategies and Label Reduction Summary
D8.4 Summary
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 42 / 47
D8. M&S: Strategies and Label Reduction Summary
Summary
I Bisimulationis anexactshrinking method.
I There is a wide range of merging strategies. We only covered some important ones.
I Label reductionis crucial for the performance of the
merge-and-shrink algorithm, especially when using bisimilarity for shrinking.
D8. M&S: Strategies and Label Reduction Literature
D8.5 Literature
D8. M&S: Strategies and Label Reduction Literature
Literature (1)
References on merge-and-shrink abstractions:
Klaus Dr¨ager, Bernd Finkbeiner and Andreas Podelski.
Directed Model Checking with Distance-Preserving Abstractions.
Proc. SPIN 2006, pp. 19–34, 2006.
Introduces merge-and-shrink abstractions (for model-checking) andDFP merging strategy.
Malte Helmert, Patrik Haslum and J¨org Hoffmann.
Flexible Abstraction Heuristics for Optimal Sequential Planning.
Proc. ICAPS 2007, pp. 176–183, 2007.
Introduces merge-and-shrink abstractionsfor planning.
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 45 / 47
D8. M&S: Strategies and Label Reduction Literature
Literature (2)
Raz Nissim, J¨org Hoffmann and Malte Helmert.
Computing Perfect Heuristics in Polynomial Time: On Bisimulation and Merge-and-Shrink Abstractions in Optimal Planning.
Proc. IJCAI 2011, pp. 1983–1990, 2011.
Introducesbisimulation-based shrinking.
Malte Helmert, Patrik Haslum, J¨org Hoffmann and Raz Nissim.
Merge-and-Shrink Abstraction: A Method for Generating Lower Bounds in Factored State Spaces.
Journal of the ACM 61 (3), pp. 16:1–63, 2014.
Detailedjournal versionof the previous two publications.
G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 7, 2018 46 / 47
D8. M&S: Strategies and Label Reduction Literature
Literature (3)
Silvan Sievers, Martin Wehrle and Malte Helmert.
Generalized Label Reduction for Merge-and-Shrink Heuristics.
Proc. AAAI 2014, pp. 2358–2366, 2014.
Introduces label reductionas covered in these slides (there has been a more complicated version before).
Gaojian Fan, Martin M¨uller and Robert Holte.
Non-linear merging strategies for merge-and-shrink based on variable interactions.
Proc. AAAI 2014, pp. 2358–2366, 2014.
Introduces UMC and MIASM merging strategies