public final class LinearRankSelector<G extends Gene<?,G>,C extends Comparable<? super C>> extends ProbabilitySelector<G,C>
In linear-ranking selection the individuals are sorted according to their fitness values. The rank N is assignee to the best individual and the rank 1 to the worst individual. The selection probability P(i) of individual i is linearly assigned to the individuals according to their rank.
Here n-/N is the probability of the worst individual to be selected and n+/N the probability of the best individual to be selected. As the population size is held constant, the conditions n+ = 2 - n- and n- >= 0 must be fulfilled. Note that all individuals get a different rank, i.e., a different selection probability, even if the have the same fitness value.
T. Blickle, L. Thiele, A comparison of selection schemes used in evolutionary algorithms, Technical Report, ETH Zurich, 1997, page 37. http://citeseer.ist.psu.edu/blickle97comparison.html
|Constructor and Description|
Create a new LinearRankSelector with
Create a new LinearRankSelector with the given values for
|Modifier and Type||Method and Description|
This method sorts the population in descending order while calculating the selection probabilities.
public LinearRankSelector(double nminus)
nminus/Nis the probability of the worst phenotype to be selected.
nminus < 0.
nminus := 0.5.
protected double probabilities(Seq<Phenotype<G,C>> population, int count)
ProbabilitySelector<G extends Gene<?,G>,C extends Comparable<? super C>>
population- The unsorted population.
count- The number of phenotypes to select. This parameter is not needed for most implementations.
population.size()and must sum to one. The returned value is checked with
assert(Math.abs(math.sum(probabilities) - 1.0) < 0.0001)in the base class.
© 2007-2019 Franz Wilhelmstötter (2019-11-18 20:30)