egttools.analytical.utils.check_if_there_is_random_drift

check_if_there_is_random_drift(payoff_matrix, population_size=None, group_size=2, beta=None, nb_points=10, atol=1e-07)[source]

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

Parameters
  • payoff_matrix (numpy.ndarray) – The square matrix of payoffs. If the game is pairwise (group_size = 2) then each entry represents the payoff of the row strategy vs the column strategy. If the group_size > 2, then each entry should be a function that will return the payoff of the row strategy in a group of size N with N-k members of the column strategy. If you only have a matrix where the columns represent all possible game states, then you can use the function egttools.utils.transform_payoffs_to_pairwise to get a matrix in the correct form.

  • population_size (Optional[int]) – The size of the population. If this value is not given, we assume that we calculate the dynamics in infinite populations using the replicator_equation.

  • group_size (int) – The size of the group. If you specify population size, you should also specify this value. By default we assume that the game is pairwise.

  • beta (Optional[float]) – The intensity of selection.If you specify population size, you should also specify this value.

  • nb_points (int) – Number of points for which to check the gradient. It is 10 by default.

  • atol (float) – Tolerance to consider a value zero

Returns

A list of tuples indicating the undirected edged where there should be random drift.

Return type

List[Tuple[int, int]]