rl_define_reinforcements_array: Define Reinforcements Array for Tracking Cues in RL Agent's...

rl_define_reinforcements_arrayR Documentation

Define Reinforcements Array for Tracking Cues in RL Agent's Environment

Description

Define Reinforcements Array for Tracking Cues in RL Agent's Environment

Usage

rl_define_reinforcements_array(reinforcement_input, num_episodes, num_trials)

Arguments

reinforcement_input

A list of reinforcements where each element contains a data frame with columns 'onset', 'offset', 'magnitude', and 'trial' describing, respectively, the episode number a reward presentation begins; the episode number the reward presentation ends; the magnitude of the reward; the trials the rewards occur on.

num_episodes

(numeric) The number of episodes per trial.

num_trials

(numeric) The number of trials to simulate.

Value

A three-dimensional array tacking what reinforcements are delivered in each episode across all simulated trials.

Examples


rl_define_reinforcements_array(
  list(
    one = data.frame(
      onset = 8,
      offset = 8,
      magnitude = 1,
      trial = 1:100
    )
  ),
  num_episodes = 10,
  num_trials = 100
)

jdtrat/rlsims documentation built on March 26, 2022, 6:17 p.m.