egttools.games.OneShotCRDNetworkGame¶
- class OneShotCRDNetworkGame(self: egttools.numerical.numerical_.games.OneShotCRDNetworkGame, endowment: SupportsFloat | SupportsIndex, cost: SupportsFloat | SupportsIndex, risk: SupportsFloat | SupportsIndex, min_nb_cooperators: SupportsInt | SupportsIndex)¶
Bases:
AbstractSpatialGameOne-shot collective risk dilemma in networks.
- Parameters:
Methods
Computes the fitness of a strategy in a local neighborhood.
- __init__(self: egttools.numerical.numerical_.games.OneShotCRDNetworkGame, endowment: SupportsFloat | SupportsIndex, cost: SupportsFloat | SupportsIndex, risk: SupportsFloat | SupportsIndex, min_nb_cooperators: SupportsInt | SupportsIndex) None¶
One-shot collective risk dilemma in networks.
- __new__(**kwargs)¶
- __str__(self: egttools.numerical.numerical_.games.OneShotCRDNetworkGame) str¶
- calculate_fitness(self: egttools.numerical.numerical_.games.OneShotCRDNetworkGame, strategy_index: SupportsInt | SupportsIndex, state: Annotated[numpy.typing.ArrayLike, numpy.uint64, '[m, 1]']) float¶
Computes the fitness of a strategy in a local neighborhood.
- Parameters:
strategy_index (int) – The focal strategy being evaluated.
state (numpy.ndarray) – Vector representing the number of neighbors using each strategy.
- Returns:
The fitness of the strategy given the local state.
- Return type:
- endowment(self: egttools.numerical.numerical_.games.OneShotCRDNetworkGame) float¶
- min_nb_cooperators(self: egttools.numerical.numerical_.games.OneShotCRDNetworkGame) int¶
- nb_strategies(self: egttools.numerical.numerical_.games.OneShotCRDNetworkGame) int¶
- __annotations__ = {}¶