|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--models.HybridModel
This is a Hyrbid Model which involves both experimentation (as implemented in the BGModel) and also conformist behavior (averaging of neighbors beliefs). The model involves one extra parameter (e) which is the experimentation parameter. An individual performs an experiment on a given round with probability e.
Constructor Summary | |
HybridModel()
|
Method Summary | |
void |
createPlayersHigh(Individual[] inds,
int s)
Forms a new network of specified size; expects random to be set. |
void |
createPlayersHigh(Individual[] inds,
int s,
ConnectionRule c,
LearningRule l,
double m,
double z)
Forms a new network of specified size; expects random to be set. |
void |
createPlayersHigh(Individual[] inds,
int s,
ConnectionRule c,
LearningRule l,
Game g,
double m,
double z)
Forms a new network of specified size; expects random to be set. |
void |
createPlayersLow(Individual[] inds)
Forms a new network of specified size; doesn't expect much to be set. |
int |
detectConvergence(int sow)
Checks to see if the population has converged either to the correct state or the bad state. |
double |
getE()
|
Game[] |
getGames()
Returns the games for the BgModel |
Individual[] |
getIndividuals()
Returns the set of individuals for the model. |
MersenneTwister |
getRandom()
Returns the random number generator for the model. |
static void |
main(java.lang.String[] args)
|
void |
playGen()
Resets then plays a generation. |
void |
setE(double e)
|
void |
setGames(Game[] g)
Sets an array of games, one for each state of the world. |
void |
setIndividuals(Individual[] i)
Sets the list of individuals for the model. |
void |
setRandom(MersenneTwister r)
Sets the random number generator. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HybridModel()
Method Detail |
public void setGames(Game[] g)
g
- The array of Game objectspublic Game[] getGames()
public void setIndividuals(Individual[] i)
i
- An array of individualspublic Individual[] getIndividuals()
public double getE()
public void setE(double e)
public void setRandom(MersenneTwister r)
r
- the mersennetwister random number generatorpublic MersenneTwister getRandom()
public void createPlayersLow(Individual[] inds)
inds
- A list of individualspublic void createPlayersHigh(Individual[] inds, int s) throws ModelError
inds
- A list of individualss
- The number of states of the world
ModelError
- If an initialization errorpublic void createPlayersHigh(Individual[] inds, int s, ConnectionRule c, LearningRule l, double m, double z) throws ModelError
inds
- A list of individualss
- The number of states of the worldc
- The connection rule used for forming network connections by each individuall
- The learning rule used for determining strategies by each individualm
- The mutation rate for each individual to reset their beliefsz
- The zero-state constraint for beliefs (initial beliefs cannot be lower than z)
ModelError
- If something fails during initializationpublic void createPlayersHigh(Individual[] inds, int s, ConnectionRule c, LearningRule l, Game g, double m, double z) throws ModelError
inds
- A list of individualss
- The number of states of the worldc
- The connection rule used for forming network connections by each individuall
- The learning rule used for determining strategies by each individualg
- The games used in the modelm
- The mutation rate for each individual to reset their beliefsz
- The zero-state constraint for beliefs (initial beliefs cannot be lower than z)
ModelError
- If something fails during initializationpublic void playGen() throws ModelError
ModelError
- If something bad happenspublic int detectConvergence(int sow) throws ModelError
sow
- What is the actual state of the world?
ModelError
public static void main(java.lang.String[] args)
args
- Command line
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |