egttools.analytical.utils.get_pairwise_gradient_from_replicator¶
- get_pairwise_gradient_from_replicator(i, j, x, nb_strategies, payoffs, freq_array)[source]¶
Compute the gradient of selection between two strategies i and j using the replicator equation.
- Parameters:
i (
int) – Index of the invader strategy.j (
int) – Index of the resident strategy.x (
int) – Number of invader individuals in the population.nb_strategies (
int) – Total number of strategies.payoffs (
NDArray[double]) – Payoff matrix (assumed shape: [nb_strategies, nb_strategies]).freq_array (
NDArray[double]) – Current frequency of each strategy.
- Returns:
Gradient of selection between strategies i and j.
- Return type: