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
However, I run the following codes, it seems this transformation is not allowed?
# -- RockSample (15, 15) ---
pomdp = RockSamplePOMDP(15, 15)
b0 = initialstate(pomdp)
s = rand(b0)
println(s)
convert_s(Vector{Float64}, s, pomdp)
### output ###
ERROR: MethodError: no method matching convert_s(::Type{Vector{Float64}}, ::RSState{15}, ::RockSamplePOMDP{15})
Closest candidates are:
convert_s(::Type{A1}, ::A2, ::Union{MDP, POMDP}) where {A1<:AbstractArray, A2<:AbstractArray} at C:\Users\Yang\.julia\packages\POMDPs\XBTe5\src\pomdp.jl:153
convert_s(::Type{V}, ::Any, ::FullyObservablePOMDP) where V<:AbstractArray at C:\Users\Yang\.julia\packages\POMDPTools\i3nmI\src\ModelTools\fully_observable_pomdp.j
l:39
convert_s(::Type{A}, ::Number, ::Union{MDP, POMDP}) where A<:AbstractArray at
...
Stacktrace:
Did I miss something? I just would like to transform any given state s in any (PO)MDP into a vector<double>, so that the solver could be generic to handle different problems.
Thanks for your help.
The text was updated successfully, but these errors were encountered:
Hi @yangyou95 , you are understanding the usage correctly. The issue is that RockSample does not implement convert_s at the moment. The problems in POMDPs.jl have varying levels of completeness in implementing the entire interface, and this one just doesn't have convert_s.
If you want to submit a PR to RockSample.jl to add it and test it, that would be really helpful. Otherwise I might be able to get around to it sometime soon
I'm learning how to use this POMDPs.jl framework (which is amazing!) and I'm really new to Julia, maybe this is a stupid question.
According to the documentation (https://juliapomdp.github.io/POMDPs.jl/latest/api/#POMDPs.convert_s),
This convert_s(::Type{V}, s, POMDP) function should output a vector, which corresponds to the state s in the given POMDP.
For example, like "vector<double>" in c++.
However, I run the following codes, it seems this transformation is not allowed?
Did I miss something? I just would like to transform any given state s in any (PO)MDP into a vector<double>, so that the solver could be generic to handle different problems.
Thanks for your help.
The text was updated successfully, but these errors were encountered: