egttools.plotting.simplified

Simplified plotting functions

Functions

barycentric_to_xy_coordinates

Transforms barycentric into cartesian coordinates.

calculate_nb_states

Calculates the number of states (combinations) of the members of a group in a subgroup.

calculate_stability

Calculates the stability of the roots.

check_if_there_is_random_drift

Checks if there is random drift along the edge between two strategies in the simplex.

check_replicator_stability_pairwise_games

Calculates the stability of the roots assuming that they are from a system governed by the replicator equation (this function uses the Jacobian of the replicator equation in pairwise games to calculate the stability).

find_roots

Searches for the roots of the given differential equation.

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

Helper function to simplify the plotting of the moran dynamics in a 2 Simplex.

plot_pairwise_comparison_rule_dynamics_in_simplex_without_roots

Helper function to simplify the plotting of the moran dynamics in a 2 Simplex.

plot_replicator_dynamics_in_simplex

Helper function to simplify the plotting of the replicator dynamics in a 2 Simplex.

replicator_equation

Produces the discrete time derivative of the replicator dynamics

replicator_equation_n_player

Calculates the gradient of the replicator dynamics given the current population state.

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

Abstract class which must be implemented by any new game.

Matrix2PlayerGameHolder

Holder class for 2-player games for which the expected payoff between strategies has already been calculated.

MatrixNPlayerGameHolder

Holder class for N-player games for which the expected payoff between strategies has already been calculated.

PairwiseComparison

A class containing methods to study analytically the evolutionary dynamics using the Pairwise comparison rule.

Simplex2D

Plots a 2-dimensional simplex in a cartesian plane.