|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--uchicago.src.sim.engine.SimModelImpl
|
+--uchicago.src.sim.enn.EnnBase
|
+--uchicago.src.sim.enn.EnnModel
A partial implementation of Randal Picker's Endogenous Neighborhood game as described in his as yet unpublished "Endogenous Neighborhoods and Norms." This simulation extends prior work by Randal Picker. See "Simple Games in a Complex World: A Generative Approach to the Adoption of Norms", 64 University of Chicago Law Review 1225 (1997). Thanks to Randal Picker for allowing us to include this with Repast. Here agent's play a coordination game with their neighbors and receive a payoff. After all agents have have played the game, then each agents determines whether the current location and strategy meet their aspiration, changing strategies and moving if necesary. As described in the paper, satisfied agents can play a strategy of "strategy upgrade" or "pure aspiration". Here only strategy upgrade is implemented. Playing this strategy means that a content agent finds the best average strategy of all its neighbors and plays this the next turn. Unsatisfied agents can have a strategy of either move and change or change first. A strategy of move and changes means that an agent moves a random distance in a random direction and then changes its stratgey to the best average strategy of all its neighbors. Change first means that an agent changes its strategy and then if still unsatisfied, changes to a move and change strategy the next turn.
These values can be changed as initial parameters before a run
.
PURE_ASPIRATION = 0
STRATEGY_UPGRADE = 1
CHANGE_FIRST = 2
MOVE_AND_CHANGE = 3
See the playGame method of EnnAgent for the details of the strategies.
See SugarModel.java for more on the general structure of a simulation model
file.
| Field Summary |
| Fields inherited from class uchicago.src.sim.enn.EnnBase |
agentList, aspiration, bValue, gridDensity, happyPlay, leftPercent, recorder, schedule, shuffle, space, unhappyPlay, WORLD_X_SIZE, WORLD_Y_SIZE |
| Fields inherited from class uchicago.src.sim.engine.SimModelImpl |
descriptors, modelManipulator |
| Constructor Summary | |
EnnModel()
|
|
| Method Summary | |
void |
begin()
Begins a simulation run. |
String |
getName()
Gets the name of the model/simulation. |
Schedule |
getSchedule()
Gets the Schedule created by the model. |
protected void |
initDataRecorder()
|
static void |
main(String[] args)
|
void |
setup()
Prepares a model for a new run, typically by deallocating objects or setting them to some reasonable default. |
| Methods inherited from class uchicago.src.sim.enn.EnnBase |
buildModel, computeOAC, computeOSWA, computeRave, getAspiration, getBValue, getDoShuffle, getGridDensity, getHappyPlay, getInitParam, getPercentLeft, getUnhappyPlay, setAspiration, setBValue, setDoShuffle, setGridDensity, setHappyPlay, setPercentLeft, setUnhappyPlay |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EnnModel()
| Method Detail |
protected void initDataRecorder()
initDataRecorder in class EnnBasepublic void begin()
SimModel
public void setup()
SimModel
public Schedule getSchedule()
SimModel
getSchedule in interface SimModelgetSchedule in class EnnBasepublic String getName()
SimModel
getName in interface SimModelgetName in class EnnBasepublic static void main(String[] args)
|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||