JuliaPlanners/PDDL.jl

A bug in the strips test domain

Closed this issue · 3 comments

Hi, I just noticed an issue where "robby" is able to move to the location it is currently at. E.x. if (robbyat rooma), then the action (move rooma rooma) is legal. After executing that action, there is no robbyat fact, and so all actions become illegal.

This can be fixed by adding another precondition to the move action: (not (= ?from ?to))

You're right that (move rooma rooma) is (strangely) available! I don't consider that bug though -- it's implied by the domain file for the gripper domain in the 1998 International Planning Competition. To add the (not (= ?from ?to)) precondition you suggested, the domain would need to have the equality requirement as well in the requirements field -- basic STRIPs doesn't support equality checking, which is why it's absent from this domain file.

After executing that action, there is no robbyat fact, and so all actions become illegal.

As for the above, I've just tried reproducing it on my end, and don't seem to be running into the same issue. Could you show an example? This seems to be working fine for me:

path = joinpath(dirname(pathof(PDDL)), "..", "test", "strips")
domain = load_domain(joinpath(path, "domain.pddl"))
problem = load_problem(joinpath(path, "problem.pddl"))

state = initstate(domain, problem)
next_state = execute(domain, state, pddl"(move rooma rooma)")
@assert state == next_state
@assert !isempty(collect(available(domain, next_state)))

Thanks for the detailed explanation. I actually can't reproduce that behavior either, so I'm not sure what I was seeing earlier but it might be unrelated to PDDL.jl.