|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--learningRules.CondorcetLearning
This class is a Condorcet Learning Rule. An individual looks around and adopts the strategey that the majority in his neighborhood are adopting.
Constructor Summary | |
CondorcetLearning()
A constructor which automatically sets the number of strats at 2 |
|
CondorcetLearning(int s)
A constructor which sets the number of strats |
Method Summary | |
void |
newGeneration(Individual i)
There is no updating so this function does nothing |
int |
pickStrat(Individual i)
This function censuses individual in the neighborhood and adopts the strategy used by the majority last round. |
void |
processPayoff(Individual i)
All this does is update LastStrat. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CondorcetLearning(int s)
public CondorcetLearning()
Method Detail |
public void newGeneration(Individual i)
newGeneration
in interface LearningRule
i
- The calling individualpublic int pickStrat(Individual i)
pickStrat
in interface LearningRule
i
- The calling individualpublic void processPayoff(Individual i)
processPayoff
in interface LearningRule
i
- The calling individual
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |