Skip to content

AnnealedPRSConfigsGen

Samuel Gomes edited this page Jul 15, 2021 · 2 revisions

ConfigsGenAlg

This class is a child of ConfigsGenAlg. It contains the procedure for the formation of group organizations which optimizes the state of the players, inspired by the Simulated Annealing local search. Sometimes, it acts like a PureRandomSearchConfigsGen, and sometimes it delivers a random configuration without performing any search. The frequency of solution randomness is decreased through time, through a temperature that starts with the value 1.0 and is to be decreased to 0.0 (the decay of the temperature per iteration is defined by the programmer).

Just like in PureRandomSearchConfigsGen, the optimization is naively performed per-iteration and minimal data is stored among iterations. This may entail sub-optimal convergence but it is a simple way to assure adaptation to dynamic environments. This algorithm may be more computationally efficient than the base PRS approach, as initially it may frequently return without performing any optimization.

Constructor and Attributes

Constructor

AnnealedPRSConfigsGen(playerModelBridge, interactionsProfileTemplate, regAlg, persEstAlg, temperatureDecay, numberOfConfigChoices, preferredNumberOfPlayersPerGroup, minNumberOfPlayersPerGroup, maxNumberOfPlayersPerGroup, qualityWeights)

Attributes

Name: expected type Default value Description
regAlg: RegressionAlg - The regression algorithm to be used in the adaptation iterations
persEstAlg: PersonalityEstAlg - The algorithm used to build players' personality estimates
temperatureDecay: int - The decay of the temperature in one iteration
numberOfConfigChoices: int 100 The number of configurations to generate, from where to choose the best one
qualityWeights: PlayerCharacteristics (ability: 0.5, engagement: 0.5) The importance given to each player characteristic when computing the quality of a configuration

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

Methods

calcQuality(state: [PlayerState](https://github.com/SamGomes/GIMME/wiki/PlayerState)): float

Description

(Auxiliary) Computes the quality of a player state, between 0 and 1. A higher value means better quality.

Method Overrides

init(): void

Description

Initializes the temperature to 1.0.

reset(temperature): void

Description

Resets the temperature to a value between 0.0 and 1.0. If temperature is not in this range, it is clamped.

organize(): int[][]

Clone this wiki locally