learningRules
Class SmoothPayoffLearning

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

public class SmoothPayoffLearning
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
SmoothPayoffLearning(Game g, double gam)
           
 
Method Summary
 void newGeneration(Individual i)
          This does nothing since there is no discounting or anything.
 int pickStrat(Individual i)
          This function chooses a strategy for the player.
 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

SmoothPayoffLearning

public SmoothPayoffLearning(Game g,
                            double gam)
                     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)
This function chooses a strategy for the player. It uses a probabilistic (smoothed) best response to its beliefs function. The function used is an exponentiation function for two strategies the probability of strategy one is
e^(E(1)/gamma) / *(e^(E(1)/gamma) + e^(E(2)/gamma))
where E(x) is the expectation of action x and gamma is a parameter which corresponds to the amount of "smoothing" that occurs (i.e. the higher the gamma the further from the best response correspondence the function is).

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