egttools.behaviors.NormalForm.TwoActions.GenerousTFT¶
- class GenerousTFT(self: egttools.numerical.numerical_.behaviors.NormalForm.TwoActions.GenerousTFT, R: SupportsFloat | SupportsIndex, P: SupportsFloat | SupportsIndex, T: SupportsFloat | SupportsIndex, S: SupportsFloat | SupportsIndex)¶
Bases:
AbstractNFGStrategyGenerous Tit for Tat.
Construct a Generous Tit for Tat strategy.
Following a defection, the strategy cooperates with probability
p(R, P, T, S) = min(1 - (T - R) / (R - S), (R - P) / (T - P))
where R, P, T, and S are the reward, punishment, temptation, and sucker’s payoff.
- Parameters:
Methods
Return the action chosen by the strategy.
Return whether the strategy is stochastic.
Return the strategy type.
- __init__(self: egttools.numerical.numerical_.behaviors.NormalForm.TwoActions.GenerousTFT, R: SupportsFloat | SupportsIndex, P: SupportsFloat | SupportsIndex, T: SupportsFloat | SupportsIndex, S: SupportsFloat | SupportsIndex) None¶
Construct a Generous Tit for Tat strategy.
Following a defection, the strategy cooperates with probability
p(R, P, T, S) = min(1 - (T - R) / (R - S), (R - P) / (T - P))
where R, P, T, and S are the reward, punishment, temptation, and sucker’s payoff.
- __new__(**kwargs)¶
- get_action(self: egttools.numerical.numerical_.behaviors.NormalForm.TwoActions.GenerousTFT, time_step: SupportsInt | SupportsIndex, action_prev: SupportsInt | SupportsIndex) int¶
Return the action chosen by the strategy.
- is_stochastic(self: egttools.numerical.numerical_.behaviors.NormalForm.TwoActions.GenerousTFT) bool¶
Return whether the strategy is stochastic.
- type(self: egttools.numerical.numerical_.behaviors.NormalForm.TwoActions.GenerousTFT) str¶
Return the strategy type.
- __annotations__ = {}¶