create_referee_task: Create a task to be executed by agents

Description Usage Arguments Value Examples

View source: R/referee.R

Description

Agents executing a task have access to three objects: * self is the executing agent's S3 object in the current time step * population holds parameters for the entire agent population at time t-1 * environment holds parameters for the environment at time t-1

population and environment return parameters for the previous time step, to allow all agents to execute their tasks using the same parameter set, before time moves to the next 't' and the population and environment are updated.

Usage

1

Arguments

f

code to be run by agents at each time step.

Value

A function to be run during simulations

Examples

1
2
3
agent_task <- create_agent_task({
  print(self$id)
})

neilcharles/agentSim documentation built on Oct. 31, 2020, 11:23 a.m.