Issue68

Title merge-and-shrink label simplification buggy for nonlinear merge strategies
Priority bug Status resolved
Superseder Nosy List haz, malte
Assigned To malte Keywords
Optional summary

Created on 2010-01-10.13:53:21 by malte, last changed by malte.

Files
File name Uploaded Type Edit Remove
issue68-example.zip malte, 2010-01-10.16:37:03 application/zip
unnamed haz, 2010-02-02.20:40:02 text/html
Messages
msg2975 (view) Author: malte Date: 2014-02-15.19:59:10
This is fixed in issue419 (implemented, but not yet merged).
msg233 (view) Author: haz Date: 2010-02-02.20:40:02
I'm hoping to use the underlying framework for custom non-orthogonal
merging strategies. Likely won't hit a paper for a while, so I'll keep an
eye on the issue in the meantime.

  Thanks for the tip. Cheers

On Tue, Feb 2, 2010 at 2:35 PM, Malte Helmert <
downward.issues@googlemail.com> wrote:

> Currently I'd recommend against using non-linear merging strategies in
> serious
> benchmarks (i.e. anything you want to report in a paper). If you try them
> out
> and they don't work well, it's hard to tell if they are a genuinely bad
> idea or
> if it is an implementation issue.
>
> On the other hand, they should be fine for just messing around (when
> disabling
> label simplification), and it shouldn't be all that much work to implement
> label
> simplification properly. It's just hard to find enough time for it.
>
msg232 (view) Author: malte Date: 2010-02-02.20:35:51
It should, although that is largely untested and has performance implications.

Currently I'd recommend against using non-linear merging strategies in serious
benchmarks (i.e. anything you want to report in a paper). If you try them out
and they don't work well, it's hard to tell if they are a genuinely bad idea or
if it is an implementation issue.

On the other hand, they should be fine for just messing around (when disabling
label simplification), and it shouldn't be all that much work to implement label
simplification properly. It's just hard to find enough time for it.
msg231 (view) Author: haz Date: 2010-02-02.20:29:09
Following -- this has come up for me as well. I assume non-linear merging
strategies are fine with g_merge_and_shrink_simplify_labels = false ?
msg215 (view) Author: malte Date: 2010-01-11.12:41:53
OK, temporary fix committed in r3860.

For nonlinear merge strategies, the current code is still broken, and also the
approach is conceptually wrong -- there should be a single unique label
simplification rather than one per abstraction. So further work is needed, but
for now this can be demoted to "bug".
msg213 (view) Author: malte Date: 2010-01-11.02:09:31
One simple fix for now is to go back to what we did previously and never use
label simplification for atomic abstractions. This will at least fix the problem
for linear abstraction strategies.

For more complicated fixes, we need to come up with a more general theory of
label simplification. This is in the works.
msg212 (view) Author: malte Date: 2010-01-11.02:07:57
OK, there is breakage here both in terms of implementation and in terms of
concepts. I'll only describe the conceptual breakage, since it doesn't matter
much if an implementation of a broken concept is broken -- we need to come up
with a better concept anyway.

The basic problem is that currently, abstraction A may say that there is no need
to distinguish actions a and b, so they can be merged, and abstraction B may say
that there is no need to distinguish actions a and c, so they can be merged. But
then we lose the power to distinguish b and c, which we might need to. Well,
that's simplified a lot, but anyway.

More precisely, the current implementation is based on the idea that abstraction
A does not need to distinguish two operators which behave identically on all
variables not represented in A. Let's call such operators A-equivalent. The idea
is that instead of arcs labeled with operators, we have arcs labeled with
A-equivalence classes. The current implementation doesn't actually implement
that properly, but if it did, it would clearly give an overapproximation of the
real problem (since we're only adding synchronization labels by going from
operators to equivalence classes), and the question is whether or not that
overapproximation is strict (which would be undesirable).

The answer is yes. Consider a task with three variables a, b, c each with domain
{0, 1, 2}, initial value 0 and goal 2. There are seven operators: all have
precondition a=0,b=0,c=0, and all change a, b and c to some value in {1, 2}. We
write these operators as o_ijk, where i,j,k in {1, 2} are the values that a,b,c
are set to. Of the eight possible operators of that form, all are present except
for the one that sets a=2,b=2,c=2 (o_222). The task is clearly unsolvable.

However, here's what happens if we do label simplification:

Originally (we denote parallel arcs by commas):

Abs_a: 0 ---o_111,o_112,o_121,o_122--> 1
       0 ---o_211,o_212,o_221--------> 2
Abs_b: 0 ---o_111,o_112,o_211,o_212--> 1
       0 ---o_121,o_122,o_221--------> 2
Abs_c: 0 ---o_111,o_121,o_211,o_221--> 1
       0 ---o_112,o_122,o_212--------> 2

After label simplification:
Abs_a: 0 ---{o_111,o_211},{o_112,o_212},{o_121,o_221},{o_122}--> 1
       0 ---{o_111,o_211},{o_112,o_212},{o_121,o_221}----------> 2
Abs_b: 0 ---{o_111,o_121},{o_112,o_122},{o_211,o_221},{o_212}--> 1
       0 ---{o_111,o_121},{o_112,o_122},{o_211,o_221}----------> 2
