data(Windy_gridworld)
Windy_gridworld
gridworld_matrix(Windy_gridworld)
gridworld_matrix(Windy_gridworld, what = "labels")
# The Goal is an absorbing state
which(absorbing_states(Windy_gridworld))
# visualize the transition graph
gridworld_plot_transition_graph(Windy_gridworld,
vertex.size = 10, vertex.label = NA)
# solve using value iteration
sol <- solve_MDP(Windy_gridworld)
sol
policy(sol)
gridworld_plot_policy(sol)
Run the code above in your browser using DataLab