C# Class Accord.Genetic.RankSelection

Rank selection method.

The algorithm selects chromosomes to the new generation depending on their fitness values - the better fitness value chromosome has, the more chances it has to become member of the new generation. Each chromosome can be selected several times to the new generation.

This algorithm is similar to Roulette Wheel Selection algorithm, but the difference is in "wheel" and its sectors' size calculation method. The size of the wheel equals to size * ( size + 1 ) / 2, where size is the current size of population. The worst chromosome has its sector's size equal to 1, the next chromosome has its sector's size equal to 2, etc.

Inheritance: ISelectionMethod
Exibir arquivo Open project: accord-net/framework

Public Methods

Method Description
ApplySelection ( List chromosomes, int size ) : void

Apply selection to the specified population.

Filters specified population keeping only those chromosomes, which won "roulette" game.

RankSelection ( ) : System

Initializes a new instance of the RankSelection class.

Method Details

ApplySelection() public method

Apply selection to the specified population.
Filters specified population keeping only those chromosomes, which won "roulette" game.
public ApplySelection ( List chromosomes, int size ) : void
chromosomes List Population, which should be filtered.
size int The amount of chromosomes to keep.
return void

RankSelection() public method

Initializes a new instance of the RankSelection class.
public RankSelection ( ) : System
return System