Skip to content

EvolutionaryConfigsGenAlg

Samuel Gomes edited this page Mar 31, 2020 · 12 revisions

ConfigsGenAlg

This class is a child of ConfigsGenAlg. It uses an evolutionary algorithm to optimize the generation of group configurations. Note: still in development

Constructor and Attributes

Constructor

EvolutionaryConfigsGenAlg(numberOfConfigChoices, minNumberOfPlayersPerGroup, maxNumberOfPlayersPerGroup, preferredNumberOfPlayersPerGroup, fitnessWeights, qualityWeights: PlayerState, regAlg: RegressionAlg, numMutations: int, numFitSurvivors: int, probOfMutation: float)

Attributes

Name: expected type Default value Description
regAlg: RegressionAlg - The regression algorithm used to predict new states from the existing ones
numberOfConfigChoices: int 100 The number of configurations to generate, from where to choose the best one.
fitnessWeights: PlayerCharacteristics PlayerCharacteristics(ability=0.5, engagement=0.5) Weights to consider when calculating the quality of predicted group states (same function as qualityWeights in other classes)
numMutations: int 4 The number of allowed mutations whenever the mutation operator is selected
probOfMutation: float 0.1 The probability of selecting the mutation operator
numFitSurvivors: int ⌈numberOfConfigChoices/2⌉ The number of allowed survivors between iterations

(No more additional attributes besides the ones from the base class ConfigsGenAlg )

Methods

initPopulation(): void

Description

Internal method used to initialize the population (create random group configurations and profiles).

fitnessSort(): void

Description

Internal method used to sort the individuals of the population (group configurations and their profiles).

(No more additional methods besides the ones from the base class ConfigsGenAlg )

Clone this wiki locally