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 |
|---|---|
(package private) boolean |
indCompetes |
(package private) int |
neighborhoodSize |
static 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 String |
P_N_SIZE
The size of the neighborhood from where parents are selected.
|
static String |
P_TYPE
Selection procedure.
|
(package private) int |
type |
static int |
TYPE_RANDOM_WALK |
static int |
TYPE_UNIFORM |
static String |
V_RANDOM_WALK |
static String |
V_UNIFORM |
P_PICKWORST, P_SIZE, P_TOURNAMENT, pickWorst, probabilityOfPickingSizePlusOneINDS_PRODUCEDNO_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, typicalIndsProducedclone, getProbability, pickRandom, preparePipeline, setProbability, setupProbabilitiespublic static final String P_N_SIZE
int neighborhoodSize
public static final String P_IND_COMPETES
boolean indCompetes
public static final String P_TYPE
public static final String V_UNIFORM
public static final String V_RANDOM_WALK
public static final int TYPE_UNIFORM
public static final int TYPE_RANDOM_WALK
int type
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 TournamentSelectionCopyright © 2014 Evolutionary Computation Laboratory at George Mason University. All rights reserved.