Skip to content
JD edited this page Jan 18, 2022 · 1 revision

Grid

The grid is the container, where all the organisms are stored. It also holds a separate container for GridKeys (array indices), which allows for faster operation on the grid class. Most of the operations performed on the grid (e.g. shuffling the grid) will use the GridKeys instead of the organisms, because it's faster. If you want to access the organism, you can do so via the GridKey index (e.g. myGrid[index])

The grid, or its child classes of the grid to be more precise, takes care of creating and populates the groups.

It also contains some some helper methods to get random organisms or the min/max payoff.

At the moment you can use these two grid variants:

Clone this wiki locally