Skip to content
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

Sampler for this object is not defined #21

Open
logankilpatrick opened this issue May 15, 2020 · 1 comment
Open

Sampler for this object is not defined #21

logankilpatrick opened this issue May 15, 2020 · 1 comment

Comments

@logankilpatrick
Copy link

Hey Zach,

I am getting the following error when using POMCPOW with some other use cases:

ERROR: LoadError: ArgumentError: Sampler for this object is not defined
Stacktrace:
 [1] Random.Sampler(::Type{Random.MersenneTwister}, ::Random.SamplerTrivial{LPDM.LPDMBelief{SHERPA.RPState,SHERPA.RPAction,SHERPA.RPObservation},Any}, ::Val{1}) at /Users/sabae/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Random/src/Random.jl:145
 [2] Random.Sampler(::Random._GLOBAL_RNG, ::Random.SamplerTrivial{LPDM.LPDMBelief{SHERPA.RPState,SHERPA.RPAction,SHERPA.RPObservation},Any}, ::Val{1}) at /Users/sabae/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Random/src/Random.jl:139
 [3] rand(::Random._GLOBAL_RNG, ::Random.SamplerTrivial{LPDM.LPDMBelief{SHERPA.RPState,SHERPA.RPAction,SHERPA.RPObservation},Any}) at /Users/sabae/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Random/src/Random.jl:253 (repeats 2 times)
 [4] search(::POMCPOW.POMCPOWPlanner{SHERPA.Synthesis.SynthesisPOMDP{SHERPA.Synthesis.SynthesisBoundsConfig},POMCPOW.POWNodeFilter,POMCPOW.MaxUCB,MCTS.RandomActionGenerator{Random._GLOBAL_RNG},BasicPOMCP.SolvedPORollout{POMDPPolicies.RandomPolicy{Random._GLOBAL_RNG,SHERPA.Synthesis.SynthesisPOMDP{SHERPA.Synthesis.SynthesisBoundsConfig},BeliefUpdaters.NothingUpdater},BeliefUpdaters.NothingUpdater,Random._GLOBAL_RNG},Int64,Float64,POMCPOW.POMCPOWSolver{Random._GLOBAL_RNG}}, ::POMCPOW.POMCPOWTree{POMCPOW.POWNodeBelief{SHERPA.RPState,SHERPA.RPAction,SHERPA.RPObservation,SHERPA.Synthesis.SynthesisPOMDP{SHERPA.Synthesis.SynthesisBoundsConfig}},SHERPA.RPAction,SHERPA.RPObservation,LPDM.LPDMBelief{SHERPA.RPState,SHERPA.RPAction,SHERPA.RPObservation}}, ::Dict{Symbol,Any}) at /Users/logankilpatrick/.julia/packages/POMCPOW/7FCnV/src/planner2.jl:62
 [5] #action_info#5(::Bool, ::typeof(POMDPModelTools.action_info), ::POMCPOW.POMCPOWPlanner{SHERPA.Synthesis.SynthesisPOMDP{SHERPA.Synthesis.SynthesisBoundsConfig},POMCPOW.POWNodeFilter,POMCPOW.MaxUCB,MCTS.RandomActionGenerator{Random._GLOBAL_RNG},BasicPOMCP.SolvedPORollout{POMDPPolicies.RandomPolicy{Random._GLOBAL_RNG,SHERPA.Synthesis.SynthesisPOMDP{SHERPA.Synthesis.SynthesisBoundsConfig},BeliefUpdaters.NothingUpdater},BeliefUpdaters.NothingUpdater,Random._GLOBAL_RNG},Int64,Float64,POMCPOW.POMCPOWSolver{Random._GLOBAL_RNG}}, ::LPDM.LPDMBelief{SHERPA.RPState,SHERPA.RPAction,SHERPA.RPObservation}) at /Users/logankilpatrick/.julia/packages/POMCPOW/7FCnV/src/planner2.jl:34
 [6] action_info at /Users/logankilpatrick/.julia/packages/POMCPOW/7FCnV/src/planner2.jl:28 [inlined]
 [7] action at /Users/logankilpatrick/.julia/packages/POMCPOW/7FCnV/src/planner2.jl:44 [inlined]

This happens when I do: a = POMDPs.action(policy, current_b) in my code. Any suggestions to resolve this?

@zsunberg
Copy link
Member

Hi @logankilpatrick,

Sampler not defined errors mean that rand was not properly implemented for some object. Maybe in this case, rand is not implemented for the belief? What type is current_b?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants