pomdpsol {sarsop} | R Documentation |
APPL wrappers
Description
Wrappers for the APPL executables. The pomdpsol
function solves a model
file and returns the path to the output policy file.
Usage
pomdpsol(
model,
output = tempfile(),
precision = 0.001,
timeout = NULL,
fast = FALSE,
randomization = FALSE,
memory = NULL,
improvementConstant = NULL,
timeInterval = NULL,
stdout = tempfile(),
stderr = tempfile(),
spinner = TRUE
)
polgraph(
model,
policy,
output = tempfile(),
max_depth = 3,
max_branches = 10,
min_prob = 0.001,
stdout = "",
spinner = TRUE
)
pomdpsim(
model,
policy,
output = tempfile(),
steps = 100,
simulations = 3,
stdout = "",
spinner = TRUE
)
pomdpeval(
model,
policy,
output = tempfile(),
steps = 100,
simulations = 3,
stdout = "",
spinner = TRUE
)
pomdpconvert(model, stdout = "", spinner = TRUE)
Arguments
model |
file/path to the |
output |
file/path of the output policy file. This is also returned by the function. |
precision |
targetPrecision. Set targetPrecision as the target precision in solution quality; run ends when target precision is reached. The target precision is 1e-3 by default. |
timeout |
Use timeLimit as the timeout in seconds. If running time exceeds the specified value, pomdpsol writes out a policy and terminates. There is no time limit by default. |
fast |
logical, default FALSE. use fast (but very picky) alternate parser for .pomdp files. |
randomization |
logical, default FALSE. Turn on randomization for the sampling algorithm. |
memory |
Use memoryLimit as the memory limit in MB. No memory limit by default. If memory usage exceeds the specified value, pomdpsol writes out a policy and terminates. Set the value to be less than physical memory to avoid swapping. |
improvementConstant |
Use improvementConstant as the trial improvement factor in the sampling algorithm. At the default of 0.5, a trial terminates at a belief when the gap between its upper and lower bound is 0.5 of the current precision at the initial belief. |
timeInterval |
Use timeInterval as the time interval between two consecutive write-out of policy files. If this is not specified, pomdpsol only writes out a policy file upon termination. |
stdout |
a filename where pomdp run statistics will be stored |
stderr |
currently ignored. |
spinner |
should we show a spinner while sarsop is running? |
policy |
file/path to the policy file |
max_depth |
the maximum horizon of the generated policy graph |
max_branches |
maximum number of branches to show in the policy graph |
min_prob |
the minimum probability threshold for a branch to be shown in the policy graph |
steps |
number of steps for each simulation run |
simulations |
as the number of simulation runs |
Examples
if(assert_has_appl()){
model <- system.file("models", "example.pomdp", package = "sarsop")
policy <- tempfile(fileext = ".policyx")
pomdpsol(model, output = policy, timeout = 1)
# Other tools
evaluation <- pomdpeval(model, policy, stdout = FALSE)
graph <- polgraph(model, policy, stdout = FALSE)
simulations <- pomdpsim(model, policy, stdout = FALSE)
}