|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--models.BiasedNetworkModel
This class implements a learning in network model with biased network formation This model uses beta-distribution learning (aka payoff learning).
Field Summary | |
static MersenneTwister |
random
|
Constructor Summary | |
BiasedNetworkModel(Individual[] i,
Game g,
LearningRule l,
double m,
double min,
double max)
|
Method Summary | |
int |
detectConvergence(int optimal)
Checks to see if the population has converged either to the correct state or the bad state. |
int |
getAgreement(int i,
int j)
Returns the agreement count between i and j. |
Game |
getGame()
Returns the value of game. |
Individual[] |
getIndivids()
Returns the value of indivis. |
double |
getMaximumProb()
Gets the connection probability |
double |
getMinimumProb()
Gets the connection probability |
int |
getTotalPlayed()
Returns the value of totalPlayed. |
void |
incAgreement(int i,
int j)
Increments the agreement counter between i and j. |
void |
incTotalPlayed()
Increments total count |
static void |
main(java.lang.String[] args)
|
void |
playGen()
Resets then plays a generation. |
void |
resetAgreement(int n)
Resets the value for agreement. |
void |
setAgreement(int i,
int j,
int a)
Sets the agreement counter for two agents to a specified value. |
void |
setGame(Game game)
Sets the value of game. |
void |
setIndivids(Individual[] individs)
Sets the value of indivis. |
void |
setMaximumProb(double p)
Sets the connection probability |
void |
setMinimumProb(double p)
Sets the connection probability |
void |
setTotalPlayed(int totalPlayed)
Sets the value of totalPlayed. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final MersenneTwister random
Constructor Detail |
public BiasedNetworkModel(Individual[] i, Game g, LearningRule l, double m, double min, double max) throws ModelError
Method Detail |
public Individual[] getIndivids()
public void setIndivids(Individual[] individs)
public Game getGame()
public void setGame(Game game)
game
- The value to assign game.public double getMinimumProb()
public void setMinimumProb(double p)
p
- The connection probabilitypublic double getMaximumProb()
public void setMaximumProb(double p)
p
- The connection probabilitypublic int getTotalPlayed()
public void setTotalPlayed(int totalPlayed)
totalPlayed
- The value to assign totalPlayed.public void incTotalPlayed()
public void resetAgreement(int n)
n
- Number of agents in the networkpublic int getAgreement(int i, int j)
i
- One agentj
- Anotherpublic void incAgreement(int i, int j)
i
- One agentj
- Anotherpublic void setAgreement(int i, int j, int a)
i
- One agentj
- Anotherpublic void playGen() throws ModelError
ModelError
- If something bad happenspublic int detectConvergence(int optimal) throws ModelError
optimal
- The optimal action
ModelError
public static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |