Open guanghuhappysf128 opened 4 years ago
Here is the link for the domain and problem file. Got the same result when use online editor: http://editor.planning.domains/#edit_session=jVYVlhdoeRirKvL
Fascinating...
@nirlipo would the planner be adding a final step to reach the goal given that it's a non-standard one (negations and disjunctions).
@guanghuhappysf128 Keep in mind that you should only share read-only links from the editor (otherwise anyone with the link can start making edits!)
Btw, the error status there is due to us not being able to extract the grounded action schema for display -- not an error in trying to find a plan. This is why a plan shows, but in the online editor you don't have the full action descriptions for each step.
This is a technique used in preprocessing by FF-parser to handle disjunctive goal formulas, adding $n$ dummy actions reach-goal, whose preconditions is each of the n clauses in the disjunction.
For this domain with goal formula
(:goal
(and
(not (isFood a5))
(not (isCapsule b1))
(or
(not (isGhost a4))
(not (isGhost b4))
)
)
)
we get:
Action (REACH-GOAL)
Pre(a) = {(NOT-ISFOOD A5), (NOT-ISCAPSULE B1), (NOT-ISGHOST B4)}
Add(a) = {}
Del(a) = {}
Conditional Effects:
cond_eff 1:
Pre(cond_eff) = {}
Add(cond_eff) = {GOAL-REACHED}
Del(cond_eff) = {}
Cost = 1
Action (REACH-GOAL)
Pre(a) = {(NOT-ISFOOD A5), (NOT-ISCAPSULE B1), (NOT-ISGHOST A4)}
Add(a) = {}
Del(a) = {}
Conditional Effects:
cond_eff 1:
Pre(cond_eff) = {}
Add(cond_eff) = {GOAL-REACHED}
Del(cond_eff) = {}
and the goal of the problem is set to GOAL-REACHED
.
So it was the disjunction in the end. The data-structures ok with multiple actions using the same name? Wild...
Better to be safe :) We map each action to a unique ID, just in case the parser generates groundings that PDDL wouldn't allow, like naming conventions.
This example in LAPKT is useful, as it gets pddl files and prints the output of FF-parser.
Beauty.
So @guanghuhappysf128 , I hope this makes it clear where/why things were breaking for you. I'm going to rename the issue title to address the fact that the solution parser could be a little more robust in what it extracts (so it should show the full actions for those it manages to extract, rather than failing outright). Thanks for reporting!
When I use solver API, the following case happens. I didn't have any action named
reach-goal
. Here is the return json:Could you please help me out on figure out how could this happened?