Wrappers for the APPL executables. The pomdpsol function solves a model file and returns the path to the output policy file.

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 pomdp model file

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

model <- system.file("models/example.pomdp", package = "sarsop") policy <- tempfile() pomdpsol(model, output = policy, timeout = 1)
#> $load_time_sec #> [1] 0.21 #> #> $init_time_sec #> [1] 1.54 #> #> $run_time_sec #> [1] 1.56 #> #> $final_precision #> [1] 54.1782 #> #> $end_condition #> [1] " Preset timeout reached" #>
# Other tools evaluation <- pomdpeval(model, policy, stdout = FALSE) graph <- polgraph(model, policy, stdout = FALSE) simulations <- pomdpsim(model, policy, stdout = FALSE)