egttools.numerical.numerical.replicator_equation

replicator_equation(frequencies: numpy.ndarray[numpy.float64[m, 1]], payoff_matrix: numpy.ndarray[numpy.float64[m, n]]) numpy.ndarray[numpy.float64[m, 1]]

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

Parameters
  • frequencies (numpy.ndarray) – Vector of frequencies of each strategy in the population (it must have shape=(nb_strategies,)

  • payoff_matrix (numpy.ndarray) – Square matrix containing the payoff of each row strategy against each column strategy

Returns

A vector with the gradient for each strategy. The vector has shape (nb_strategies,)

Return type

numpy.ndarray