Package io.jenetics

Class StochasticUniversalSelector<G extends Gene<?,G>,N extends Number & Comparable<? super N>>

java.lang.Object
io.jenetics.ProbabilitySelector<G,N>
io.jenetics.RouletteWheelSelector<G,N>
io.jenetics.StochasticUniversalSelector<G,N>
All Implemented Interfaces:
Selector<G,N>

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 minimizes chance fluctuations. It can be viewed as a type of roulette game where now we have P equally spaced points which we spin.

Selector

The figure above shows how the stochastic-universal selection works; n is the number of individuals to select.
Since:
1.0
Version:
5.0
See Also:
  • Constructor Details

  • Method Details

    • select

      public 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.
      Specified by:
      select in interface Selector<G extends Gene<?,G>,N extends Number & Comparable<? super N>>
      Overrides:
      select in class ProbabilitySelector<G extends Gene<?,G>,N extends Number & Comparable<? super N>>
      Parameters:
      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.
      Returns:
      The selected phenotypes (a new Population).