learningRules
Class MyopicBRLearning

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

public class MyopicBRLearning
extends java.lang.Object
implements LearningRule

This class implements myopic best response learning. Here an individual looks at the strategies employed by her neighbors on the last round (only) and chooses the strategy on the next round which was the best response to their action on the last round.


Constructor Summary
MyopicBRLearning(Game g)
          Constructor
 
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 which is a best response to the collective action of the players last round.
 void processPayoff(Individual i)
          Processing a payoff does nothing, since there are no beliefs to be updated.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyopicBRLearning

public MyopicBRLearning(Game g)
Constructor

Parameters:
g - The game
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
Processing a payoff does nothing, since there are no beliefs to be updated.

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

pickStrat

public int pickStrat(Individual i)
This function chooses a strategy which is a best response to the collective action of the players last round. If the players previous strategy is tied with another as the best, the player keeps the strategy. If two strategies (not used by the player on the last round) are tied, the player chooses one at random.

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