forked from aaandrew152/dynamics_sim
-
Notifications
You must be signed in to change notification settings - Fork 13
Frequency Biased Imitation
anjalika-nande edited this page May 29, 2020
·
4 revisions
We have made it possible to add frequency biased imitation to any simulation in DyPy. See the white paper (link on the homepage of the wiki) for how this is incorporated into the code. The parameters of interest are,
-
bias_function
: This is a user defined function of the frequencies of the strategies. Defaults to Nakahashi's function with a=1. -
bias_strength
: This is the relative strength of individual versus conformist selection. 0<=bias_strength<=1 and default value is set to 0.0. -
bias_scale
: The strength of conformist transmission. This can be thought of as the payoffs associated with a coordination game. bias_scale >= 0 and default value is set to 0.0.
bias_function
has to be defined by the user in the get_expected_payoff
method of the PayoffMatrix
class in the payoff_matrix module. It is a function that determines the extent to which the frequency of a strategy influences the conformist bias.
bias_strength
and bias_scale
are Game
arguments that can be specified while defining the game. For example if we were defining a Prisoners' Dilemma game,
class PrisonersDilemma(SymmetricNPlayerGame):
DEFAULT_PARAMS = dict(R=3,S=0,T=5,P=1,bias_strength=0.2,bias_scale=2)
STRATEGY_LABELS = ('Cooperate', 'Defect')
EQUILIBRIA_LABELS=('Cooperation','Defection')
def __init__(self,R,S,T,P,bias_strength,bias_scale):
payoff_matrix = ((R,S),(T,P))
super(PD, self).__init__(payoff_matrix,1,bias_strength,bias_scale)
Since they are Game
arguments, they can also be varied using the methods in the VariedGame
class.