- Declared in:
- Axelrod.h
Because a primary priority of this project is to replicate the culture model of Robert Axelrod, the Axelrod class is a subclass of Citizen that implements his model.
Method summaryAxelrod method: If onlySelfAdjusts=1, then find a feature on which agents disagree and copy that from the other. If we are already identical, do nothing. This can be customized by setting onlySelfAdjusts=0, and then "onlyOneAdjusts=1" will randomly choose either agent to change one feature. If onlySelfAdjusts=0 and onlyOneAdjusts=0, then both can change to copy what the other used to think.
Subclasses need to archive variables in here, but we dont want to create an Axelrod class.
Save state of agent
The assumptions might be described bluntly: Tell a spot in the grid to grab a neighboring agent, and with probability equal to their similarity, interact with it. With probability "parochialism", randomly chooses a discussant from within current cell. Otherwise, with equal likelihood choose a neighbor. Then, with probability equal to agent's similarity with the other, choose that person for interaction. Otherwise, don't interact with anyone.