learningRules
Class PayoffLearning

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

public class PayoffLearning
extends java.lang.Object
implements LearningRule

A learning rule where individuals learn the payoffs in a n-strategy game. This learning rule treats the payoffs for each strategy as stable (i.e. non-strategic). It using beta distribution learning.


Constructor Summary
PayoffLearning(Game g)
           
 
Method Summary
 void newGeneration(Individual i)
          This does nothing since there is no discounting or anything.
 int pickStrat(Individual i)
          Chooses the strategy with the highest expected payoff.
 void processPayoff(Individual i)
          This processes the payoff by updating the agents beliefs about each payoff based on the information received this round.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PayoffLearning

public PayoffLearning(Game g)
               throws ModelError
Method Detail

newGeneration

public void newGeneration(Individual i)
                   throws ModelError
This does nothing since there is no discounting or anything.

Specified by:
newGeneration in interface LearningRule
Parameters:
i - The individual calling the function
Throws:
ModelError - (although, since this does nothing it will never be thrown)

processPayoff

public void processPayoff(Individual i)
                   throws ModelError
This processes the payoff by updating the agents beliefs about each payoff based on the information received this round.

Specified by:
processPayoff in interface LearningRule
Parameters:
i - The individual whose beliefs should be updated.
ModelError

pickStrat

public int pickStrat(Individual i)
Chooses the strategy with the highest expected payoff. In case of a tie it chooses the higher numerical strategy.

Specified by:
pickStrat in interface LearningRule
Parameters:
i - the individual whose strategy is choosen
Returns:
the new strategy