egttools.behaviors.CRD.goal_based.AbstractCRDStrategy

class AbstractCRDStrategy(self: egttools.numerical.numerical_.behaviors.CRD.AbstractCRDStrategy)

Bases: pybind11_object

Abstract base class for strategies in collective-risk dilemma games.

Methods

get_action

Return the action chosen by the strategy.

type

Return the strategy type.

__init__(self: egttools.numerical.numerical_.behaviors.CRD.AbstractCRDStrategy) None
__new__(**kwargs)
get_action(self: egttools.numerical.numerical_.behaviors.CRD.AbstractCRDStrategy, time_step: SupportsInt | SupportsIndex, group_contributions_prev: SupportsInt | SupportsIndex) int

Return the action chosen by the strategy.

Parameters:
  • time_step (int) – Current round.

  • group_contributions_prev (int) – Sum of contributions of the other group members in the previous round.

Returns:

Action selected by the strategy.

Return type:

int

type(self: egttools.numerical.numerical_.behaviors.CRD.AbstractCRDStrategy) str

Return the strategy type.

__annotations__ = {}