select

open override fun select(population: List<Solution>, numToSelect: Int, solver: GeneticAlgorithmSolver): List<Solution>(source)

Selects parents from the current evaluated population.

Return

the selected parent solutions. The returned list will have size numToSelect.

Parameters

population

the current generation's evaluated solutions. Must not be empty.

numToSelect

the number of parents to produce (the mating pool size). Must be > 0.

solver

the genetic algorithm solver requesting the selection. Provides access to the random number stream, the problem definition, and the solution comparison rule.