learningRules
Class StratReinforce

java.lang.Object
  |
  +--learningRules.StratReinforce
All Implemented Interfaces:
LearningRule

public class StratReinforce
extends java.lang.Object
implements LearningRule

Simple reinforcement learning for strategies


Constructor Summary
StratReinforce(double s)
          This takes a multiplicative scalling factor so that the weights don't grow extremely large (outside the realm of double)
 
Method Summary
 void newGeneration(Individual i)
          Prepares the individual for a new generation.
 int pickStrat(Individual i)
          Chooses a strategy based on standard reinforcement method
 void processPayoff(Individual i)
          Processes the payoff by adding the payoff to the weight of the strategy choosen on this round
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StratReinforce

public StratReinforce(double s)
This takes a multiplicative scalling factor so that the weights don't grow extremely large (outside the realm of double)

Parameters:
s - The scaling factor
Method Detail

newGeneration

public void newGeneration(Individual i)
                   throws ModelError
Prepares the individual for a new generation. Simply aplies the discount factor to weights

Specified by:
newGeneration in interface LearningRule
Parameters:
i - The calling individual
ModelError

processPayoff

public void processPayoff(Individual i)
                   throws ModelError
Processes the payoff by adding the payoff to the weight of the strategy choosen on this round

Specified by:
processPayoff in interface LearningRule
Parameters:
i - The calling individual
ModelError

pickStrat

public int pickStrat(Individual i)
Chooses a strategy based on standard reinforcement method

Specified by:
pickStrat in interface LearningRule
Parameters:
i - The calling individual