Skip to content

World Class

JD edited this page Jan 18, 2022 · 1 revision

World Class

The world class contains the main logic loop used in a experiment. It contains the grid of players, basic run time measurement functionality, the selected MatchupGenerator, PayOffCalculator, Archiver, Optimizer and the LOD. All of these can be choosen and adjusted with the configuration values.

Init

The Init function is called once in a World object lifecycle. It takes a Config class object to request all needed parameters from, that object is used once in this step and discarded after the parameters are saved in the corresponding classes.

Tick

The Tick function is called once for every round of public goods games to play. A World object will call all the logic stored in the previously described classes that implement it.

Fini

The Fini function is called a the end of a World object lifecycle. It executes all logic that needs to happen at the end of all experiments, like archiving certain data and deleting Organisms.