egttools.behaviors.NormalForm.TwoActions.ActionInertia¶
- class ActionInertia(self: egttools.numerical.numerical.behaviors.NormalForm.TwoActions.ActionInertia, epsilon: float, p: float)¶
Bases:
AbstractNFGStrategyAlways repeats the same action, but explores a different action with probability :param epsilon.
In the first round it will cooperate with probability :param p.
- Parameters
epsilon (double) – Probability of changing action.
p (double) – Probability of cooperation in the first round
See also
egttools.games.AbstractGame,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.TFTT,egttools.behaviors.NormalForm.TwoActions.GRIMMethods
Returns an action in function of time_step round and the previous action action_prev of the opponent.
Indicates whether the strategy is stochastic.
Returns a string indicating the Strategy Type.
- __init__(self: egttools.numerical.numerical.behaviors.NormalForm.TwoActions.ActionInertia, epsilon: float, p: float) None¶
Always repeats the same action, but explores a different action with probability :param epsilon.
In the first round it will cooperate with probability :param p.
- Parameters
epsilon (double) – Probability of changing action.
p (double) – Probability of cooperation in the first round
See also
egttools.games.AbstractGame,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.TFTT,egttools.behaviors.NormalForm.TwoActions.GRIM
- __new__(**kwargs)¶
- get_action(self: egttools.numerical.numerical.behaviors.NormalForm.TwoActions.ActionInertia, time_step: int, action_prev: int) int¶
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.games.AbstractGame,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.TFTT,egttools.behaviors.NormalForm.TwoActions.GRIM
- is_stochastic(self: egttools.numerical.numerical.behaviors.NormalForm.TwoActions.ActionInertia) bool¶
Indicates whether the strategy is stochastic.
- type(self: egttools.numerical.numerical.behaviors.NormalForm.TwoActions.ActionInertia) str¶
Returns a string indicating the Strategy Type.