Abs_c: 0 ---{o_111,o_112},{o_121,o_122},{o_211,o_212},{o_221}--> 1
       0 ---{o_111,o_112},{o_121,o_122},{o_211,o_212}----------> 2

We then merge Abs_a and Abs_b (or any other two -- due to symmetry, it doesn't
matter):

Abs_ab: 0,0 --o_111,o_112,o_121,o_122,o_211,o_212,o_221--------> 1,1
        0,0 --o_111,o_112,o_121,o_122,o_211,o_221--------------> 1,2
        0,0 --o_111,o_112,o_121,o_211,o_212,o_221--------------> 2,1
        0,0 --o_111,o_112,o_121,o_211,o_221--------------------> 2,2

After label simplification:
Abs_ab: 0,0 --{o_111,o_121,o_211,o_221},{o_112,o_122,o_212}----> 1,1
        0,0 --{o_111,o_121,o_211,o_221},{o_112,o_122,o_212}----> 1,2
        0,0 --{o_111,o_121,o_211,o_221},{o_112,o_122,o_212}----> 2,1
        0,0 --{o_111,o_121,o_211,o_221},{o_112,o_122,o_212}----> 2,2

Merging this with Abs_c, we get the spurious connection 0,0,0->2,2,2.
msg211 (view) Author: malte Date: 2010-01-10.21:01:22
OK, seeing clearer. This is indeed a logic problem. With the example, it arises
in the last merge step, when merging varset {0,2,3} with varset {1} (all counts
are with respect to the numbering introduced by the preprocessor, not translator).

Label simplification finds the following equivalences for {0,2,3}:
  o_0 ~ o_1 ~ o_3,  o_2 ~ o_4,  o_5 ~ o_6 ~ o_7 ~ o_8
and the following equivalences for {1}:
  o_2 ~ o_5,  o_4 ~ o_6
Moreover, the following operators are irrelevant for {1}:
  o_0, o_1, o_3.

The equivalences mean that the abstraction for {0, 2, 3} has no arcs for
operators o_1, o_3, o_4, o_6, o_7 and o_8, while the abstraction for {1} has no
arcs for operators o_5 and o_6. Hence, we only get matches for operators o_0
(present in {0, 2, 3} and irrelevant in {1}) and o_2 (present in both). This
means that all operators not equivalent to these in either abstraction (namely,
o_6, o_7 and o_8) are lost. The problem become unsolvable because one of the
operators o_7 and o_8 is needed in every plan.

One example of a solution for the problem would be o_0, o_2, o_7.

How to fix this? Will need to rethink how and when exactly the label
simplifications should be applied.
msg209 (view) Author: malte Date: 2010-01-10.16:37:03
Attaching a minimal example, obtained by simplifying from rovers:p01.pddl.

I added the translator and preprocessor outputs because the failure doesn't
occur reliably if we rerun the translator and preprocessor -- maybe something to
do with nondeterministic choices in the translator.
msg208 (view) Author: malte Date: 2010-01-10.15:59:21
To confirm the cause of this: if we set
    g_merge_and_shrink_simplify_labels = false;
in globals.cc in current trunk, we can indeed solve rovers:p01.pddl.
msg207 (view) Author: malte Date: 2010-01-10.15:51:08
The bug -- at least for rovers-01 -- was apparently introduced with r3028 of the
everything branch, which made label simplification unconditional. Previously, it
was not used for atomic abstractions.

This is a bit disconcerting. Something wrong with the theory?
msg205 (view) Author: malte Date: 2010-01-10.13:53:21
I get unexpected failures with merge-and-shrink with the following inputs:

   failure [oa10000] rovers:p01.pddl
   failure [oa10000] rovers:p02.pddl
   failure [oa10000] rovers:p04.pddl
   failure [oa10000] trucks-strips:p01.pddl
   failure [oa10000] zenotravel:pfile1
   failure [oa10000] zenotravel:pfile2

In all cases, we get a spurious "abstraction is unsolvable" message.

The bug apparently already occurred before the recent translator change.
History
Date User Action Args
2014-02-15 19:59:10maltesetstatus: chatting -> resolved
messages: + msg2975
2010-02-02 20:40:02hazsetfiles: + unnamed
messages: + msg233
2010-02-02 20:35:51maltesetmessages: + msg232
2010-02-02 20:29:09hazsetnosy: + haz
messages: + msg231
2010-01-11 12:41:53maltesetpriority: urgent -> bug
messages: + msg215
title: merge-and-shrink wrongly reports unsolvable abstractions -> merge-and-shrink label simplification buggy for nonlinear merge strategies
2010-01-11 02:09:31maltesetmessages: + msg213
2010-01-11 02:07:57maltesetmessages: + msg212
2010-01-10 21:01:22maltesetmessages: + msg211
2010-01-10 16:37:03maltesetfiles: + issue68-example.zip
messages: + msg209
2010-01-10 15:59:21maltesetmessages: + msg208
2010-01-10 15:51:08maltesetmessages: + msg207
2010-01-10 13:53:21maltecreate