-
Notifications
You must be signed in to change notification settings - Fork 4
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 #29 from Omastto1/master
FiniteHorizonPOMDPs.jl v0.3.1 - Documentation improvements. - Addition of missing interface methods to interface. - Addition of access functions of InStageDIstribution. - README.md update.
- Loading branch information
Showing
5 changed files
with
122 additions
and
52 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,17 +1,15 @@ | ||
name = "FiniteHorizonPOMDPs" | ||
uuid = "8a13bbfe-798e-11e9-2f1c-eba9ee5ef093" | ||
authors = ["Tomas Omasta <[email protected]> and contributors"] | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
|
||
[deps] | ||
BeliefUpdaters = "8bb6e9a1-7d73-552c-a44a-e5dc5634aac4" | ||
POMDPLinter = "f3bd98c0-eb40-45e2-9eb1-f2763262d755" | ||
POMDPModelTools = "08074719-1b2a-587c-a292-00f91cc44415" | ||
POMDPs = "a93abf59-7444-517b-a68a-c42f96afdd7d" | ||
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" | ||
|
||
[compat] | ||
BeliefUpdaters = "0.2" | ||
POMDPLinter = "0.1" | ||
POMDPModelTools = "0.3" | ||
POMDPs = "0.9" | ||
|
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
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,50 +1,73 @@ | ||
""" | ||
stage(m::Union{MDP,POMDP}, ss::MDPState)::Int | ||
HorizonLength(::Type{<:Union{MDP,POMDP}) | ||
HorizonLength(::Union{MDP,POMDP}) | ||
Check whether MDP is Finite or Infinite Horizon and return corresponding struct (FiniteHorizon or InfiniteHorizon). | ||
""" | ||
abstract type HorizonLength end | ||
|
||
"If HorizonLength(m::Union{MDP,POMDP}) == FiniteHorizon(), horizon(m) should be implemented and return an integer" | ||
struct FiniteHorizon <: HorizonLength end | ||
"HorizonLength(m::Union{MDP,POMDP}) == InfiniteHorizon() indicates that horizon(m) should not be called." | ||
struct InfiniteHorizon <: HorizonLength end | ||
|
||
HorizonLength(m::Union{MDP,POMDP}) = HorizonLength(typeof(m)) | ||
HorizonLength(::Type{<:Union{MDP,POMDP}}) = InfiniteHorizon() | ||
|
||
""" | ||
Return the number of *steps* that will be taken in the (PO)MDP, given it is Finite Horizon. | ||
A simulation of a (PO)MDP with `horizon(m) == d` should contain *d+1* states and *d* actions and rewards. | ||
""" | ||
function horizon end | ||
|
||
Return number of state's stage | ||
""" | ||
stage(m::Union{MDP,POMDP}, ss)::Int | ||
stage(m::Union{MDP,POMDP}, o)::Int | ||
stage(d)::Int | ||
Considering a variable or distribution containing its stage assignment, return the number of its stage. | ||
""" | ||
function stage end | ||
|
||
""" | ||
stage_states(m::Union{MDP,POMDP}, stage::Int) | ||
Create Infinite Horizon MDP's states for given stage. | ||
Create (PO)MDP's states for given stage. | ||
""" | ||
function stage_states end | ||
|
||
""" | ||
stage_stateindex(m::Union{MDP,POMDP}, ss::MDPState}::Int | ||
stage_stateindex(m::Union{MDP,POMDP}, ss}::Int | ||
Compute the index of the given state in Infinite Horizon for given stage state space. | ||
Compute the index of the given state in the corresponding stage. | ||
""" | ||
function stage_stateindex end | ||
|
||
""" | ||
HorizonLength(::Type{<:Union{MDP,POMDP}) | ||
HorizonLength(::Union{MDP,POMDP}) | ||
ordered_stage_states(w::FHWrapper, stage::Int) | ||
Check whether MDP is Finite or Infinite Horizon and return corresponding struct (FiniteHorizon or InfiniteHorizon). | ||
Return an AbstractVector of states from given stage ordered according to stage_stateindex(mdp, s). | ||
""" | ||
abstract type HorizonLength end | ||
function ordered_stage_states end | ||
|
||
"If HorizonLength(m::Union{MDP,POMDP}) == FiniteHorizon(), horizon(m) should be implemented and return an integer" | ||
struct FiniteHorizon <: HorizonLength end | ||
"HorizonLength(m::Union{MDP,POMDP}) == InfiniteHorizon() indicates that horizon(m) should not be called." | ||
struct InfiniteHorizon <: HorizonLength end | ||
""" | ||
stage_observations(m::Union{MDP,POMDP}, stage::Int) | ||
HorizonLength(m::Union{MDP,POMDP}) = HorizonLength(typeof(m)) | ||
HorizonLength(::Type{<:Union{MDP,POMDP}}) = InfiniteHorizon() | ||
Create (PO)MDP's observations for given stage. | ||
""" | ||
function stage_observations end | ||
|
||
""" | ||
Return the number of *steps* that will be taken in the (PO)MDP, given it is Finite Horizon. | ||
stage_obsindex(m::Union{MDP,POMDP}, o::stage::Int) | ||
A simulation of a (PO)MDP with `horizon(m) == d` should contain *d+1* states and *d* actions and rewards. | ||
Compute the index of the given observation in the corresponding stage. | ||
""" | ||
function horizon end | ||
function stage_obsindex end | ||
|
||
""" | ||
stage_observations(m::Union{MDP,POMDP}, stage::Int) | ||
ordered_stage_observations(w::FHWrapper, stage::Int) | ||
Infinite Horizon MDP's observation for given stage. | ||
Return an AbstractVector of observations from given stage ordered according to stage_obsindex(w,o). | ||
""" | ||
function stage_observations end | ||
function ordered_stage_observations end |