if (FALSE) {
# Solving the simple infinite-horizon Tiger problem with SARSOP
# You need to install package "sarsop"
data("Tiger")
Tiger
sol <- solve_SARSOP(model = Tiger)
sol
# look at solver output
sol$solver_output
# policy (value function (alpha vectors), optimal action and observation dependent transitions)
policy(sol)
# value function
plot_value_function(sol, ylim = c(0,20))
# plot the policy graph
plot_policy_graph(sol)
# reward of the optimal policy
reward(sol)
# Solve a bundled POMDP file. The timeout is set to 10 seconds.
file <- system.file("examples/shuttle_95.POMDP", package = "pomdp")
sol <- solve_SARSOP(file, parameter = list(timeout = 10))
sol
}
Run the code above in your browser using DataLab