The translator hangs on a small PDDL task when an action has N conditional effects that all add the same predicate (under different conditions), combined with a delete effect on that same predicate. The translator's negate_and_translate_condition (in translate_strips_operator_aux) computes product(*condition) over the N add-conditions, which is exponential — 2^N combinations.
I've attached a MWE. I couldn't figure out how to attach more than one file, so I delimited where domain.pddl and problem.pddl each start with comments
The domain models a counter (v0..v20) that decrements via conditional effects conditioned on a derived predicate trigger, plus a "refuel" mechanism where 20 conditional effects all add v20 under derived predicate special. The task has only 2 positions, 21 counter values, 3 actions, and ~80 conditional effects — trivially small — but the translator never finishes.
With v0..v3 (4 levels) it translates instantly. With v0..v20 (21 levels) it hangs. The root cause is lines 233-267 of main.py in the translator: for each variable with delete effects, it negates the DNF of all add-effect conditions via product(), producing 2^N combinations.
To reproduce: ./fast-downward.py domain.pddl problem.pddl --translate
This hangs indefinitely. With v0..v3 instead of v0..v20, it completes instantly.
|