View source: R/read_write_POMDP.R
write_POMDP | R Documentation |
Reads and write a POMDP file suitable for the pomdp-solve
program.
write_POMDP(x, file, digits = 7, labels = FALSE)
read_POMDP(file, parse = TRUE, normalize = FALSE, verbose = FALSE)
x |
an object of class POMDP. |
file |
a file name. |
digits |
precision for writing numbers (digits after the decimal point). |
labels |
logical; write original labels or use index numbers? Labels are
restricted to |
parse |
logical; try to parse the model maotrices. Solvers still work with unparsed matrices, but helpers for simulation are not available. |
normalize |
logical; should the description be normalized for faster access (see |
verbose |
logical; report parsed lines. This is useful for debugging a POMDP file. |
POMDP objects read from a POMDP file have an extra element called problem
which contains the original
POMDP specification. The original specification is directly used by external solvers. In addition, the file
is parsed using an experimental POMDP file parser. The parsed information can be used with auxiliary functions
in this package that use fields like the transition matrix, the observation matrix and the reward structure.
The range of useful rewards is restricted by the solver. Here the values are restricted to the range
[-1e10, 1e10]
.
Unavailable actions have a reward of -Inf
which is translated to -2 times the maximum
absolute reward value used in the model.
Notes: The parser for POMDP files is experimental. Please report problems here: https://github.com/mhahsler/pomdp/issues.
read_POMDP()
returns a POMDP object.
Hossein Kamalzadeh, Michael Hahsler
POMDP solver website: https://www.pomdp.org
Other POMDP:
MDP2POMDP
,
POMDP()
,
accessors
,
actions()
,
add_policy()
,
plot_belief_space()
,
projection()
,
reachable_and_absorbing
,
regret()
,
sample_belief_space()
,
simulate_POMDP()
,
solve_POMDP()
,
solve_SARSOP()
,
transition_graph()
,
update_belief()
,
value_function()
data(Tiger)
## show the POMDP file that would be written.
write_POMDP(Tiger, file = stdout())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.