Planning and Optimization C14. Merge-and-Shrink Abstractions: Generic Algorithm Malte Helmert and Gabriele R¨ oger Universit¨ at Basel November 14, 2016
Generic Algorithm Summary Generic Algorithm
Generic Algorithm Summary Generic Merge-and-shrink Abstractions: Outline Using the results from the previous chapter, we can develop the ideas of a generic abstraction computation procedure that takes all state variables into account: Initialization step: Compute all abstract transition systems for atomic projections to form the initial abstraction collection. Merge steps: Combine two abstract systems in the collection by replacing them with their synchronized product. (Stop once only one transition system is left.) Shrink steps: If the abstractions in the collection are too large to compute their synchronized product, make them smaller by abstracting them further (applying an arbitrary abstraction to them). We explain these steps with our running example.
Generic Algorithm Summary Back to the Running Example ALR ARL LLR RRL ALL ARR LRR LLL RRR RLL BLL BRR LRL RLR BRL BLR Logistics problem with one package, two trucks, two locations: state variable package: { L , R , A , B } state variable truck A: { L , R } state variable truck B: { L , R }
Generic Algorithm Summary Initialization Step: Atomic Projection for Package T π { package } : M ⋆⋆⋆ A M ⋆⋆⋆ M ⋆⋆⋆ DAR PAL DAL PAR L R DBR PBL PBR DBL B M ⋆⋆⋆
Generic Algorithm Summary Initialization Step: Atomic Projection for Truck A T π { truck A } : PAL,DAL,MB ⋆⋆ , PAR,DAR,MB ⋆⋆ , PB ⋆ ,DB ⋆ PB ⋆ ,DB ⋆ MALR L R MARL
Generic Algorithm Summary Initialization Step: Atomic Projection for Truck B T π { truck B } : PBL,DBL,MA ⋆⋆ , PBR,DBR,MA ⋆⋆ , PA ⋆ ,DA ⋆ PA ⋆ ,DA ⋆ MBLR L R MBRL current collection: {T π { package } , T π { truck A } , T π { truck B } }
Generic Algorithm Summary First Merge Step T 1 := T π { package } ⊗ T π { truck A } : MB ⋆⋆ MB ⋆⋆ MALR AL AR DAR PAL MARL L P A A D R MB ⋆⋆ MB ⋆⋆ MB ⋆⋆ MB ⋆⋆ MALR MALR P R B B D L LL LR RL RR MARL DBL R MARL B P P R B B L D DBL PBR MALR BL BR MARL MB ⋆⋆ MB ⋆⋆ current collection: {T 1 , T π { truck B } }
Generic Algorithm Summary Need to Simplify? If we have sufficient memory available, we can now compute T 1 ⊗ T π { truck B } , which would recover the complete transition system of the task. However, to illustrate the general idea, let us assume that we do not have sufficient memory for this product. More specifically, we will assume that after each product operation we need to reduce the result transition system to four states to obey memory constraints. So we need to reduce T 1 to four states. We have a lot of leeway in deciding how exactly to abstract T 1 . In this example, we simply use an abstraction that leads to a good result in the end.
Generic Algorithm Summary First Shrink Step T 2 := some abstraction of T 1 MB ⋆⋆ MB ⋆⋆ MALR AL AR DAR PAL MARL L P A A D R MB ⋆⋆ MB ⋆⋆ MB ⋆⋆ MB ⋆⋆ MALR MALR P R B B D L LL LR RL RR MARL DBL R MARL B P P R B B L D DBL PBR MALR BL BR MARL MB ⋆⋆ MB ⋆⋆
Generic Algorithm Summary First Shrink Step T 2 := some abstraction of T 1 MB ⋆⋆ MB ⋆⋆ MALR AL AR DAR PAL MARL L P A A D R MB ⋆⋆ MB ⋆⋆ MB ⋆⋆ MB ⋆⋆ MALR MALR P R B B D L LL LR RL RR MARL DBL R MARL B P P R B B L D DBL PBR MALR BL BR MARL MB ⋆⋆ MB ⋆⋆
Generic Algorithm Summary First Shrink Step T 2 := some abstraction of T 1 MB ⋆⋆ MB ⋆⋆ MALR AL AR PAL D MARL A L P A R D A R MB ⋆⋆ MB ⋆⋆ MALR DBR M ⋆⋆⋆ P B L LL LR R R MARL DBL B P R P B B R D L DBL B P MALR BL BR MARL MB ⋆⋆ MB ⋆⋆
Generic Algorithm Summary First Shrink Step T 2 := some abstraction of T 1 MB ⋆⋆ MB ⋆⋆ MALR AL AL AR AR PAL D MARL A L P A R D A R MB ⋆⋆ MB ⋆⋆ MALR DBR M ⋆⋆⋆ P B L LL LR R R MARL DBL B P R P B B R D L DBL B P MALR BL BR MARL MB ⋆⋆ MB ⋆⋆
Generic Algorithm Summary First Shrink Step T 2 := some abstraction of T 1 M ⋆⋆⋆ A PAL DAR DAL P A R MB ⋆⋆ MB ⋆⋆ MALR DBR M ⋆⋆⋆ P B L LL LR R R MARL DBL B P R P B B R D L DBL B P MALR BL BR MARL MB ⋆⋆ MB ⋆⋆
Generic Algorithm Summary First Shrink Step T 2 := some abstraction of T 1 M ⋆⋆⋆ A PAL DAR DAL P A R MB ⋆⋆ MB ⋆⋆ MALR DBR M ⋆⋆⋆ P B L LL LR R R MARL DBL B P R P B B R D L DBL B P MALR BL BL BR BR MARL MB ⋆⋆ MB ⋆⋆
Generic Algorithm Summary First Shrink Step T 2 := some abstraction of T 1 M ⋆⋆⋆ A PAL DAR DAL P A R MB ⋆⋆ MB ⋆⋆ MALR M ⋆⋆⋆ PBL LL LR R MARL DBL R PBL B D PBR DBL B M ⋆⋆⋆
Generic Algorithm Summary First Shrink Step T 2 := some abstraction of T 1 M ⋆⋆⋆ A PAL DAR DAL P A R MB ⋆⋆ MB ⋆⋆ MALR M ⋆⋆⋆ PBL LL LR R MARL DBL R PBL B D PBR DBL B M ⋆⋆⋆
Generic Algorithm Summary First Shrink Step T 2 := some abstraction of T 1 MB ⋆⋆ M ⋆⋆⋆ MB ⋆⋆ D ⋆ R M ⋆⋆⋆ MALR PBL LL LR I R MARL DBL P ⋆ R P ⋆ L D ⋆ L
Generic Algorithm Summary First Shrink Step T 2 := some abstraction of T 1 MB ⋆⋆ M ⋆⋆⋆ MB ⋆⋆ D ⋆ R MALR PBL M ⋆⋆⋆ LL LR I R MARL DBL P ⋆ R P ⋆ L D ⋆ L current collection: {T 2 , T π { truck B } }
Generic Algorithm Summary Second Merge Step T 3 := T 2 ⊗ T π { truck B } : LRL P B M L DBL B L M R B R MA ⋆⋆ L LRR DAR MALR MARL R L PAR L R IL RL M M A A B B L L M M M M P ⋆ L R R B B R R L L L ⋆ D IR RR D ⋆ R MA ⋆⋆ P ⋆ R LLL PAL MA ⋆⋆ MA ⋆⋆ M B L DAL M R B R L LLR current collection: {T 3 }
Generic Algorithm Summary Another Shrink Step? Normally we could stop now and use the distances in the final abstract transition system as our heuristic function. However, if there were further state variables to integrate, we would simplify further, e.g. leading to the following abstraction (again with four states): M ⋆⋆⋆ M ⋆⋆⋆ M ⋆⋆⋆ M ⋆ RL P ⋆ L D ⋆ R LLL LRR I R LRL LLR M ⋆ LR D ⋆ L P ⋆ R We get a heuristic value of 3 for the initial state, better than any PDB heuristic that is a proper abstraction. The example generalizes to more locations and trucks, even if we stick to the size limit of 4 (after merging).
Generic Algorithm Summary Generic Algorithm Template Generic Abstraction Computation Algorithm abs := {T π { v } | v ∈ V } while abs contains more than one abstract transition system: select A 1 , A 2 from abs shrink A 1 and/or A 2 until size ( A 1 ) · size ( A 2 ) ≤ N abs := abs \ {A 1 , A 2 } ∪ {A 1 ⊗ A 2 } return the remaining abstract transition system in abs N : parameter bounding number of abstract states Questions for practical implementation: Which abstractions to select? � merging strategy How to shrink an abstraction? � shrinking strategy How to choose N ? � usually: as high as memory allows How to represent the corresponding abstraction?
Generic Algorithm Summary Summary
Generic Algorithm Summary Summary Projections perfectly reflect a few state variables. Merge-and-shrink abstractions are a generalization that can reflect all state variables, but in a potentially lossy way. The merge steps combine two abstract transition systems by replacing them with their synchronized product. The shrink steps make an abstract system smaller by abstracting it further.
Recommend
More recommend