You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm just creating this issue to document what I did today to try to fix this. I'll close the issue, but I want to be able to find it later if it comes up.
If observation(a, sp) and observation(s,a,sp) are both in POMDPs.jl with their optional final arguments, there will be an ambiguous function warning. To get rid of this warning, we decided to just make the final argument non-optional. This shouldn't affect the problem-implementer other than that they might get a less easy-to-understand error message if they don't implement observation(s,a,sp).
The error can theoretically be fixed by defining a disambiguation method. The warning says...
To fix, define
observation(POMDPs.POMDP{_<:POMDPs.AbstractDistribution{#O<:Any}, _<:POMDPs.AbstractDistribution{#O<:Any}, #O<:Any}, _<:POMDPs.AbstractDistribution{#O<:Any}, _<:POMDPs.AbstractDistribution{#O<:Any}, _<:POMDPs.AbstractDistribution{#O<:Any})
Unfortunately, for reasons discussed in this issue: JuliaLang/julia#5384 , it is very difficult to figure out what function or combination of functions need to be implemented to solve the ambiguity. I tried many combinations using the following functions, but none were able to resolve the ambiguity between A and B without introducing new ambiguities:
abstract AbsD
abstract AbsP{S,A}
# f{SA}(p::AbsP{SA,SA}, s::SA, a::SA, sp::SA) = "disambiguation"
# f{D}(p::AbsP{D,D}, a::D, sp::D, d::D) = "disambiguation" # compatible with A, compatible with B, does not disambiguate
# f{S<:AbsD, A<:AbsD}(p::AbsP{S,A}, a::A, sp::S, d::A) = "disambiguation"
# f{S<:AbsD, A}(p::AbsP{S,A}, s::S, a::A, sp::S) = "disambiguation" # compatible with A
# f{S<:AbsD, A}(p::AbsP{S,A}, s::S, a::A, sp::AbsD) = "disambiguation" # compatible with A, not B
# f{S<:AbsD, A<:AbsD}(p::AbsP{S,A}, a::A, sp::S, d::S) = "disambiguation"
# f{S<:AbsD, A<:AbsD}(p::AbsP{S,A}, a::A, sp::S, d::AbsD) = "disambiguation" # C # disambiguates A and B, compatible with B
f{S,A}(p::AbsP{S,A}, s::S, a::A, sp::S) = "s,a,sp" # A
f{S,A}(p::AbsP{S,A}, a::A, sp::S, d::AbsD) = "a,sp,d" # B
Maybe one day we can figure this out, but for now it's too much of a time sink.
The text was updated successfully, but these errors were encountered:
I'm just creating this issue to document what I did today to try to fix this. I'll close the issue, but I want to be able to find it later if it comes up.
If observation(a, sp) and observation(s,a,sp) are both in POMDPs.jl with their optional final arguments, there will be an ambiguous function warning. To get rid of this warning, we decided to just make the final argument non-optional. This shouldn't affect the problem-implementer other than that they might get a less easy-to-understand error message if they don't implement observation(s,a,sp).
The error can theoretically be fixed by defining a disambiguation method. The warning says...
Unfortunately, for reasons discussed in this issue: JuliaLang/julia#5384 , it is very difficult to figure out what function or combination of functions need to be implemented to solve the ambiguity. I tried many combinations using the following functions, but none were able to resolve the ambiguity between A and B without introducing new ambiguities:
Maybe one day we can figure this out, but for now it's too much of a time sink.
The text was updated successfully, but these errors were encountered: