egttools.plotting.simplified

Simplified plotting functions

Functions

barycentric_to_xy_coordinates

Transforms barycentric into cartesian coordinates.

calculate_nb_states

Calculates 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 2- or N-player matrix games.

replicator_equation

Compute the time derivative of the replicator dynamics for 2-player games.

replicator_equation_n_player

Computes the replicator dynamics gradient for N-player games.

vectorized_barycentric_to_xy_coordinates

Transform a tensor of barycentric coordinates to cartesian coordinates.

vectorized_replicator_equation

This function provides an easy way to calculate a matrix of gradients in a simplex in one go.

vectorized_replicator_equation_n_player

This function provides an easy way to calculate a matrix of gradients in a simplex in one go.

xy_to_barycentric_coordinates

Transforms cartesian into barycentric coordinates.

Classes

AbstractGame

Base class for all game-theoretic models in EGTtools.

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 model.

Simplex2D

Plots a 2-dimensional simplex in a cartesian plane.