learningRules
Class SmoothReinforcement

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

public class SmoothReinforcement
extends java.lang.Object
implements LearningRule

This implements a modification of the standard reinforcement dynamics.


Constructor Summary
SmoothReinforcement(double d, double b)
           
 
Method Summary
 double getBeta()
          Returns the value of beta.
 double getDelta()
          Returns the value of delta.
 void newGeneration(Individual i)
          Prepares the individual for a new generation.
 int pickStrat(Individual i)
          Picks a strategy based on a logisitic response rule similar to smoothed fictitious play this is for multi domain models
 int pickStrat(Individual i, int d)
          Picks a strategy based on a logisitic response rule similar to smoothed fictitious play this is for signaling games
static double probs(double[] x)
          This calculates 1/(e^x[0]+e^x[1]+...+e^x[n]) It returns a double which is a rounded version of the result
 void processPayoff(Individual i)
          Processes the payoff by adding the payoff to the weight of the strategy choosen on this round
 void processPayoff(Individual i, int d)
          Processes the payoff by adding the payoff to the weight of the strategy choosen on this round.
 void setBeta(double beta)
          Sets the value of beta.
 void setDelta(double delta)
          Sets the value of delta.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmoothReinforcement

public SmoothReinforcement(double d,
                           double b)
Method Detail

probs

public static final double probs(double[] x)
This calculates 1/(e^x[0]+e^x[1]+...+e^x[n]) It returns a double which is a rounded version of the result

Parameters:
x - The list of exponents
Returns:
1/(e^x[0]+e^x[1]+...+e^x[n])

getDelta

public double getDelta()
Returns the value of delta.


setDelta

public void setDelta(double delta)
Sets the value of delta.

Parameters:
delta - The value to assign delta.

getBeta

public double getBeta()
Returns the value of beta.


setBeta

public void setBeta(double beta)
Sets the value of beta.

Parameters:
beta - The value to assign beta.

newGeneration

public void newGeneration(Individual i)
                   throws ModelError
Prepares the individual for a new generation. This does nothing since the discount factor is already applied in the updating procedure.

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

processPayoff

public void processPayoff(Individual i,
                          int d)
                   throws ModelError
Processes the payoff by adding the payoff to the weight of the strategy choosen on this round. This is for multi-domain models

Parameters:
i - The calling individual
ModelError

pickStrat

public int pickStrat(Individual i)
Picks a strategy based on a logisitic response rule similar to smoothed fictitious play this is for multi domain models

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

pickStrat

public int pickStrat(Individual i,
                     int d)
Picks a strategy based on a logisitic response rule similar to smoothed fictitious play this is for signaling games

Parameters:
i - The calling individual