|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--connectionRules.NeighborReinforce
A strategy learning rule that is like reinforcement dynamics. This learning rule reinforces both a players strategy with their payoff but also the neighbors' strategy with the neighbor's payoff (in the player's weights). This can be done at some discount.
Constructor Summary | |
NeighborReinforce()
Returns a NeighborReinforce object. |
|
NeighborReinforce(double n)
Returns a NeighborReinforce object with specified neigbor discount factor. |
Method Summary | |
double |
getNeighDiscount()
Returns the neighbor discount rate. |
void |
newGeneration(Individual i)
Prepares the individual for a new round of play. |
int |
pickStrat(Individual i)
Choose a strategy for the individual based on the wieghts by the standard reinforcement method. |
void |
processPayoff(Individual i)
This function is run after the payoffs are updated for all individuals. |
void |
setNeighDiscount(double n)
Sets the neighbor discount rate. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NeighborReinforce()
public NeighborReinforce(double n)
n
- The neighbor discount factorMethod Detail |
public void setNeighDiscount(double n)
n
- The discount rate (1.0 = no discount)public double getNeighDiscount()
public void newGeneration(Individual i) throws ModelError
newGeneration
in interface LearningRule
i
- The calling individual
ModelError
public void processPayoff(Individual i) throws ModelError
processPayoff
in interface LearningRule
i
- The calling invidual
ModelError
- If there is a problempublic int pickStrat(Individual i)
pickStrat
in interface LearningRule
i
- The calling Individual
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |