-
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.
Merge pull request #6 from dylan-asmar/refactor_state_space_map
Refactor state space using a graph approach
- Loading branch information
Showing
30 changed files
with
1,100 additions
and
570 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
[deps] | ||
BeliefUpdaters = "8bb6e9a1-7d73-552c-a44a-e5dc5634aac4" | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
POMDPModelTools = "08074719-1b2a-587c-a292-00f91cc44415" | ||
POMDPs = "a93abf59-7444-517b-a68a-c42f96afdd7d" | ||
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" | ||
POMDPTools = "7588e00f-9cae-40de-98dc-e0c70c48cdd7" |
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.
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
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.
afe8cba
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
afe8cba
There was a problem hiding this comment.
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/96863
Tip: Release Notes
Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.
To add them here just re-invoke and the PR will be updated.
Tagging
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: