I suggest using the follwing codes to replace those in policies.jl. This will significantly improve the performance of AlphaVectorPolicy.
function unnormalized_util(p::AlphaVectorPolicy, b::AbstractParticleBelief)
util = zeros(length(alphavectors(p)))
for (i, s) in enumerate(particles(b))
util .+= weight(b, i) .* getindex.(p.alphas, stateindex(p.pomdp, s))
end
return util
end
I suggest using the follwing codes to replace those in
policies.jl
. This will significantly improve the performance ofAlphaVectorPolicy
.