Skip to content

Commit

Permalink
Erased Discrete Belief constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Omastto1 committed Apr 21, 2021
1 parent d4d123f commit 5a30cbc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 11 deletions.
2 changes: 0 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ authors = ["Tomas Omasta <omastto1@fel.cvut.cz> and contributors"]
version = "0.3.1"

[deps]
BeliefUpdaters = "8bb6e9a1-7d73-552c-a44a-e5dc5634aac4"
POMDPLinter = "f3bd98c0-eb40-45e2-9eb1-f2763262d755"
POMDPModelTools = "08074719-1b2a-587c-a292-00f91cc44415"
POMDPs = "a93abf59-7444-517b-a68a-c42f96afdd7d"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[compat]
BeliefUpdaters = "0.2"
POMDPLinter = "0.1"
POMDPModelTools = "0.3"
POMDPs = "0.9"
Expand Down
1 change: 0 additions & 1 deletion src/FiniteHorizonPOMDPs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module FiniteHorizonPOMDPs
using POMDPs
using POMDPModelTools
using Random: Random, AbstractRNG
using BeliefUpdaters


export
Expand Down
8 changes: 0 additions & 8 deletions src/fixhorizon.jl
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,6 @@ Return stage of InStageDistribution
"""
stage(d::InStageDistribution) = d.stage


# convert(::Type{Array{Float64, 1}}, d::FiniteHorizonPOMDPs.InStageDistribution{DiscreteUniform}, m::FiniteHorizonPOMDPs.FixedHorizonPOMDPWrapper) = vec([pdf(d, s) for s in states(m)])
# convert(::Type{Array{Float64, 1}}, d::FiniteHorizonPOMDPs.InStageDistribution{BoolDistribution}, m::FiniteHorizonPOMDPs.FixedHorizonPOMDPWrapper) = [[distrib(d).p[1], 1 - distrib(d).p[1]]..., zeros(length(states(m)) - 2)...]

function BeliefUpdaters.DiscreteBelief(pomdp, b::InStageDistribution; check::Bool=true)
return DiscreteBelief(pomdp, convert(Array{Float64, 1}, b, pomdp); check)
end

Base.rand(rng::AbstractRNG, s::Random.SamplerTrivial{<:InStageDistribution}) = (rand(rng, s[].d), s[].stage)

function POMDPs.pdf(d::InStageDistribution, ss::Tuple{<:Any, Int})
Expand Down

0 comments on commit 5a30cbc

Please sign in to comment.