egttools.behaviors.CRD.moving_average.MovingAverageCRDStrategy¶
- class MovingAverageCRDStrategy(a0, aa, am, ab, group_size)[source]¶
Bases:
AbstractCRDStrategyA CRD strategy which adapts in function of a moving average of the contributions of the rest of the group.
- Parameters:
a0 (
int) – how much to contribute in the initial round.aa (
int) – how much to contribute when you have contributed above the average of the group in the previous round.am (
int) – how much to contribute when you have contributed equal to the average of the group in the previous round.ab (
int) – how much to contribute when you have contributed below the average of the group in the previous round.group_size (
int) – Size of the group.
Methods
Return the action chosen by the strategy.
Return the strategy type.
- classmethod __new__(*args, **kwargs)¶
- __init__(a0, aa, am, ab, group_size)[source]¶
A CRD strategy which adapts in function of a moving average of the contributions of the rest of the group.
- Parameters:
a0 (
int) – how much to contribute in the initial round.aa (
int) – how much to contribute when you have contributed above the average of the group in the previous round.am (
int) – how much to contribute when you have contributed equal to the average of the group in the previous round.ab (
int) – how much to contribute when you have contributed below the average of the group in the previous round.group_size (
int) – Size 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__ = {}¶