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.
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 |
---|
LinearRankSelector()
Create a new LinearRankSelector with
nminus := 0.5 . |
LinearRankSelector(double nminus)
Create a new LinearRankSelector with the given values for
nminus . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
protected double[] |
probabilities(Population<G,C> population,
int count)
This method sorts the population in descending order while calculating the
selection probabilities.
|
String |
toString() |
probabilities, select
public LinearRankSelector(double nminus)
nminus
.nminus
- nminus/N
is the probability of the worst phenotype
to be selected.IllegalArgumentException
- if nminus < 0
.public LinearRankSelector()
nminus := 0.5
.protected double[] probabilities(Population<G,C> population, int count)
Population.populationSort()
is called
by this method.)probabilities
in class 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-2017 Franz Wilhelmstötter (2017-04-28 16:50)