Grail (C#)  1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
Grail.Evolution.Selection Class Reference

The Selection class encapsulates the selection operation, i.e., how individuals are selected from the current population to the next generation, in the evolutionary algorithm.
See EAOptimizer. More...

Public Member Functions

virtual List< IndividualPerform (List< Individual > currentPopulation, int populationMaxSize)
 The function that performs the selection. More...
 

Detailed Description

The Selection class encapsulates the selection operation, i.e., how individuals are selected from the current population to the next generation, in the evolutionary algorithm.
See EAOptimizer.

Member Function Documentation

◆ Perform()

virtual List<Individual> Grail.Evolution.Selection.Perform ( List< Individual currentPopulation,
int  populationMaxSize 
)
inlinevirtual

The function that performs the selection.

Parameters
currentPopulationThe input population before the selection. For convenience, it will be sorted by fitness from lowest to highest.
populationMaxSizeThe expected population size after the selection.
When implementing a custom Perform method, you should make sure that the returned population size is equal to this value, if possible.
Returns
The new population after the selection. You can modify the currentPopulation or return a new collection.

The documentation for this class was generated from the following file: