Issue350

Title Dominance pruning in canonical heuristic
Priority feature Status resolved
Superseder Nosy List florian, gabi, malte
Assigned To florian Keywords
Optional summary

Created on 2012-09-28.10:45:34 by florian, last changed by gabi.

Files
File name Uploaded Type Edit Remove
patterns saved.ods florian, 2012-09-28.11:06:19 application/vnd.oasis.opendocument.spreadsheet
report-scatter-total_time-base-singledom.png florian, 2012-10-17.10:34:02 image/png
Messages
msg2364 (view) Author: gabi Date: 2012-10-17.10:37:46
Those are clearly positive results. :-)
msg2363 (view) Author: florian Date: 2012-10-17.10:34:02
For the sake of completeness: here are the results of this patch (also including
the changes for issue367). All in all 17 additional tasks were solved. The time
for dominance pruning is negligible with a sum of around 1.5 seconds for all of
the 999 instances where the hill-climbing finished.
msg2356 (view) Author: malte Date: 2012-10-04.03:01:52
I had a look at the code and added some comments, but they are all quite
negligible. I just can't help myself to comment on even the tiniest thing that
comes to mind...


On an unrelated note, I also have another idea which might be worth remembering
if we ever write this down in a paper, but is probably not worth implementing
given that we're not worried about time anyway:

Let's assume we have patterns A, B and A \cup B, where A and B are disjoint and
additive. Then we should *omit* the edge between A and B in the additivity
graph: it's never a good idea to put them into a clique together since this
clique will always be dominated by another clique which has A \cup B in place of
A and B. (Note that everything additive with A and B will also be additive with
A \cup B.) Since we have so many cliques with singleton patterns, I would expect
that this could eliminate many dominated cliques before they are ever generated.

As I wrote, probably not worth implementing given that we don't need to worry
about speed.
msg2355 (view) Author: florian Date: 2012-10-02.10:41:12
Could one of you please have a look at the patch:
http://codereview.appspot.com/6590058/

After the review I can run the tests on the grid. The tests I ran so far on my
computer all look quite good with under 1 second for dominance pruning (even in
tasks with over 2000 cliques).

I experimented with different versions here:
https://bitbucket.org/flogo/fast-downward/changesets/tip/branch%28%22issue350%22%29
The first approach was based on indices and probably a bit faster than this one.
However, it was quite complicated and long code to handle the changing indices.
This version looks nicer and I guess it will not matter from the performance
point of view. We could even leave out the precomputed superset relation without
a big performance hit, if you don't like the hash_set implementation (as in
revision aa2fab4aa182).
msg2342 (view) Author: florian Date: 2012-09-28.11:06:19
Here are the results of the analysis with python to get a rough picture of why
this might be useful. The graphs are histograms for the percentage of saved
patterns and collections (both axes show percentages). In 43% all pattern are
needed but there are cases where up to 85% of the pattern are not needed.

For the collections the situation is even more pronounced in 34% all are needed
but in some cases it is possible to remove 99% of the cliques. 17% of the test
cases fell into the 90%-100% area.
msg2341 (view) Author: florian Date: 2012-09-28.10:45:34
In the canonical heuristic there are cliques that are dominated by other other
cliques in the following sense: For every pattern p_c in clique c there is a
pattern P_C in clique C with p_c <= P_C. In such a case the sum over the values
of the pattern heuristics for c cannot be higher than the sum over the heuristic
values for C and we can prune c.

Experiments with python were surprisingly fast, so we probably can use a naive
implementation.
History
Date User Action Args
2012-10-17 10:37:46gabisetstatus: in-progress -> resolved
messages: + msg2364
2012-10-17 10:34:02floriansetfiles: + report-scatter-total_time-base-singledom.png
messages: + msg2363
2012-10-04 03:01:52maltesetmessages: + msg2356
2012-10-02 10:41:12floriansetmessages: + msg2355
2012-09-28 11:06:19floriansetfiles: + patterns saved.ods
messages: + msg2342
2012-09-28 10:45:34floriancreate