Giter Site home page Giter Site logo

stjordanis / finitehorizonpomdps.jl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from juliapomdp/finitehorizonpomdps.jl

0.0 1.0 0.0 125 KB

POMDPs.jl-compatible interface for defining MDPs and POMDPs with finite horizons

Home Page: https://github.com/JuliaPOMDP/POMDPs.jl

License: MIT License

Julia 100.00%

finitehorizonpomdps.jl's Introduction

FiniteHorizonPOMDPs.jl

Coverage Status

POMDPs.jl-compatible interface for defining MDPs and POMDPs with finite horizons

This package aims to provide a standard interface for defining problems with finite horizons.

The goals are to

  1. Provide a way for value-iteration-based algorithms to start at the final-stage and work backwards
  2. Be compatible with generic POMDPs.jl solvers and simulators (i.e. solvers should not have to check anything more than isterminal)
  3. Provide a wrapper so that an infinite horizon POMDP can be easily made into a finite horizon one
  4. Be compatible with other interface extensions like constrained POMDPs and mixed observability problems

Notably, in accordance with goal (4), this package does not define something like AbstractFiniteHorizonPOMDP.

Usage

Package offers interface for finite horizon POMDPs. Solver currently supports only MDPs. User can either implement:

  • finite horizon MDP using both POMDPs.jl and FiniteHorizonPOMDPs.jl interface functions or
  • infinite horizon MDP and transform it to finite horizon one using fixhorizon utility
using FiniteHorizonPOMDPs
import POMDPModels

gw = SimpleGridWorld()    # initialize Infinite Horizon model
fhgw = fixhorizon(gw, 2)  # use fixhorizon utility to transform it to Finite Horizon

Interface

  • HorizonLength(::Type{<:Union{MDP,POMDP})

    • Checks whether MDP is Finite or Infinite Horizon and return corresponding struct (FiniteHorizon or InfiniteHorizon).
  • horizon(m::Union{MDP,POMDP})::Int

    • Returns the number of steps that will be taken in the (PO)MDP, given it is Finite Horizon.
  • stage(m::Union{MDP,POMDP}, ss)::Int

    • Returns the number of input variable's stage.
  • stage_states(m::Union{MDP,POMDP}, stage::Int)

    • Creates (PO)MDP's states for given stage.
  • stage_stateindex(m::Union{MDP,POMDP}, state)

    • Computes the index of the given state in the corresponding stage.
  • ordered_stage_states(w::FHWrapper, stage::Int)

    • Returns an AbstractVector of states from given stage ordered according to stage_stateindex(mdp, s).
  • stage_observations(m::Union{MDP,POMDP}, stage::Int)

    • Creates (PO)MDP's observations for given stage.
  • stage_obsindex(m::Union{MDP,POMDP}, o::stage::Int)

    • Computes the index of the given observation in the corresponding stage.
  • ordered_stage_observations(w::FHWrapper, stage::Int)

    • Returns an AbstractVector of observations from given stage ordered according to stage_obsindex(w,o).

finitehorizonpomdps.jl's People

Contributors

github-actions[bot] avatar omastto1 avatar rejuvyesh avatar zsunberg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.