rl_arms_get_outcome | R Documentation |
This function defines the reinforcement delivery for an
individual arm, and is used internaly by RL Bandit Agents. With probability
prob
, it an arm will yield a reinforcement of magnitude
; with
probability 1 - prob
, an arm will yield a reinforcement of alternative
(default of zero).
rl_arms_get_outcome(arm_definitions, action, trial)
arm_definitions |
A list of arm definitions where each element contains
a data frame with columns 'probability', 'magnitude', 'alternative', and
'trial' describing, respectively, the |
action |
A numeric scalar representing which action was selected on a given trial. |
trial |
The trial in which an action was selected. |
A numeric reinforcement defined by magnitude
(with probability
prob
) or alternative
(with probability 1 - prob
).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.