Skip to content

PlayerStatesDataFrame

Samuel Gomes edited this page Jul 12, 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 and Members

Constructor

PlayerStatesDataFrame(interactions_profile_template: InteractionsProfile,
                        trim_alg: PlayerDataTrimAlg,
                        states: PlayerState[] = []): void

Members

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

Functions

reset(): void

Description

Sets all attributes to their default values.

push_to_data_frame(player_state: PlayerState): void

Description

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

get_all_states(): PlayerState[]

Description

Returns all stored datapoints.

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

Description

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

get_num_states(): int

Description

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

Clone this wiki locally