powered by
Initialize the transition, observation, and reward matrices given a transition function, reward function, and state space
fisheries_matrices( states = 0:20, actions = states, observed_states = states, reward_fn = function(x, a) pmin(x, a), f = ricker(1, 15), sigma_g = 0.1, sigma_m = 0.1, noise = c("rescaled-lognormal", "lognormal", "uniform", "normal") )
list of transition matrix, observation matrix, and reward matrix
sequence of possible states
sequence of possible actions
sequence of possible observations
function of x and a that gives reward for tacking action a when state is x
transition function of state x and action a.
half-width of uniform shock or equivalent variance for log-normal
distribution for noise, "lognormal" or "uniform"
assumes log-normally distributed observation errors and process errors
m <- fisheries_matrices()
Run the code above in your browser using DataLab