Package org.evoludo.simulator.modules
Class PlayerUpdate
Object
PlayerUpdate
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
--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 -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal 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.protected PlayerUpdate.Type
The player update type. -
Constructor Summary
ConstructorsConstructorDescriptionPlayerUpdate
(Module module) Instantiate new player update for use inmodule
. -
Method Summary
Modifier and TypeMethodDescriptiondouble
getError()
Get the error of the updating process.double
getNoise()
Get the noise of the updating process.getType()
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
setType
(PlayerUpdate.Type type) Sets the player update type.toString()
-
Field Details
-
module
Module moduleThe module that is using this player update. -
type
The player update type.- See Also:
-
noise
double noiseThe noise of the updating process of players. -
error
double errorThe probability of an error during the updating of the trait. -
clo
Command line option to set the type of player updates.
-
-
Constructor Details
-
PlayerUpdate
Instantiate new player update for use inmodule
.- Parameters:
module
- the module using this player update
-
-
Method Details
-
setType
Sets the player update type.- Parameters:
type
- the updating type for players- Returns:
true
if player update type changed
-
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. Fornoise==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 probabilityerror
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
-