aig-upf / fs-private

This is the private version of the FS planner repository
GNU General Public License v3.0
5 stars 1 forks source link

ASP Grounder fails on Barman #11

Closed gfrances closed 7 years ago

gfrances commented 7 years ago

I found a (minor?) bug in the ASP-based grounder. It is visible e.g. with problem barman-sat11-strips/pfile06-021.pddl. The groundings that result from action schema clean-shaker(h1: hand, h2: hand, s: shaker) include ground actions such as clean-shaker(left, left, shot5), where shot5 is not a shaker, but an object if sibling type shot.

I've inspected the source of the grounder, the problem lies in the set of groundings returned by the LP solution. Inspecting a bit the LP generated by the grounder, my intuition is that the problem lies in the fact that the predicate empty is defined over objects of type container, and this propagates up to the action lean-shaker`. I see that "type" predicates are defined in the LP, but used nowhere. Perhaps extra RHS predicates should be used in the rules that define when an action is reachable?? e.g. for clean shaker the current rule is:

reachable_a(clean__shaker(A, B, C)) :- reachable(c67(A, C, B)).

And perhaps should be:

reachable_a(clean__shaker(A, B, C)) :- reachable(c67(A, C, B)), hand(A), hand(B), shaker(C).

Let me know what you think, Miquel.

gfrances commented 7 years ago

The LP for barman is attached here: barman.lp.txt

gfrances commented 7 years ago

Miquel, could you check if the minor commit linked above sounds reasonable to you? I don't think it's incorrect, but I'm unsure about the performance implications of this, or whether there's some other way of achieving what we want. The above commit basically forces that all reachable_a(...) rules require the type of the parameters to be as specified in the PDDL; this way, we avoid possible problems with sibling types.

miquelramirez commented 7 years ago

Hi Guillem,

this sounds perfectly reasonable to me - including the types in the rule is important!

Also, regarding efficiency, I would not be too concerned. The rules would be converted into n-ary CNF clauses, but all the literals corresponding to the types are given, it does not require to "decide" over several possible options.

Miquel.

gfrances commented 7 years ago

Thanks for the feedback, we'll leave it like this then :-)