Interface SelectionOperator<T extends GASolution<T>>

All Known Implementing Classes:
TournamentSelection

public interface SelectionOperator<T extends GASolution<T>>
Interface for selection operators in genetic algorithms. A selection operator defines how parents are selected from the population for crossover. The GA will call this interface to select parents based on their fitness.
  • Method Summary

    Modifier and Type
    Method
    Description
    select(List<T> population, double[] fitnesses, Random rng)
    Select one parent from an aligned population and fitness array.
  • Method Details

    • select

      T select(List<T> population, double[] fitnesses, Random rng)
      Select one parent from an aligned population and fitness array.
      Parameters:
      population - candidate individuals
      fitnesses - fitness at each corresponding population index
      rng - source of randomness
      Returns:
      selected individual