TournamentSelection

class TournamentSelection(tournamentSize: Int = defaultTournamentSize) : SelectionOperatorIfc(source)

Tournament selection: the default selection operator. To select each parent, tournamentSize competitors are drawn uniformly at random (with replacement) from the population, and the best competitor (according to the solver's GeneticAlgorithmSolver.compare, i.e. the minimization sense of the penalized objective) wins. Larger tournaments increase selection pressure.

Parameters

tournamentSize

the number of competitors per tournament. Must be greater than 0. The default is defaultTournamentSize.

Constructors

Link copied to clipboard
constructor(tournamentSize: Int = defaultTournamentSize)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun select(population: List<Solution>, numToSelect: Int, solver: GeneticAlgorithmSolver): List<Solution>

Selects parents from the current evaluated population.

Link copied to clipboard
open override fun toString(): String