public class SpatialTournamentSelection extends TournamentSelection
The method of picking individuals is either uniform (picking individuals using the Space interface's getRandomIndividual(...)) or random-walk (wandering distance steps at random). You can also stipulate whether the original individual must be in the tournament.
Parameters
| base.neighborhood-size int >= 1 |
(the neighborhood size) |
| base.ind-competes bool = true or false (default) |
(Do we include the base individual in the tournament?) |
| base.type String: uniform (default) or random-walk |
Method for selecting individuals in neighborhood |
Default Base
spatial.tournament
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
P_IND_COMPETES
Some models assume an individual is always selected to compete for breeding a child that would
take its location in space.
|
static java.lang.String |
P_N_SIZE
The size of the neighborhood from where parents are selected.
|
static java.lang.String |
P_TYPE
Selection procedure.
|
static int |
TYPE_RANDOM_WALK |
static int |
TYPE_UNIFORM |
static java.lang.String |
V_RANDOM_WALK |
static java.lang.String |
V_UNIFORM |
P_PICKWORST, P_SIZE, P_TOURNAMENT, pickWorst, probabilityOfPickingSizePlusOne, sizeINDS_PRODUCED, KEY_PARENTSNO_PROBABILITY, P_PROB, probability| Constructor and Description |
|---|
SpatialTournamentSelection() |
| Modifier and Type | Method and Description |
|---|---|
Parameter |
defaultBase()
Returns the default base for this prototype.
|
int |
getRandomIndividual(int number,
int subpopulation,
EvolutionState state,
int thread)
Produces the index of a (typically uniformly distributed) randomly chosen individual
to fill the tournament.
|
void |
setup(EvolutionState state,
Parameter base)
Sets up the BreedingPipeline.
|
betterThan, getTournamentSizeToUse, individualReplaced, produce, sourcesAreProperFormfinishProducing, prepareToProduce, produce, produces, produceWithoutCloning, typicalIndsProducedclone, fillStubs, getProbability, pickRandom, preparePipeline, setProbability, setupProbabilitiespublic static final java.lang.String P_N_SIZE
public static final java.lang.String P_IND_COMPETES
public static final java.lang.String P_TYPE
public static final java.lang.String V_UNIFORM
public static final java.lang.String V_RANDOM_WALK
public static final int TYPE_UNIFORM
public static final int TYPE_RANDOM_WALK
public void setup(EvolutionState state, Parameter base)
BreedingSourceThe most common modification is to normalize it with some other set of probabilities, then set all of them up in increasing summation; this allows the use of the fast static BreedingSource-picking utility method, BreedingSource.pickRandom(...). In order to use this method, for example, if four breeding source probabilities are {0.3, 0.2, 0.1, 0.4}, then they should get normalized and summed by the outside owners as: {0.3, 0.5, 0.6, 1.0}.
setup in interface Prototypesetup in interface Setupsetup in class TournamentSelectionPrototype.setup(EvolutionState,Parameter)public Parameter defaultBase()
PrototypedefaultBase in interface PrototypedefaultBase in class TournamentSelectionpublic int getRandomIndividual(int number,
int subpopulation,
EvolutionState state,
int thread)
TournamentSelectiongetRandomIndividual in class TournamentSelection