RankSelection

class RankSelection(selectionPressure: Double = defaultSelectionPressure) : SelectionOperatorIfc(source)

Linear-rank selection: an alternate selection operator. The population is ranked best-to-worst (using the solver's GeneticAlgorithmSolver.compare, i.e. the minimization sense of the penalized objective). Each individual receives a selection probability that depends only on its rank, not on the magnitude of its fitness, which makes the operator robust to objective scale and sign. With selectionPressure s in [1,2], the best individual (rank 0) has probability s/n and the worst (rank n-1) has probability (2-s)/n; parents are then drawn by roulette over these probabilities. s = 1 gives uniform selection; s = 2 gives the strongest pressure (the worst individual gets probability 0).

Parameters

selectionPressure

the linear-ranking selection pressure, in [1,2]. The default is defaultSelectionPressure.

Constructors

Link copied to clipboard
constructor(selectionPressure: Double = defaultSelectionPressure)

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