public class StochasticUniversalSelector<G extends Gene<?,G>,N extends Number & Comparable<? super N>> extends RouletteWheelSelector<G,N>
StochasticUniversalSelector
is a method for selecting a
population according to some given probability in a way that minimize chance
fluctuations. It can be viewed as a type of roulette game where now we have
P equally spaced points which we spin.
The figure above shows how the stochastic-universal selection works; n is the number of individuals to select.
_reverter, _sorted, POPULATION_COMPARATOR
Constructor and Description |
---|
StochasticUniversalSelector() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
ISeq<Phenotype<G,N>> |
select(Seq<Phenotype<G,N>> population,
int count,
Optimize opt)
This method sorts the population in descending order while calculating the
selection probabilities.
|
String |
toString() |
probabilities
probabilities
public StochasticUniversalSelector()
public ISeq<Phenotype<G,N>> select(Seq<Phenotype<G,N>> population, int count, Optimize opt)
select
in interface Selector<G extends Gene<?,G>,N extends Number & Comparable<? super N>>
select
in class ProbabilitySelector<G extends Gene<?,G>,N extends Number & Comparable<? super N>>
population
- The population to select from.count
- The number of phenotypes to select.opt
- Determines whether the individuals with higher fitness values
or lower fitness values must be selected. This parameter determines
whether the GA maximizes or minimizes the fitness function.public int hashCode()
hashCode
in class RouletteWheelSelector<G extends Gene<?,G>,N extends Number & Comparable<? super N>>
public boolean equals(Object obj)
equals
in class RouletteWheelSelector<G extends Gene<?,G>,N extends Number & Comparable<? super N>>
© 2007-2018 Franz Wilhelmstötter (2018-02-14 08:27)