egttools.analytical.sed_analytical.replicator_equation_n_player¶
- replicator_equation_n_player(x, payoffs, group_size)[source]¶
Compute the replicator dynamics for N-player games.
In N-player games, fitness is computed as the expected payoff over all possible group configurations of co-players. This function computes the discrete time gradient of strategy frequencies under this setting.
- Parameters:
x (ndarray of shape (n,)) – Current frequency distribution over n strategies.
payoffs (ndarray of shape (n, m)) – Payoff matrix where each row represents a strategy, and each column a group configuration. Entry [i, j] gives the expected payoff of strategy i in group configuration j.
group_size (int) – Number of individuals in each interacting group.
- Returns:
Time derivative (gradient) of strategy frequencies under replicator dynamics.
- Return type:
ndarray of shape (n,)