Closed yangyou95 closed 1 year ago
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
.
The implementation should look something like:
POMDPs.convert_s(T::Type{<:AbstractArray}, s::RSState, m::RockSamplePOMDP) = convert(T, vcat(s.pos, s.rocks))
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
Thanks for the explanation! I will work on that.
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.