# Generates a random MDP problem
set.seed(0)
mdp_example_rand(2, 2)
mdp_example_rand(2, 2, FALSE)
mdp_example_rand(2, 2, TRUE)
mdp_example_rand(2, 2, FALSE, matrix(c(1,0,1,1),2,2))
# Generates a MDP for a simple forest management problem
MDP <- mdp_example_forest()
# Find an optimal policy
results <- mdp_policy_iteration(MDP$P, MDP$R, 0.9)
# Visualise the policy
results$policy
Run the code above in your browser using DataLab