egttools.behaviors.NormalForm.TwoActions.ImperfectTFT

class ImperfectTFT(self: egttools.numerical.numerical.behaviors.NormalForm.TwoActions.ImperfectTFT, error_probability: float)

Bases: AbstractNFGStrategy

Imitates opponent as in TFT, but makes mistakes with :param error_probability.

Methods

get_action

Returns an action in function of time_step round and the previous action action_prev of the opponent.

is_stochastic

Indicates whether the strategy is stochastic.

type

Returns a string indicating the Strategy Type.

__init__(self: egttools.numerical.numerical.behaviors.NormalForm.TwoActions.ImperfectTFT, error_probability: float) None

Imitates opponent as in TFT, but makes mistakes with :param error_probability.

__new__(**kwargs)
get_action(self: egttools.numerical.numerical.behaviors.NormalForm.TwoActions.ImperfectTFT, 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
  • time_step (int) – Current round.

  • action_prev (int) – Previous action of the opponent.

Returns

The action selected by the strategy.

Return type

int

is_stochastic(self: egttools.numerical.numerical.behaviors.NormalForm.TwoActions.ImperfectTFT) bool

Indicates whether the strategy is stochastic.

type(self: egttools.numerical.numerical.behaviors.NormalForm.TwoActions.ImperfectTFT) str

Returns a string indicating the Strategy Type.