Skip to content

QualitySortPlayerDataTrimAlg

Samuel Gomes edited this page Jul 4, 2024 · 5 revisions

QualitySortPlayerDataTrimAlg

This class is a child of PlayerDataTrimAlg that trims a list of player states based on their expressed performance. It supports a mixed age-quality approach where the residue between two phases is discarded first (this approach is informed by the stateType in PlayerState). GIMME can benefit from this mixed approach when bootstrapping the system, because simulated data needs to be discarded as real data is added.

Constructor and Attributes

Constructor

+ QualitySortGridTrimAlg(maxNumModelElements: int, qualityWeights: PlayerCharacteristics = {ability = 0.5, engagement = 0.5}, accStateResidue: bool =  False): void

Attributes

Name: expected type Default value Description
maxNumModelElements: int - The maximum number of states in the trimmed list.
qualityWeights: PlayerCharacteristics PlayerCharacteristics(ability = 0.5, engagement = 0.5)) These characteristics are used when calculating a state quality.
accStateResidue False Informs the algorithm if what is stored currently is considered residue.

Methods

+ considerStateResidue(accStateResidue: bool): void

Description

Sets the accStateResidue flag.

- qSort(elem: PlayerState): decimal

Description

Comparer to sort a list by quality.

- calcQuality(state: PlayerState): decimal

Description

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

Overrides trimmedList(pastModelIncs: PlayerState[]): PlayerState[] (see PlayerDataTrimAlg).

Clone this wiki locally