Class PlayerUpdate

Object
PlayerUpdate

public class PlayerUpdate extends Object
The implementation of player updates. Player updates are used to update the strategies of individuals in a population through (probabilistic) comparisons with the performance of other members (and their strategies) in the population.

The player update type can be set to one of the following:

best
best wins (equal - stay)
best-random
best wins (equal - random)
best-response
best-response dynamics
imitate
imitate/replicate (linear)
imitate-better
imitate/replicate (better only)
proportional
proportional to payoff
thermal
Fermi/thermal update
The player update type can be set via the command line option --playerupdate <u> [<n>[,<e>]] where <u> is the player update type, <n> the noise when updating the trait, and <e> the error probability when adopting the trait.
Author:
Christoph Hauert
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Player update types.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final CLOption
    Command line option to set the type of player updates.
    (package private) double
    The probability of an error during the updating of the trait.
    (package private) Module
    The module that is using this player update.
    (package private) double
    The noise of the updating process of players.
    The player update type.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Instantiate new player update for use in module.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Get the error of the updating process.
    double
    Get the noise of the updating process.
    Gets the player update type.
    void
    setError(double error)
    Set the error of the updating process.
    void
    setNoise(double noise)
    Set the noise of the updating process of players.
    boolean
    Sets the player update type.
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • module

      Module module
      The module that is using this player update.
    • type

      protected PlayerUpdate.Type type
      The player update type.
      See Also:
    • noise

      double noise
      The noise of the updating process of players.
    • error

      double error
      The probability of an error during the updating of the trait.
    • clo

      public final CLOption clo
      Command line option to set the type of player updates.
  • Constructor Details

    • PlayerUpdate

      public PlayerUpdate(Module module)
      Instantiate new player update for use in module.
      Parameters:
      module - the module using this player update
  • Method Details

    • setType

      public boolean setType(PlayerUpdate.Type type)
      Sets the player update type.
      Parameters:
      type - the updating type for players
      Returns:
      true if player update type changed
    • getType

      public PlayerUpdate.Type getType()
      Gets the player update type.
      Returns:
      the player update type
    • setNoise

      public void setNoise(double noise)
      Set the noise of the updating process of players. With less noise chances are higher to adopt the strategy of individuals even if they perform only marginally better. Conversely for large noise payoff differences matter less and the updating process is more random. For noise==1 the process is neutral.
      Parameters:
      noise - the noise when updating the trait
    • getNoise

      public double getNoise()
      Get the noise of the updating process.
      Returns:
      the noise when updating the trait
      See Also:
    • setError

      public void setError(double error)
      Set the error of the updating process. With probability error an individual fails to adopt a better performing trait or adopts an worse performing one. More specifically the range of updating probabilities is restricted to [error, 1-error] such that always a chance remains that the trait of a better performing individual is not adopted or the one of a worse performing one is adopted.
      Parameters:
      error - the error when adopting the trait
    • getError

      public double getError()
      Get the error of the updating process.
      Returns:
      the error when adopting the trait
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object