egttools.analytical.utils.get_pairwise_gradient_from_replicator

get_pairwise_gradient_from_replicator(i, j, x, nb_strategies, payoffs, freq_array=None)[source]

Calculate the gradient for strategy/type i at the edges of the simplex (when there are only two strategies in the population i and j).

Parameters
  • i (int) – index of the strategy whose gradient we wish to calculate

  • j (int) – index of the other strategy present in the population

  • x (float) – frequency of i type

  • nb_strategies (int) – total number of strategies in the population

  • payoffs (numpy.ndarray) – payoff matrix that defines the expected payoff of any give strategy against each other

  • freq_array (Optional[numpy.ndarray]) – optional vector to store the frequencies of each strategy in the population

Returns

The gradient of strategy i.

Return type

float