Learn R Programming

OpenABMCovid19 (version 1.0.1)

Agent: R6Class Agent

Description

Class representing an Agent object for dictating policy through time and storing value function (that maps states of the model to actions).

See Simulation for examples.

Arguments

Methods

Public methods

Method new()

Usage

Agent$new(verbose = FALSE)

Arguments

verbose

Log verbosity.

Method start_simulation()

Initialize the Agent object for the start of a simulation/

Usage

Agent$start_simulation(state)

Arguments

state

Initial state.

Returns

An action.

Method step()

Method called at the start of each simulation

Usage

Agent$step(state)

Arguments

state

New state.

Returns

Should return an action (current an empty dict).