egttools.behaviors.NormalForm.TwoActions.nfg_strategies.Detective¶
- class Detective[source]¶
Bases:
AbstractNFGStrategyA Detective player who tries to analyze the opponent.
This player will always play the same initial sequence of Cooperate, Defect, Cooperate, Cooperate. If the opponent defects during this initial sequence, then Defective will play TFT from the 5th round on. Otherwise, Detective will play always Defect.
Methods
Return the action chosen by the strategy.
Return whether the strategy is stochastic.
Return the strategy type.
- __init__()[source]¶
A Detective player who tries to analyze the opponent.
This player will always play the same initial sequence of Cooperate, Defect, Cooperate, Cooperate. If the opponent defects during this initial sequence, then Defective will play TFT from the 5th round on. Otherwise, Detective will play always Defect.
- __new__(**kwargs)¶
- get_action(time_step, action_prev)[source]¶
Return the action chosen by the strategy.
- Parameters:
- Returns:
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]¶
Return whether the strategy is stochastic.
- type(self: egttools.numerical.numerical_.behaviors.NormalForm.AbstractNFGStrategy) str[source]¶
Return the strategy type.
- __annotations__ = {}¶