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 problem specified as a POMDP file. The timeout is set to 10 seconds.
sol <- solve_SARSOP("http://www.pomdp.org/examples/cheese.95.POMDP", parameter = list(timeout = 10))
sol
}
Run the code above in your browser using DataLab