Skip to content

ConfigsGenAlg

Samuel Gomes edited this page Dec 2, 2019 · 23 revisions

ConfigsGenAlg

ConfigsGenAlg is an abstract base class for the group organization algorithms. These algorithms are usually called coalition structure generation algorithms. GIMME implements a few of them, such as a random generation, one which does not save any information between iterations, a genetic driven approach, etc...

Constructor and Attributes

Constructor

ConfigsGenAlg(numberOfConfigChoices, minNumberOfPlayersPerGroup, maxNumberOfPlayersPerGroup, preferredNumberOfPlayersPerGroup, fitnessWeights, regAlg)

Attributes

Name: expected type Default value Description
playerModelBridge: PlayerModelBridge - The connector for the players data model
numberOfConfigChoices: int 100 The connector for the tasks data model
minNumberOfPlayersPerGroup: int 2 The minimum group size to consider
maxNumberOfPlayersPerGroup: int 5 The maximum group size to consider
preferredNumberOfPlayersPerGroup: int None A preferred group size to consider. When filled, the configurations will follow a fixed group size (with the few smaller groups containing the remaining players)

| configSizeFreqs: int[] | - | The number of times each configuration size was generated (for statistic purposes) | | groupSizeFreqs: int[] | - | The number of times each group size was generated (for statistic purposes) |

Methods

reset(): void

Description

Abstract method used to reset the configuration algorithm if data is stored between iterations. Nothing is done otherwise.

organize(): int[][]

Description

Actually performs the group organization and returns a group configuration (or coalition structure).

updateMetrics( generatedConfig: int[][] ) : void

Description

Updates groupSizeFreqs and configSizeFreqs.

Name: expected type Default value Description
generatedConfig: int[][] - The generated group organization

Example

configsGen = GIMMEConfigsGen(numberOfConfigChoices=50, preferredNumberOfPlayersPerGroup = 5, PlayerCharacteristics(ability=0.9, engagement=0.1))

configsGen.organize(playerModelBridge)

Clone this wiki locally