Skip to content

Commit

Permalink
Added a dummy RNG to bounds (not needed here, but is now required by …
Browse files Browse the repository at this point in the history
…LPDM); updated initialstate_distribution() call.
  • Loading branch information
ebalaban committed Jan 8, 2020
1 parent f1f757d commit 732d216
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/2D/LPDMBounds2d.jl
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
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}()
this.lb_ = +Inf
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
Expand Down
2 changes: 1 addition & 1 deletion src/2D/lightdark2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 732d216

Please sign in to comment.