6. Experimental Study
6.4. Optimized Implementation
In the following, we compare the non-optimized implementation of merge-and-shrink based on generalized label reduction to the most recent, optimized implementation in Fast Downward. Recall that in contrast to the optimized implementation, in the non-optimized implementation, we do not use locally equivalent labels to group transitions and we do not enforce the valid-state invariant for transition systems. The latter means that pruning only happens before shrinking in contrast to always keeping all transitions pruned according to the prune strategy. Furthermore, transitions are sorted and duplicates are removed only before shrinking and merging but not af- ter merging. Most importantly, for exact label reduction based on Θ-combinability, we have to compute the local equivalence relations on labels for each label reduction (caching local equiv- alence relations, whenever possible, across all reductions within the label reduction algorithm, but not over several merge-and-shrink iterations). Finally, the computation of product transition systems is more expensive due to not grouping labels in the non-optimized implementation, For more details, we refer to the discussion in Section3.8.3.
In an ideal world, we would investigate some of the above differences of the implementation in isolation. However, since most of these changes were implemented together and depend on each other, we can only carry out a before-after comparison that includes all improvements we discussed. In the following, we refer to the non-optimized implementation as base, to the optimized one as opt, and we show the difference diff between opt and base and also list the number of tasks for which opt is better (+) and worse (-) than base. As always, unless stated otherwise, we use exact generalized label reduction based on the fixed point algorithm and the shrink strategy B, and all symmetry-enhanced merge strategies (symm) correspond to the variant largest-symmas discussed in the previous section. Also recall that for MIASM in the optimized implementation, we use the re-implementation provided by its authors, adapted to switch to DFP in case the merge strategy does not find a non-trivial partitioning of the state variables of the planning task, which makes the results of MIASM less comparable.
Table6.7shows the comparison for shrink strategy B and the merge strategies we considered so far. We begin with the non-symmetry enhanced strategies of the first two vertical blocks. We observe that the changes in the implementation are indeed improvements with respect to the efficiency of the merge-and-shrink computation. There is a huge decrease in the time required to compute the abstraction (Constr time), which is due to the much smaller amount of transitions required to be stored for transition systems that also transfers to running out of memory and time less frequently. Besides these savings in memory and runtime, with the new valid-state invariant, all dead states are always pruned immediately after each transformation. This effect is visible through the maximum size of intermediate transition systems (MITSS), which decreases for more tasks than for which it increases (except for MIASM, which is a re-implementation and
base opt diff + - base opt diff + - CGGL RL Coverage 682 712 30 30 0 720 728 8 9 1 Search time 0.30 0.31 0.01 58 305 0.27 0.28 0.01 64 311 Total time 4.35 3.37 −0.99 531 75 3.73 2.92 −0.81 546 105 Exp 75th perc 1170k 1170k 0 12 32 992k 1353k 361 26 24 # constr 1338 1441 103 107 4 1413 1503 90 92 2 Constr time 117.16 49.18 −67.98 1183 151 95.10 57.34 −37.76 1219 192 Constr oom 184 95 −89 121 32 112 36 −76 96 20 Constr oot 145 131 −14 44 30 142 128 −14 29 15 MITSS 46802.63 46650.66 −151.96 160 94 46420.03 45756.11 −663.92 161 89 DFP MIASM Coverage 736 746 10 13 3 746 773 27 40 13 Search time 0.29 0.28 −0.01 284 114 0.23 0.20 −0.03 203 182 Total time 4.42 3.23 −1.20 613 53 10.25 3.53 −6.72 606 113 Exp 75th perc 1047k 1040k −7 40 40 710k 696k −14 132 146 # constr 1389 1491 102 104 2 1367 1470 103 105 2 Constr time 109.68 57.78 −51.91 1212 175 105.74 66.75 −38.99 819 546 Constr oom 134 42 −92 114 22 149 104 −45 106 61 Constr oot 144 134 −10 31 21 151 93 −58 91 33 MITSS 46948.16 45004.23 −1943.93 227 140 44440.46 45417.77 977.31 380 384 symm-CGGL symm-RL Coverage 729 741 12 20 8 740 743 3 10 7 Search time 0.29 0.32 0.02 59 328 0.30 0.32 0.02 75 318 Total time 8.09 5.53 −2.56 638 55 7.51 4.66 −2.85 661 42 Exp 75th perc 980k 1012k 32 35 85 947k 1010k 63 64 85 # constr 1367 1468 101 105 4 1426 1504 78 80 2 Constr time 121.14 86.20 −34.95 1260 103 115.12 74.23 −40.88 1333 90 Constr oom 158 72 −86 114 28 94 36 −58 78 20 Constr oot 142 127 −15 35 20 147 127 −20 32 12 MITSS 45263.84 44970.77 −293.07 343 229 46195.63 44546.67 −1648.96 444 244 symm-DFP symm-MIASM Coverage 745 752 7 10 3 751 771 20 31 11 Search time 0.31 0.32 0.00 160 252 0.28 0.24 −0.04 157 251 Total time 8.22 5.45 −2.77 681 33 14.97 5.56 −9.41 653 73 Exp 75th perc 970k 971k 1 54 62 709k 709k 0 118 108 # constr 1405 1496 91 94 3 1381 1472 91 95 4 Constr time 125.48 81.06 −44.42 1284 117 111.52 75.70 −35.81 1032 345 Constr oom 114 44 −70 93 23 132 102 −30 93 63 Constr oot 148 127 −21 34 13 154 93 −61 95 34 MITSS 46170.15 44452.02 −1718.13 312 227 43607.21 44605.48 998.27 401 364
Table 6.7.: Comparison of the non-optimized implementation of merge-and-shrink based on generalized label reduction to the optimized one, for several merge strategies and shrink strategy B. Values aggregated and highlighted for each merge strategy indi- vidually.
symm
CGGL RL DFP MIASM CGGL RL DFP MIASM Coverage 712 728 746 773 741 743 752 771
Table 6.8.: Coverage of the four considered merge strategies and their symmetry-enhanced coun- terparts in the state-of-the-art implementation, using shrink strategy B.
the comparison must be taken with care). All of these reasons also transfer to a high increase of the number of tasks for which the computation succeeds, which in turn results in better coverage for all configurations. It is also worth noting that neither the number expansions nor the search time decreases on average, but only total time does. Hence the optimizations are indeed only optimizations that affect the efficiency of the computation of the merge-and-shrink algorithm, but mostly not the heuristic quality. We remark that MIASM is much stronger here than reported in previous work (Sievers et al.,2016) because it now uses a fallback mechanism that switches to DFP, as the first implementation of MIASM did.
For the symmetry-enhanced strategies, shown in the last two vertical blocks, the picture is similar: we observe improved performance in terms of construction time and coverage for all strategies, however in a slightly less notable amount. The obtained improvements are smaller for symmetry-enhanced merge strategies than for the original ones because enhancing merge strategies through factored symmetries is, to some extent, an efficiency improvement, and so is using the optimized implementation. Hence combining the two ways of improving the efficiency is not fully orthogonal, however still beneficial.
We now briefly discuss the effect of the optimized implementation on the shrink strategies F and G. TableA.3on page 172in the appendix shows the results. For F, we observe the same trends as when using B, i.e. the performance of all merge strategies increases. However the improvements are less significant for all merge strategies except DFP, which profits a lot from the efficiency improvements. For MIASM, coverage even decreases, however this is likely due to the different implementation used in the optimized code base. We also again observe that the symmetry-enhanced variants do not work as well with F as with B. With G, the changes in performance caused by the optimized implementation are even smaller, however still beneficial. To summarize this part, it is safe to say that the optimizations of the implementation based on generalized label reduction are indeed optimizations in the sense that the merge-and-shrink algorithm can be computed more efficiently.
As a point of reference for the remaining parts of our study, Table 6.8 shows coverage of the merge strategies we investigate for the optimized implementation, evaluated using shrink strategy B. The data is the same as the data shown in column opt of Table6.7that compares the non-optimized to the optimized implementation.