Civil Violence¶
Agents¶
-
class
whynot.simulators.civil_violence.Agent[source]¶ Covariates for a single agent in the simulation.
Examples
>>> # An agent with low risk aversion and high hardship >>> civil_violence.Agent(hardship=0.99, risk_aversion=0.01)
-
active_threshold= 0.1¶ Threshold above which agent starts to openly rebell
-
hardship= 0.5¶ How aggrieved is the agent by external circumstances.
-
legitimacy= 0.5¶ How legitimate does the agent perceive the current regime.
-
risk_aversion= 0.5¶ How likely the agent is to rebel for a fixed greviance level.
-
vision= 3¶ How many adjacent squares an agent sees and uses to determine probability of arrest.
-
Config¶
-
class
whynot.simulators.civil_violence.Config[source]¶ Metaparameters for a single run of the civil violence simulator.
-
arrest_prob_constant= 2.3¶ A fixed parameter to calibrate arrest likelihood.
-
cop_fraction= 0.05¶ What fraction of the agents are police
-
cop_vision= 5¶ How many adjacent squares a cop can see when determining who to arrest.
-
grid_height= 50¶ Vertical grid size
-
grid_width= 50¶ Horizontal grid size
-
prison_interaction= 0.1¶ How strongly other agent grievances affect each agent in prison.
-