This bug relates to a limitation of the translator wrt. negative goals.
If the goal requires (not (P x y)) and (P x y) is encoded by a FDR variable with 5 possible values, we conceptually would need to replace the negative goal with a disjunction over the other 4 values of this variable. Since a normalized goal may not contain a disjunction, we instead would need to add another axiom, something we don't want to do that late in the process (we basically are too lazy because negative goals are rare). In the restricted case where the variable only has 2 possible values, we just add the corresponding other value, which is the reason why the assertion does not fail if the invariance analysis is switched off.
In this particular example, we have a specific situation which we might want to address. The example is a simple gripper task with goal (and (not (carry ball4 left)) (at ball4 roomb)). We have a FDR variable for [Atom at(ball4, ?X), Atom carry(ball4, ?X)].
So (at ball4 roomb) already implies (not (carry ball4 left)) and we should simply drop the negative goal.
The right place for this adaptation would be in translate_strips_conditions_aux.py in the part starting at line 97.
|