Axelrod class documentation

Authors

Generated by pauljohn

Software documentation for the Axelrod class

Axelrod : Citizen

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 summary

adjustOpinionAgainst: 

- (id) adjustOpinionAgainst: (id)other;

Axelrod 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.


bareLispOutDeep: 

- (void) bareLispOutDeep: (id)stream;

Subclasses need to archive variables in here, but we dont want to create an Axelrod class.


lispOutDeep: 

- (void) lispOutDeep: (id)stream;

Save state of agent


selectADiscussantInPosition: 

- (id) selectADiscussantInPosition: (Position*)position;

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.