Hi,
First of all, thanks for this awesome library!
I'm learning pddl and started using PDDL4j a few days ago.
It seems the planners have a bug because editor.planning.domains finds a solution to my domain & problem files when pddl4j does not.
I managed to isolate the origin of the error to the following piece of code, which is the precondition of a move action:
(or (at ?to ?watcher) (forall (?c - character) (not (at ?to ?c))) )
This disjunction leads to a "No plan found".
However, when I remove the disjunction and just let the "forall" clause, a plan is found. If I understand correctly how disjunctions work, if one of the two clauses is true, then the action should be usable, so the disjunction should not let to a "no plan found".
Moreover, editor.planning.domains finds a solution to the problem almost instantly even with the disjunction there.
I tried with -p 0/1/2, but had the same result each time.
The complete action code is as following. Basically I want to force ?watcher to be set so at ?to ?watcher is true if it is possible, else ?watcher can be any character:
(:action move
:parameters (?character ?watcher - character ?from ?to - place ?characterhouse - house)
:precondition (and
(at ?from ?character)
; If someone is in the room, pick it as watcher, else take someone randomly and ignore it in effects (conditional effect).
(or
(at ?to ?watcher)
(forall (?c - character) (not (at ?to ?c)))
)
(not (= ?from ?to))
(isfromhouse ?character ?characterhouse)
;Precondition: Either ?to is locked with ?key and ?character possesses ?key, either ?to is not locked.
(or
(exists (?key - key) (and (islocked ?to ?key) (possess ?key ?character) ) )
(forall (?key - key) (not (islocked ?to ?key)) )
)
;Precondition: Either ?to is not reserved to a house, either ?character is from the right house
(or
(forall (?h - house) (not (reservedtohouse ?to ?h)) )
(reservedtohouse ?to ?characterhouse)
)
)
:effect (and
(not (at ?from ?character))
(at ?to ?character)
(when (at ?to ?watcher) (sawatplace ?character ?watcher ?to))
)
)
Do you know where it could come from?
Thanks for your help!