egttools.behaviors.NormalForm.TwoActions.nfg_strategies.EpsilonGRIM¶
- class EpsilonGRIM(p, epsilon)[source]¶
Bases:
AbstractNFGStrategy
A GRIM player with randomized first action and probability of making mistakes.
This player acts exactly as GRIM (cooperates until the opponent defects), however in the first round it will cooperate with probability :param p and in the subsequent rounds it has a probability :param epsilon of making a mistake and changing its action.
- Parameters
Methods
Returns an action in function of time_step round and the previous action action_prev of the opponent.
Property indicating if the strategy is stochastic.
Returns a string indicating the Strategy Type.
- __init__(p, epsilon)[source]¶
A GRIM player with randomized first action and probability of making mistakes.
This player acts exactly as GRIM (cooperates until the opponent defects), however in the first round it will cooperate with probability :param p and in the subsequent rounds it has a probability :param epsilon of making a mistake and changing its action.
- __new__(**kwargs)¶
- get_action(time_step, action_prev)[source]¶
Returns an action in function of time_step round and the previous action action_prev of the opponent.
- Parameters
- Returns
The action selected by the strategy.
- Return type
See also
egttools.behaviors.NormalForm.TwoActions.Cooperator
,egttools.behaviors.NormalForm.TwoActions.Defector
,egttools.behaviors.NormalForm.TwoActions.Random
,egttools.behaviors.NormalForm.TwoActions.TFT
,egttools.behaviors.NormalForm.TwoActions.SuspiciousTFT
,egttools.behaviors.NormalForm.TwoActions.GenerousTFT
,egttools.behaviors.NormalForm.TwoActions.GradualTFT
,egttools.behaviors.NormalForm.TwoActions.ImperfectTFT
,egttools.behaviors.NormalForm.TwoActions.TFTT
,egttools.behaviors.NormalForm.TwoActions.TTFT
,egttools.behaviors.NormalForm.TwoActions.GRIM
,egttools.behaviors.NormalForm.TwoActions.Pavlov
- is_stochastic(self: egttools.numerical.numerical.behaviors.NormalForm.AbstractNFGStrategy) bool [source]¶
Property indicating if the strategy is stochastic.
- type(self: egttools.numerical.numerical.behaviors.NormalForm.AbstractNFGStrategy) str [source]¶
Returns a string indicating the Strategy Type.