egttools.plotting.simplified

Simplified plotting functions.

Functions

barycentric_to_xy_coordinates

Transforms barycentric into cartesian coordinates.

calculate_nb_states

Calculate the number of possible states in a discrete simplex.

calculate_stability

Calculates the stability of the roots.

check_if_there_is_random_drift

Check for pairs of strategies that exhibit random drift based on replicator gradients.

check_replicator_stability_pairwise_games

Determine the stability of stationary points for the replicator equation in pairwise games.

find_roots

Search for the roots (stationary points) of the given gradient function on the unit simplex.

find_roots_in_discrete_barycentric_coordinates

Searches for the roots inside the simplex and returns them in barycentric coordinates.

plot_pairwise_comparison_rule_dynamics_in_simplex

Plot dynamics of a finite population using the pairwise comparison rule on a 2D simplex.

plot_pairwise_comparison_rule_dynamics_in_simplex_without_roots

Plot dynamics on the simplex under the pairwise comparison rule, without computing roots.

plot_replicator_dynamics_in_simplex

Plot the replicator dynamics on a 2D simplex for 3-strategy 2- or N-player games.

replicator_equation

Compute the replicator dynamics gradient for a two-player matrix game.

replicator_equation_n_player

Compute the replicator dynamics gradient for an N-player game defined by a payoff table.

vectorized_barycentric_to_xy_coordinates

Transform a tensor of barycentric coordinates to cartesian coordinates.

xy_to_barycentric_coordinates

Transforms cartesian into barycentric coordinates.

Classes

AbstractGame

Base class for all game-theoretic models in EGTtools.

AbstractReplicatorGame

Base class for games that define fitness in the infinite-population limit.

Matrix2PlayerGameHolder

Matrix-based 2-player game holder.

MatrixNPlayerGameHolder

Matrix-based N-player game holder.

NDArray

alias of ndarray[tuple[int, ...], dtype[_ScalarType_co]]

PairwiseComparison

Analytical pairwise-comparison process for finite populations.

Simplex2D

Plots a 2-dimensional simplex in a cartesian plane.