From 732d2161eb996109207e4d5a01cad44f54d0079d Mon Sep 17 00:00:00 2001 From: ebalaban Date: Tue, 7 Jan 2020 21:19:35 -0800 Subject: [PATCH] Added a dummy RNG to bounds (not needed here, but is now required by LPDM); updated initialstate_distribution() call. --- src/2D/LPDMBounds2d.jl | 4 +++- src/2D/lightdark2d.jl | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/2D/LPDMBounds2d.jl b/src/2D/LPDMBounds2d.jl index 6ea9996..a685016 100644 --- a/src/2D/LPDMBounds2d.jl +++ b/src/2D/LPDMBounds2d.jl @@ -1,11 +1,12 @@ import LPDM: bounds, best_lb_action, best_ub_action -using LightDarkPOMDPs +using LightDarkLPDM mutable struct LDBounds2d{S,A,O} lb_ ::Float64 ub_ ::Float64 best_lb_action_::Vec2 best_ub_action_::Vec2 + rng::RNGVector # dummy RNG, not used function LDBounds2d{S,A,O}(::POMDP{S,A,O}) where {S,A,O} this = new{S,A,O}() @@ -13,6 +14,7 @@ mutable struct LDBounds2d{S,A,O} this.ub_ = -Inf this.best_lb_action_ = Vec2(NaN,NaN) this.best_ub_action_ = Vec2(NaN,NaN) + this.rng = RNGVector(1, UInt32(42)) return this end end diff --git a/src/2D/lightdark2d.jl b/src/2D/lightdark2d.jl index 84e8ac2..f3ef160 100644 --- a/src/2D/lightdark2d.jl +++ b/src/2D/lightdark2d.jl @@ -92,7 +92,7 @@ function LPDM.isterminal(pomdp::AbstractLD2, particles::Vector{LPDMParticle{LD2S end -POMDPs.initial_state_distribution(p::AbstractLD2) = p.init_dist +POMDPs.initialstate_distribution(p::AbstractLD2) = p.init_dist function POMDPs.reward(p::AbstractLD2, s::Vec2, a::Vec2) if isterminal(p,s)