|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectec.BreedingSource
ec.SelectionMethod
ec.select.TournamentSelection
ec.spatial.SpatialTournamentSelection
public class SpatialTournamentSelection
A slight modification of the tournament selection procedure for use with spatially-embedded EAs. When selecting an individual, the SpatialTournamentSelection method selects one from the neighbors of a specific individual (as indicated by its index in the subpopulation).
Parameters
base.size int >= 1 or 1.0 < float < 2.0 |
(the tournament size) |
base.pick-worst bool = true or false (default) |
(should we pick the worst individual in the tournament instead of the best?) |
Default Base
spatial.tournament
Field Summary | |
---|---|
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. |
Fields inherited from class ec.select.TournamentSelection |
---|
DEFAULT_SIZE, P_PICKWORST, P_SIZE, P_TOURNAMENT, pickWorst, probabilityOfSelection, size |
Fields inherited from class ec.SelectionMethod |
---|
INDS_PRODUCED |
Fields inherited from class ec.BreedingSource |
---|
CHECKBOUNDARY, DEFAULT_PRODUCED, NO_PROBABILITY, P_PROB, probability, UNUSED |
Constructor Summary | |
---|---|
SpatialTournamentSelection()
|
Method Summary | |
---|---|
Parameter |
defaultBase()
Returns the default base for this prototype. |
int |
produce(int subpopulation,
EvolutionState state,
int thread)
An alternative form of "produce" special to Selection Methods; selects an individual from the given subpopulation and returns its position in that subpopulation. |
int |
produce(int min,
int max,
int start,
int subpopulation,
Individual[] inds,
EvolutionState state,
int thread)
Produces n individuals from the given subpopulation and puts them into inds[start...start+n-1], where n = Min(Max(q,min),max), where q is the "typical" number of individuals the BreedingSource produces in one shot, and returns n. |
void |
setup(EvolutionState state,
Parameter base)
Sets up the BreedingPipeline. |
Methods inherited from class ec.select.TournamentSelection |
---|
individualReplaced, sourcesAreProperForm |
Methods inherited from class ec.SelectionMethod |
---|
finishProducing, preparePipeline, prepareToProduce, produces, typicalIndsProduced |
Methods inherited from class ec.BreedingSource |
---|
clone, getProbability, pickRandom, setProbability, setupProbabilities |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String P_N_SIZE
public static final java.lang.String P_IND_COMPETES
Constructor Detail |
---|
public SpatialTournamentSelection()
Method Detail |
---|
public void setup(EvolutionState state, Parameter base)
BreedingSource
The 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 Prototype
setup
in interface Setup
setup
in class TournamentSelection
Prototype.setup(EvolutionState,Parameter)
public Parameter defaultBase()
Prototype
defaultBase
in interface Prototype
defaultBase
in class TournamentSelection
public int produce(int subpopulation, EvolutionState state, int thread)
SelectionMethod
produce
in class TournamentSelection
public int produce(int min, int max, int start, int subpopulation, Individual[] inds, EvolutionState state, int thread)
BreedingSource
produce
in class TournamentSelection
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |