public_goods_game_fitness_function
ludics.fitness_functions.public_goods_game_fitness_function(state, r, alpha, **kwargs)
Calculates each player's payoff in a public goods game with heterogeneous contributions and returns in a given state
Parameters:
state: numpy.array - the state of each player's action typer: float or numpy.array - the ratio by which the contributions are multiplied. Heterogeneous if provided a float, heterogeneous if passed a numpy.arraycontribution_vector: float or numpy.array - the amount that each player contributes. Heterogeneous if provided a float, heterogeneous if passed a numpy.array
Returns:
- numpy.array: each player's fitness in the state when playing a public goods game with heterogeneous contributions and returns