Skip to content

PlayerStatesDataFrame

Samuel Gomes edited this page Jul 3, 2024 · 2 revisions

PlayerStatesDataFrame

This class stores and manages the learning states of a subject. In particular, it uses a PlayerDataTrimAlg to choose what data to keep/discard when a new state is received.

Constructor

+ PlayerStatesDataFrame(interactionsProfileTemplate: InteractionsProfile,
                        trimAlg: PlayerDataTrimAlg,
                        states: PlayerState[] = []): void

Attributes

Name: expected type Default value Description
states: PlayerState[] [] Data structure that stores the past player states.
interactionsProfileTemplate: InteractionsProfile - The template for creating new interactions profiles.
trimAlg: PlayerDataTrimAlg - Reference to an algorithm to trim the entries in states.
(auto,auxiliary) flatProfiles: decimal[][] [] List of all stored profiles after being flattened.
(auto,auxiliary) flatAbilities: decimal[] [] List of all stored ability values.
(auto,auxiliary) flatEngagements: decimal[] [] List of all stored engagement values.

Methods

+ reset(): void

Description

Sets all attributes to their default values.

+ pushToDataFrame(playerState: PlayerState): void

Description

Adds a new playerState datapoint to the states and updates all auxiliary structures. The states are trimmed using trimAlg (see above).

+ getAllStates(): PlayerState[]

Description

Returns all stored datapoints.

+ getAllStatesFlattened(): dict{'profiles':decimal[][],'abilities':decimal[],'engagements':decimal[]}

Description

Returns all stored datapoints as a dictionary containing their flat representations.

+ getNumStates(): int

Description

Returns the number of stored datapoints (length of states).

Clone this wiki locally