Description Usage Arguments Value Examples

sim_plus

1 2 |

`models` |
a list of lists, each of which gives the transition matrix, observation matrix and reward matrix for the model considered |

`discount` |
discount rate |

`model_prior` |
Prior belief assigned to each model. uniform by default. |

`state_prior` |
Prior belief that system is in state x_i and model m_i |

`x0` |
starting state of the system |

`a0` |
initial action (used to make the first observation, only relevant if observation depends on action) |

`Tmax` |
number of time steps to simulate |

`true_model` |
a list of the transition matrix, observation matrix, and reward matrix used to simulate draws. |

`alphas` |
the alpha vectors for each model, as provided from |

`model_names` |
vector of identifying names for each model. If none are provided, model posterior columns will be named V1, V2, etc. |

`...` |
additional options to sarsop::sarsop, if alphas are not provided |

a list with elements
(1) `df`

a data.frame with the time, state, observation, action, and value at each timestep,
(2) `model_posterior`

, a data.frame of Tmax rows by n_models columns giving the evolution of the belief over models, and
(3) `state_posterior`

, a data.frame of Tmax rows by n_states columns giving the evolution of the belief over states

1 2 3 4 5 6 7 8 | ```
## Not run:
source(system.file("examples/K_models.R", package="pomdpplus"))
alphas <- sarsop_plus(models, discount, precision = .1)
out <- sim_plus(models = models, discount = discount,
x0 = 6, a0 = 1, Tmax = 10,
true_model = models[[2]], alphas = alphas)
## End(Not run)
``` |

boettiger-lab/pomdpplus documentation built on Jan. 29, 2018, 3:59 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.