-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor of problem using a map to represent the state space.
- Loading branch information
1 parent
91e71f7
commit 7d338bb
Showing
28 changed files
with
1,095 additions
and
561 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
Manifest.toml | ||
.DS_Store | ||
docs/build/ | ||
.vscode | ||
.vscode | ||
policy.out | ||
model.pomdpx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
name = "TagPOMDPProblem" | ||
uuid = "8a653263-a1cc-4cf9-849f-f530f6ffc800" | ||
version = "0.1.1" | ||
version = "0.2.0" | ||
|
||
[deps] | ||
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" | ||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
MetaGraphs = "626554b9-1ddb-594c-aa3c-2596fe9399a5" | ||
POMDPTools = "7588e00f-9cae-40de-98dc-e0c70c48cdd7" | ||
POMDPs = "a93abf59-7444-517b-a68a-c42f96afdd7d" | ||
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" | ||
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" | ||
|
||
[compat] | ||
julia = "1.6" | ||
Graphs = "1.9" | ||
LinearAlgebra = "1.6" | ||
MetaGraphs = "0.7" | ||
POMDPTools = "0.1" | ||
POMDPs = "0.9" | ||
Plots = "1.23" | ||
POMDPTools = "0.1" | ||
julia = "1.6" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
""" | ||
This script compares this implementation of the Tag POMDP with the original implementation | ||
performance using SARSOP. The original implementation is available at: | ||
https://bigbird.comp.nus.edu.sg/pmwiki/farm/appl/index.php?n=Main.Repository | ||
""" | ||
|
||
using Pkg | ||
Pkg.add("SARSOP") | ||
Pkg.add("StatsBase") | ||
Pkg.add("ProgressMeter") | ||
|
||
using POMDPs | ||
using POMDPTools | ||
using TagPOMDPProblem | ||
using SARSOP | ||
using StatsBase | ||
using ProgressMeter | ||
|
||
sarsop_timeout = 5 | ||
num_sims = 5000 | ||
|
||
pomdp = TagPOMDP(; transition_option=:orig) | ||
solver = SARSOPSolver(; timeout=sarsop_timeout) | ||
policy = solve(solver, pomdp) | ||
|
||
sim = RolloutSimulator(; max_steps=50) | ||
|
||
rewards = [] | ||
@showprogress dt=1 desc="Running simulations..." for ii in 1:num_sims | ||
r = simulate(sim, pomdp, policy) | ||
push!(rewards, r) | ||
end | ||
|
||
# Print out the mean and 95% confidence interval | ||
println("Original SARSOP performance: $(-6.13) +/- $(0.12)") | ||
println("Reward (w/ 95% CI): $(mean(rewards)) +/- $(1.96 * std(rewards) / sqrt(length(rewards)))") | ||
|
||
Pkg.rm("SARSOP") | ||
Pkg.rm("StatsBase") | ||
Pkg.rm("ProgressMeter") |
Oops, something went wrong.