public enum MigrationStrategy extends java.lang.Enum<MigrationStrategy>
The strategies for agents migration.
Deterministic strategies (random, highest fitness and lowest fitness) are quite obvious in their behavior. Probabilistic strategies choose agents based on their evaluation quality. Agents with a better evaluation have higher probability of being chosen, and agents with a worse one - have smaller probability. There is no guarantee that agent with the best evaluation of all available will be chosen in probabilistic strategies.
IMPORTANT NOTICE - probabilistic selectors behave best when fitness values consist of only positive or only negative numbers (excluding zeros). If the solution evaluator can output both positive and negative fitnesses - consider using non-probabilistic selectors for more accurate selection, as the probabilistic ones tend to have rather uniform probability distribution in such situations.
Enum Constant and Description |
---|
HIGHEST_FITNESS |
HIGHEST_FITNESS_PROBABILISTIC |
LOWEST_FITNESS |
LOWEST_FITNESS_PROBABILISTIC |
RANDOM |
Modifier and Type | Field and Description |
---|---|
private java.util.function.BiFunction<io.vavr.collection.List<EmasAgent>,java.lang.Integer,io.vavr.collection.List<EmasAgent>> |
selector |
Modifier and Type | Method and Description |
---|---|
java.util.function.BiFunction<io.vavr.collection.List<EmasAgent>,java.lang.Integer,io.vavr.collection.List<EmasAgent>> |
selector() |
static MigrationStrategy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static MigrationStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MigrationStrategy RANDOM
public static final MigrationStrategy HIGHEST_FITNESS
public static final MigrationStrategy HIGHEST_FITNESS_PROBABILISTIC
public static final MigrationStrategy LOWEST_FITNESS
public static final MigrationStrategy LOWEST_FITNESS_PROBABILISTIC
public static MigrationStrategy[] values()
for (MigrationStrategy c : MigrationStrategy.values()) System.out.println(c);
public static MigrationStrategy valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null