Description Usage Value Examples
The referee is a special class of agent with no parameters, whose function runs after agents have completed their own functions in each time step. You can think of the referee as being the environment's agent. E.g. when simulating a game of soccer, the agents will be players and the environment holds values such as the score. The referee is needed to increment the score and to reset play after a team scores a goal.
Agents themselves could be given the referee's tasks but it's simpler to have a separate function that runs at the end of each time step, after all of the agents have completed their tasks.
The referee has access to the entire simulation object and can modify any part of it, including agents, the environment and the referee itself.
1 | referee()
|
A 'referee' S3 object
1 | new_referee <- referee()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.