predict
and reweight
but I can’t easily see how to use resample
julia> resample(ImportanceResampler, WeightedParticleBelief(pm,wm,sum(wm)), pm)
ERROR: MethodError: no method matching resample(::Type{ImportanceResampler}, ::WeightedParticleBelief{AgentBasedModel{Union{Grass, Sheep, Wolf},GridSpace{SimpleGraph{Int64},2,Int64},Agents.var"#by_union#9"{Bool,Bool},Nothing}}, ::Array{AgentBasedModel{Union{Grass, Sheep, Wolf},GridSpace{SimpleGraph{Int64},2,Int64},Agents.var"#by_union#9"{Bool,Bool},Nothing},1})
Closest candidates are:
resample(::Any, ::WeightedParticleBelief, ::Any, !Matched::Any, !Matched::Any, !Matched::Any, !Matched::Any, !Matched::Any) at /Users/dom/.julia/packages/ParticleFilters/fCWcv/src/resamplers.jl:17
resample(::Any, ::WeightedParticleBelief, !Matched::Union{POMDPs.MDP, POMDPs.POMDP}, !Matched::Any, !Matched::Any, !Matched::Any, !Matched::Any, !Matched::Any) at /Users/dom/.julia/packages/ParticleFilters/fCWcv/src/resamplers.jl:19
resample(!Matched::ImportanceResampler, ::AbstractParticleBelief{S}, !Matched::AbstractRNG) where S at /Users/dom/.julia/packages/ParticleFilters/fCWcv/src/resamplers.jl:37
simulate
?
reuse_tree::Bool:
If this is true, the tree information is re-used for calculating the next plan.
Of course, clear_tree! can always be called to override this.
default: false
Hi all!
As part of my bachelor thesis, I am to implement a finite horizon interface for POMDPs.jl
.
So far, I have played around with DiscreteValueIteration.jl
and have done direct modifications to the ordered_states
method using reversed topological sort to achieve the desired behaviour and test it on few finite horizon MDP benchmarks (some GridWorld Examples and acyclic graph example).
However, as I am new to Julia, I am unsure as to how to implement a more general interface, such as the one described here.
So far, based on the proposed interface in readme, my plan is following:
1) User implements the finite horizon interface in his MDP (stage_states
, stage_actions
,ordered_states
,...).
2) User selects a solver that uses the explicit POMDPs.jl
interfaces.
3) User calls FiniteHorizonMDP
's solve(solver, mdp) which:
a) solves each epoch in reversed order with correctly ordered states and
b) returns joined Policy
struct.
My plan is also to implement Infinite Horizon to Finite Horizon conversion later on.
Can you either confirm or reject that this is an appropriate approach?
I will be glad for any tip which will make the implementation better.
Tom
convert
an object of type Array{Float64,1} to an object of type Int64"