Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
o-fir opened this issue Aug 13, 2024 · 1 comment

Comments

@o-fir
Copy link

o-fir commented Aug 13, 2024

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.

@pellierd
Copy link
Owner

PDDL4J generates a warning in that case. The parser checks that an expression cannot have a and not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants