Skip to content

Commit

Permalink
upgraded to POMDPTools (#31)
Browse files Browse the repository at this point in the history
* upgraded to POMDPTools

* upgraded to POMDPTools
  • Loading branch information
Piaktipik authored Jul 25, 2022
1 parent 345a2b1 commit 120d9cb
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 26 deletions.
12 changes: 3 additions & 9 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,34 +1,28 @@
name = "BasicPOMCP"
uuid = "d721219e-3fc6-5570-a8ef-e5402f47c49e"
repo = "https://github.com/JuliaPOMDP/BasicPOMCP.jl"
version = "0.3.6"
version = "0.3.7"

[deps]
BeliefUpdaters = "8bb6e9a1-7d73-552c-a44a-e5dc5634aac4"
CPUTime = "a9c8d775-2e2e-55fc-8582-045d282d599e"
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
D3Trees = "e3df1716-f71e-5df9-9e2d-98e193103c45"
MCTS = "e12ccd36-dcad-5f33-8774-9175229e7b33"
POMDPLinter = "f3bd98c0-eb40-45e2-9eb1-f2763262d755"
POMDPModelTools = "08074719-1b2a-587c-a292-00f91cc44415"
POMDPPolicies = "182e52fb-cfd0-5e46-8c26-fd0667c990f4"
POMDPSimulators = "e0d0a172-29c6-5d4e-96d0-f262df5d01fd"
POMDPTools = "7588e00f-9cae-40de-98dc-e0c70c48cdd7"
POMDPs = "a93abf59-7444-517b-a68a-c42f96afdd7d"
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
ParticleFilters = "c8b314e2-9260-5cf8-ae76-3be7461ca6d0"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[compat]
BeliefUpdaters = "0.2"
CPUTime = "1"
Colors = "0.9, 0.10, 0.11, 0.12"
D3Trees = "0.3"
MCTS = "0.4"
POMDPLinter = "0.1"
POMDPModelTools = "0.3"
POMDPPolicies = "0.3, 0.4"
POMDPSimulators = "0.3"
POMDPTools = "0.1"
POMDPs = "0.9"
Parameters = "0.12"
ParticleFilters = "0.5"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ The search tree can be visualized with [D3Trees.jl](https://github.com/sisl/D3Tr
using POMDPs
using BasicPOMCP
using POMDPModels
using POMDPModelTools
using POMDPTools
using D3Trees
using Random

Expand Down
4 changes: 2 additions & 2 deletions notebooks/Minimal_Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"outputs": [],
"source": [
"using BasicPOMCP\n",
"using POMDPSimulators"
"using POMDPTools"
]
},
{
Expand Down Expand Up @@ -186,7 +186,7 @@
"source": [
"## Reliable Belief Updates\n",
"\n",
"By default, if the POMDP does not have an explicit observation model implemented (`POMDPs.observation()` or `POMDPModelTools.obs_weight()`), POMCP will attempt to use the unweighted rejection particle filter defined here: https://github.com/JuliaPOMDP/ParticleFilters.jl/blob/master/src/unweighted.jl. Our `LightDark1D` POMDP has a small enough observation space for that to work, but in most cases, we will need to use a weighted particle filter, which will require definition of the observation distribution."
"By default, if the POMDP does not have an explicit observation model implemented (`POMDPs.observation()` or `POMDPTools.obs_weight()`), POMCP will attempt to use the unweighted rejection particle filter defined here: https://github.com/JuliaPOMDP/ParticleFilters.jl/blob/master/src/unweighted.jl. Our `LightDark1D` POMDP has a small enough observation space for that to work, but in most cases, we will need to use a weighted particle filter, which will require definition of the observation distribution."
]
},
{
Expand Down
5 changes: 1 addition & 4 deletions notebooks/Sanity_Checks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,13 @@
"using POMDPModels\n",
"using BasicPOMCP\n",
"using POMDPs\n",
"using POMDPPolicies\n",
"\n",
"@everywhere begin\n",
" using POMDPModels\n",
" using BasicPOMCP\n",
" using POMDPs\n",
" using BeliefUpdaters\n",
" using Random\n",
" using POMDPSimulators\n",
" using POMDPModelTools\n",
" using POMDPTools\n",
"end"
]
},
Expand Down
5 changes: 1 addition & 4 deletions src/BasicPOMCP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@ Current constraints:
using POMDPs
using Parameters
using ParticleFilters
using BeliefUpdaters
using POMDPPolicies
using POMDPSimulators
using CPUTime
using Colors
using Random
using Printf
using POMDPLinter: @POMDP_require, @show_requirements
using POMDPTools

import POMDPs: action, solve, updater
import POMDPModelTools: action_info, UnderlyingMDP
import POMDPLinter

using MCTS
Expand Down
2 changes: 1 addition & 1 deletion src/solver.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function action_info(p::POMCPPlanner, b; tree_in_info=false)
function POMDPTools.action_info(p::POMCPPlanner, b; tree_in_info=false)
local a::actiontype(p.problem)
info = Dict{Symbol, Any}()
try
Expand Down
2 changes: 1 addition & 1 deletion src/visualization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function D3Trees.D3Tree(p::POMCPPlanner; title="POMCP Tree", kwargs...)
a, info = action_info(planner, b)
D3Tree(info[:tree])
Or, you can get this info from a POMDPSimulators History
Or, you can get this info from a POMDPTools History
info = first(ainfo_hist(hist))
D3Tree(info[:tree])
Expand Down
6 changes: 2 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ using POMDPModels
using NBInclude
using D3Trees
using Random
using POMDPSimulators
using POMDPModelTools
using POMDPTesting
using POMDPTools
using POMDPLinter: @requirements_info, @show_requirements, requirements_info
using ParticleFilters: n_particles, particles, particle, weights, weighted_particles, weight_sum, weight

Expand All @@ -33,7 +31,7 @@ states(p::ConstObsPOMDP) = (true, false)
actions(p::ConstObsPOMDP) = (:the_only_action,)
observations(p::ConstObsPOMDP) = (true, false)

@testset "POMDPTesting" begin
@testset "POMDPTools" begin
pomdp = BabyPOMDP()
test_solver(POMCPSolver(), BabyPOMDP())
end;
Expand Down

2 comments on commit 120d9cb

@zsunberg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/64961

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.7 -m "<description of version>" 120d9cbcb2f487e7951c266b7ff42c1afaae4512
git push origin v0.3.7

Please sign in to comment.