Issue1212

Title Translator hangs on conditional effects: exponential blowup in negate_and_translate_condition when many conditional effects add the same predicate
Priority bug Status unread
Superseder Nosy List
Assigned To Keywords
Optional summary
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.

Created on 2026-03-22.22:46:46 by dspyz, last changed by dspyz.

Summary
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.
Files
File name Uploaded Type Edit Remove
fd_bug.pddl dspyz, 2026-03-22.22:46:46 application/octet-stream
History
Date User Action Args
2026-03-22 22:46:46dspyzcreate