homogeneous_pgg_fitness_function

ludics.fitness_functions.homogeneous_pgg_fitness_function(state, alpha, r, **kwargs)

Calculates each player's payoff in a homogeneous public goods game in a given state

Parameters:

  • state: numpy.array - the state of each player's action type
  • alpha: float - the amount that each player in the game contributes
  • r: float - the ratio by which the contributions are multiplied

Returns:

  • numpy.array: each player's fitness in the state when playing a homogeneous public goods game