egttools.behaviors.NormalForm.TwoActions.nfg_strategies.AbstractNFGStrategy

class AbstractNFGStrategy(self: egttools.numerical.numerical_.behaviors.NormalForm.AbstractNFGStrategy)

Bases: pybind11_object

Abstract base class for strategies in repeated two-action normal-form games.

Methods

get_action

Return the action chosen by the strategy.

is_stochastic

Return whether the strategy is stochastic.

type

Return the strategy type.

__init__(self: egttools.numerical.numerical_.behaviors.NormalForm.AbstractNFGStrategy) None
__new__(**kwargs)
get_action(self: egttools.numerical.numerical_.behaviors.NormalForm.AbstractNFGStrategy, time_step: SupportsInt | SupportsIndex, action_prev: SupportsInt | SupportsIndex) int

Return the action chosen by the strategy.

Parameters:
  • time_step (int) – Current round.

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

Returns:

Action selected by the strategy.

Return type:

int

is_stochastic(self: egttools.numerical.numerical_.behaviors.NormalForm.AbstractNFGStrategy) bool

Return whether the strategy is stochastic.

type(self: egttools.numerical.numerical_.behaviors.NormalForm.AbstractNFGStrategy) str

Return the strategy type.

__annotations__ = {}