![]() |
Ultra 0.9.4
|
#include <evolution_selection.h>
Public Member Functions | |
| template<SizedRandomAccessPopulation P> | |
| std::vector< scored_t > | operator() (const P &) const |
| Public Member Functions inherited from ultra::selection::strategy< E > | |
| strategy (E &, const parameters &) | |
Additional Inherited Members | |
| Public Types inherited from ultra::selection::strategy< E > | |
| using | scored_t |
| Protected Attributes inherited from ultra::selection::strategy< E > | |
| E & | eva_ |
| const parameters & | params_ |
Tournament selection is a method of selecting an individual from a population of individuals. It involves running several tournaments among a few individuals chosen at random from the population. The winner of each tournament (the one with the best fitness) is selected for crossover.
Selection pressure is easily adjusted by changing the tournament size. If the tournament size is larger, weak individuals have a smaller chance to be selected. A 1-way tournament selection is equivalent to random selection.
Tournament selection has several benefits: it's efficient to code, works on parallel architectures and allows the selection pressure to be easily adjusted.
The tournament selection algorithm we implemented was modified so that instead of having only one winner (parent) in each tournament, we select n winners from each tournament based on the top n fitness values in the tournament.