
Class for risk-sensitive foraging environments
rsenvironment.Rd
Class for risk-sensitive foraging environments
Usage
rsenvironment(
budget,
...,
n.trials,
initial.state,
terminal.fitness = function(state, budget) { as.numeric(state >= budget) }
)
Arguments
- budget
Numeric, minimum requirement.
- ...
Numeric matrix (n x 2) with probabilities in column one and outcomes in columnn 2.
- n.trials
Numeric, number of trials.
- initial.state
Numeric, starting state.
- terminal.fitness
Function that specifies the terminal reward (what you get at the end of n.trials), defaults to "get zero if below budget and 1 otherwise". See details.