R package pomdpSolve - Interface to ‘pomdp-solve’ for Partially Observable Markov Decision Processes
Maintainer: Michael Hahsler
Provides pomdp-solve (Cassandra, 2015) to solve POMDPs using a variety of algorithms. A convenient interface is provided in package pomdp.
To cite package ‘pomdpSolve’ in publications use:
Hahsler M, Cassandra AR (2025). “Pomdp: A computational infrastructure for partially observable Markov decision processes.” The R Journal, 16(2), 1-18. ISSN 2073-4859. doi:10.32614/RJ-2024-021 https://doi.org/10.32614/RJ-2024-021.
@Article{,
title = {Pomdp: A computational infrastructure for partially observable Markov decision processes},
author = {Michael Hahsler and Anthony R. Cassandra},
year = {2025},
journal = {The R Journal},
volume = {16},
number = {2},
pages = {1--18},
doi = {10.32614/RJ-2024-021},
issn = {2073-4859},
}Installation
Stable CRAN version: Install from within R with
install.packages("pomdpSolve")Current development version: Install from r-universe.
install.packages("pomdpSolve",
repos = c("https://mhahsler.r-universe.dev",
"https://cloud.r-project.org/"))Usage
Solve a POMDP file that ships with this package in a temporary directory and read the solution.
library(pomdpSolve)
old_wd <- setwd(tempdir())
file.copy(system.file("tiger.aaai.POMDP", package = "pomdpSolve"), "./tiger.aaai.POMDP")
pomdp_solve("tiger.aaai.POMDP", options = list(method = "grid"), verbose = FALSE)
dir()
read_alpha_file("tiger.aaai-0.alpha")
read_pg_file("tiger.aaai-0.pg")
setwd(old_wd)The value function is defined by a set of alpha vectors represented as rows in a matrix with components. Each alpha vector corresponds to a node with the same row number in the policy graph. The policy graph represents the policy in the form of a data.frame with one row for each node. Nodes have a node id , the action defined by the policy and then for each observation the id (row) of the policy graph node to transition to.
A detailed description of the available solver options can be found here.
References
- Cassandra, A. (2015). pomdp-solve: POMDP Solver Software, http://www.pomdp.org.