pellierd / pddl4j

PDDL4J is an open source library under LGPL license whose purpose of PDDL4J is to facilitate the development of JAVA tools for Automated Planning based on PDDL language (Planning Domain Description Language).
https://lig-membres.imag.fr/pellier/
GNU Lesser General Public License v3.0
147 stars 68 forks source link

[SUGGESTION] If action has the same predicate in both positive and negative effects, remove the predicate from negative effects #123

Open o-fir opened 2 months ago

o-fir commented 2 months ago

Assume we have this action:

(:action do_grind
        :parameters (?part_x - part ?do_grind_oldsurface - surface)
        :precondition 
            (and
                (surface_condition ?part_x ?do_grind_oldsurface)
            )
        :effect
            (and
                (not (surface_condition ?part_x ?do_grind_oldsurface))
                (surface_condition ?part_x verysmooth)
            )
    )

If we have a grounded action (do_grind p0 verysmooth), PDDL4J grounds it in such a way that (surface_condition p0 verysmooth) is in both positive and negative effect bitvectors. I think it would be safer if it only appeared in positive bitvector, even though it would restrict cases where someone wants to prioritize negative predicates.