-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix constraint checking in Forward and BreadthFirstSearch planners #22
Conversation
Upon closer inspection, I realized that constraints are also not being checked in the initial state of the search. I believe the best place for this check is the |
Thanks for catching both of these issues! I think adding an SymbolicPlanners.jl/src/planners/forward.jl Lines 370 to 392 in 27364c4
|
I've been testing this on the
|
for act in filter_relevant(heuristic, domain, state, spec) | |
# Regress (reverse-execute) the action | |
next_state = regress(domain, state, act; check=false) | |
# Add constraints to regression state | |
add_constraints!(spec, domain, next_state) |
Thanks! I think this issue overlaps with the one raised in #6. It seems like the method error might be due to how I currently have SymbolicPlanners.jl/src/specifications/backward.jl Lines 53 to 59 in 27364c4
I think the issue would be fixed by changing the type signature for the first method to have a more specific type, thereby avoiding ambiguity about which of the two methods apply. function add_constraints!(
spec::BackwardSearchGoal{G,C}, domain::Domain, state::State
) where {G <: StateConstrainedGoal, C <: PDDL.Diff}
update!(state, domain, spec.constraint_diff)
end I think fixing the method ambiguity issue is separate from the other issue you discovered. I think the second issue is due to the fact that I think it will take some refactoring of the underlying PDDL codebase for me to properly support abstract state representations in all their generality. In the meantime, it'd be great if you could try testing a case where the constraints only contain positive literals, and no negative literals. Hopefully the planner will do the correct thing in that case. We can also update the docstring to clarify what BackwardPlanner currently supports or does not support. |
After changing the suggested type signature, the ambiguity is resolved, and the correct method is invoked. However, this results in an Is |
|
Sounds good 👍. I've added a sentence to the planner's documentation. |
No description provided.