egttools.behaviors.CRD.TimeBasedCRDStrategy¶
- class TimeBasedCRDStrategy(actions_per_round)[source]¶
Bases:
AbstractCRDStrategyA CRD strategy which adapts in function of a moving average of the contributions of the rest of the group.
- Parameters:
actions_per_round (
List[int]) – Defines the action which this strategy will play in every round. If you change the number of rounds of the game, you should redefine this list, otherwise there will be an exception!!
Methods
Return the action chosen by the strategy.
Return the strategy type.
- classmethod __new__(*args, **kwargs)¶
- __init__(actions_per_round)[source]¶
A CRD strategy which adapts in function of a moving average of the contributions of the rest of the group.
- get_action(self: egttools.numerical.numerical_.behaviors.CRD.AbstractCRDStrategy, time_step: SupportsInt | SupportsIndex, group_contributions_prev: SupportsInt | SupportsIndex) int[source]¶
Return the action chosen by the strategy.
- type(self: egttools.numerical.numerical_.behaviors.CRD.AbstractCRDStrategy) str[source]¶
Return the strategy type.
- __annotations__ = {}¶