diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index af98974..1189c97 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,16 +1,35 @@ name: CI - -on: [push, pull_request] - +on: + push: + branches: + - master + tags: '*' + pull_request: jobs: test: - runs-on: ubuntu-latest - + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - "1" + os: + - ubuntu-latest + - macOS-latest + - windows-latest + arch: + - x64 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v1 with: - version: '1' - arch: x64 + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: julia-actions/cache@v1 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v3 + with: + files: lcov.info \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..00e1ed1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +Manifest.toml +.vscode +**/*.pomdpx +**/*.out \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 044056a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ - -language: julia -os: - - linux - - osx - - windows - -julia: - - 1 - -notifications: - email: false - -script: - - git clone https://github.com/JuliaRegistries/General $(julia -e 'import Pkg; println(joinpath(Pkg.depots1(), "registries", "General"))') - - git clone https://github.com/JuliaPOMDP/Registry $(julia -e 'import Pkg; println(joinpath(Pkg.depots1(), "registries", "JuliaPOMDP"))') - - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi - - julia --project --color=yes -e 'import Pkg; Pkg.build(); Pkg.test(coverage=true)' -after_success: - - julia --project -e 'import Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())' diff --git a/Project.toml b/Project.toml index 36bf479..55d11ba 100644 --- a/Project.toml +++ b/Project.toml @@ -1,11 +1,11 @@ name = "BeliefGridValueIteration" uuid = "d6851e30-d4b8-11e9-06de-0b345e2a813d" -version = "0.1.1" +version = "0.1.2" [deps] LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" POMDPLinter = "f3bd98c0-eb40-45e2-9eb1-f2763262d755" -POMDPModelTools = "08074719-1b2a-587c-a292-00f91cc44415" +POMDPTools = "7588e00f-9cae-40de-98dc-e0c70c48cdd7" POMDPs = "a93abf59-7444-517b-a68a-c42f96afdd7d" Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" @@ -13,9 +13,9 @@ ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" [compat] -POMDPs = "0.8, 0.9" POMDPLinter = "0.1" -POMDPModelTools = "0.3" +POMDPs = "0.9" +POMDPTools = "0.1" Parameters = "0.12" ProgressMeter = "1" julia = "1" diff --git a/README.md b/README.md index eae5175..f87da23 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,20 @@ # BeliefGridValueIteration -[![Build Status](https://travis-ci.org/JuliaPOMDP/BeliefGridValueIteration.jl.svg?branch=master)](https://travis-ci.org/JuliaPOMDP/BeliefGridValueIteration.jl) -[![codecov](https://codecov.io/gh/JuliaPOMDP/BeliefGridValueIteration.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaPOMDP/BeliefGridValueIteration.jl) -[![Coverage Status](https://coveralls.io/repos/JuliaPOMDP/BeliefGridValueIteration.jl/badge.svg)](https://coveralls.io/r/JuliaPOMDP/BeliefGridValueIteration.jl) +[![CI](https://github.com/JuliaPOMDP/BeliefGridValueIteration.jl/actions/workflows/CI.yml/badge.svg)](https://github.com/JuliaPOMDP/BeliefGridValueIteration.jl/actions/workflows/CI.yml) +[![codecov.io](http://codecov.io/github/JuliaPOMDP/BeliefGridValueIteration.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaPOMDP/BeliefGridValueIteration.jl?branch=master) An offline POMDP solver from "Computationally Feasible Bounds for Partially Observed Markov Decision Processes" (1991), by W. S. Lovejoy. It computes an upper bound on the value function by performing value iteration on a discretized belief space. ## Installation -Start Julia and make sure you have the JuliaPOMDP registry: +Install using the standard package manager: ```julia -import POMDPs -POMDPs.add_registry() +using Pkg +Pkg.add("BeliefGridValueIteration") ``` -Then install using the standard package manager: - -```julia -using Pkg; Pkg.add("BeliefGridValueIteration") -``` - - ## Usage ```julia diff --git a/src/BeliefGridValueIteration.jl b/src/BeliefGridValueIteration.jl index 7e758a4..8758f20 100644 --- a/src/BeliefGridValueIteration.jl +++ b/src/BeliefGridValueIteration.jl @@ -6,7 +6,7 @@ using Printf using Parameters using POMDPs using POMDPLinter -using POMDPModelTools +using POMDPTools using ProgressMeter export diff --git a/test/lovejoy_serial.jl b/test/lovejoy_serial.jl index 36bc9fb..909a678 100644 --- a/test/lovejoy_serial.jl +++ b/test/lovejoy_serial.jl @@ -1,7 +1,7 @@ # A non vectorized version of the algorithm using LinearAlgebra using POMDPs -using POMDPModelTools +using POMDPTools function freudenthal_vertices!(V, v, i) n = length(v) @@ -159,4 +159,4 @@ function lovejoy_upper_bound(pomdp, m, ϵ, k_max) end end return (U,π) -end \ No newline at end of file +end diff --git a/test/model.pomdpx b/test/model.pomdpx deleted file mode 100644 index 079f79b..0000000 --- a/test/model.pomdpx +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - This is a pomdpx file for a partially observable MDP - - - 0.95 - - - - - 2 - - - - 3 - - - - 2 - - - - - - - - - - state0 - null - - - s0 - 0.5 - - - s1 - 0.5 - - - - - - - - - state1 - action state0 - - - a0 s0 s0 - 1.0 - - - a1 s0 s0 - 0.5 - - - a1 s0 s1 - 0.5 - - - a2 s0 s0 - 0.5 - - - a2 s0 s1 - 0.5 - - - a0 s1 s1 - 1.0 - - - a1 s1 s0 - 0.5 - - - a1 s1 s1 - 0.5 - - - a2 s1 s0 - 0.5 - - - a2 s1 s1 - 0.5 - - - - - - - - - observation - action state1 - - - a0 s0 o0 - 0.85 - - - a0 s0 o1 - 0.15000000000000002 - - - a1 s0 o0 - 0.5 - - - a1 s0 o1 - 0.5 - - - a2 s0 o0 - 0.5 - - - a2 s0 o1 - 0.5 - - - a0 s1 o0 - 0.15000000000000002 - - - a0 s1 o1 - 0.85 - - - a1 s1 o0 - 0.5 - - - a1 s1 o1 - 0.5 - - - a2 s1 o0 - 0.5 - - - a2 s1 o1 - 0.5 - - - - - - - reward - action state0 - - - a0 s0 - -1.0 - - - a1 s0 - 10.0 - - - a2 s0 - -100.0 - - - a0 s1 - -1.0 - - - a1 s1 - -100.0 - - - a2 s1 - 10.0 - - - - - - \ No newline at end of file diff --git a/test/policy.out b/test/policy.out deleted file mode 100644 index b802df0..0000000 --- a/test/policy.out +++ /dev/null @@ -1,9 +0,0 @@ - - - --81.5975 28.4025 -3.01448 24.6954 -24.6954 3.01452 -28.4025 -81.5975 -19.3711 19.3711 -