egttools.analytical.sed_analytical

This python module contains the necessary functions to calculate analytically the evolutionary dynamics in Infinite and Finite populations on 2-player games.

Functions

calculate_nb_states

Calculates the number of possible states in a discrete simplex.

calculate_state

Converts a discrete population configuration into a unique index.

eig

Solve an ordinary or generalized eigenvalue problem of a square matrix.

replicator_equation

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

replicator_equation_n_player

Compute the replicator dynamics for N-player games.

sample_simplex

Converts a state index into a group composition vector.

warn

Issue a warning, or maybe ignore it or raise an exception.

Classes

StochDynamics

A class containing methods to calculate the stochastic evolutionary dynamics of a population.

csr_matrix

Compressed Sparse Row matrix.

lil_matrix

Row-based LIst of Lists sparse matrix.

permutations

Return successive r-length permutations of elements in the iterable.