This is a Python implementation of the Agent-Based Model (ABM) described in:
The model simulates how unpopular norms can dominate a society even when the vast majority of individuals privately reject them. It demonstrates the "illusion of consensus" where agents, driven by a fear of appearing disloyal, not only comply with a rule they hate but also aggressively enforce it on their neighbors. This phenomenon creates a "trap" of False Enforcement, where the loudest defenders of a norm are often its secret opponents.
The model tracks three key metrics:
- Compliance: The fraction of agents publicly obeying the norm.
- Enforcement: The fraction of agents punishing deviants.
- False Enforcement: The fraction of agents who privately hate the norm but enforce it anyway to signal sincerity.
pip install mesa matplotlib solarasolara run app.py