Skip to content

PlayerPersonality

Samuel Gomes edited this page Jul 12, 2024 · 6 revisions

PlayerPersonality

PlayerPersonality is an abstract class that represents the inherent preference of a subject through their personality. Different personality models can be implemented as subclasses.

Constructor and Members

Constructor

PlayerPersonality(): void

Members

Name: expected type Default value Description
(auto,auxiliary) _max_difference_value: decimal 1.0 Used if the distance between personality profiles is needed. The maximum difference value between two personalities.

Functions

get_personality_string(): string {abstract}

Description

(abstract) Returns a textual representation of the personality profile.

get_pair_personality_diversity(other: PlayerPersonality): decimal {abstract}

Description

(abstract) Determines the difference between two personality profiles. In the concrete implementations, other type should match the caller and the returned value should be normalized: from 0 (no difference) to 1 (max difference).

get_team_personality_diversity(players: PlayerPersonality[]): decimal {abstract}

Description

(abstract) Calculates a group diversity value. In the concrete implementations, the type of each member of players should match the caller and the returned value should be normalized: from 0 (no difference) to 1 (max difference).

Clone this wiki locally