write_pomdpx {sarsop}R Documentation

write pomdpx files

Description

A POMDPX file specifies a POMDP problem in terms of the transition, observation, and reward matrices, the discount factor, and the initial belief.

Usage

write_pomdpx(
  P,
  O,
  R,
  gamma,
  b = rep(1/dim(O)[1], dim(O)[1]),
  file = "input.pomdpx",
  digits = 12,
  digits2 = 12,
  format = "f"
)

Arguments

P

transition matrix

O

observation matrix

R

reward

gamma

discount factor

b

initial belief

file

pomdpx file to create

digits

precision to round to before normalizing. Leave at 4 since sarsop seems unable to do more?

digits2

precision to write solution to. Leave at 10, since normalizing requires additional precision

format

floating point format, because sarsop parser doesn't seem to know scientific notation

Examples

m <- fisheries_matrices()
f <- tempfile()
write_pomdpx(m$transition, m$observation, m$reward, 0.95,
             file = f)


[Package sarsop version 0.6.14 Index]