-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
20c3dc8
commit 6b6779c
Showing
4 changed files
with
62 additions
and
0 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
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,28 @@ | ||
# Defining a Belief Compressor | ||
|
||
In this section, we outline the requirements and guidelines for defining a belief `Compressor`. | ||
|
||
## Interface | ||
|
||
The `Compressor` interface is extremely minimal. It only supports two methods: `fit!` and the associated [functor](https://docs.julialang.org/en/v1/manual/methods/#Function-like-objects). For example, if you wanted to implement your own `Compressor`, you could write something like this | ||
|
||
```julia | ||
struct MyCompressor <: Compressor | ||
foo | ||
bar | ||
end | ||
|
||
# functor definition | ||
function (c::MyCompressor)(beliefs) | ||
# YOUR CODE HERE | ||
end | ||
|
||
function fit!(c::MyCompressor, beliefs) | ||
# YOUR CODE HERE | ||
end | ||
``` | ||
|
||
## Implementation Tips | ||
* For robustness, both the functor and `fit!` should be able to handle `AbstractVector` and `AbstractMatrix` inputs. | ||
* `fit!` is called only once after beliefs are sampled from the POMDP. | ||
* `CompressedBeliefSolver` will attempt to convert each belief state (often of type [`DiscreteBelief`](https://juliapomdp.github.io/POMDPs.jl/latest/POMDPTools/beliefs/#POMDPTools.BeliefUpdaters.DiscreteBelief)) into an `AbstractArray{Float64}` using [`convert_s`](https://juliapomdp.github.io/POMDPs.jl/latest/api/#POMDPs.convert_s). As a convenience, CompressedBeliefMDP implements conversions for commonly used belief types; however, if the POMDP has a custom belief state, then it is the users' responsibility to implement the appropriate conversion. See the source code for help. |
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,11 @@ | ||
# Concepts and Architecture | ||
|
||
CompressedBeliefMDPs.jl aims to implement a generalization of the [belief compression algorithm](https://papers.nips.cc/paper_files/paper/2002/hash/a11f9e533f28593768ebf87075ab34f2-Abstract.html) for solving large POMDPs. The algorithm has four steps: | ||
1. collect belief samples, | ||
2. compress the samples, | ||
3. create the compressed belief-state MDP, | ||
4. solve the MDP. | ||
|
||
Each step is handled by `Sampler`, `Compressor`, `CompressedBeliefMDP`, and `CompressedBeliefSolver` respectively. | ||
|
||
For more details, please see the rest of the documentation or the [associated paper](../../paper.md). |
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,20 @@ | ||
# Defining a Sampler | ||
|
||
In this section, we outline the requirements and guidelines for defining a belief `Sampler`. | ||
|
||
## Interface | ||
|
||
The `Sampler` interface only has one method: the [functor](https://docs.julialang.org/en/v1/manual/methods/#Function-like-objects). For example, if you wanted to implement your own `Sampler`, you could write something like this | ||
|
||
```julia | ||
struct MySampler <: Compressor | ||
foo | ||
bar | ||
end | ||
|
||
# functor definition | ||
function (c::MySampler)(pomdp::POMDP) | ||
# YOUR CODE HERE | ||
end | ||
``` | ||
|