Vita
|
Tournament selection is a method of selecting an individual from a population of individuals. More...
#include <evolution_selection.h>
Inherits vita::selection::strategy< T >.
Public Member Functions | |
strategy< T >::parents_t | run () |
Public Member Functions inherited from vita::selection::strategy< T > | |
strategy (const population< T > &, evaluator< T > &, const summary< T > &) | |
Additional Inherited Members | |
Public Types inherited from vita::selection::strategy< T > | |
using | parents_t = std::vector< typename population< T >::coord > |
Protected Attributes inherited from vita::selection::strategy< T > | |
evaluator< T > & | eva_ |
const population< T > & | pop_ |
const summary< T > & | sum_ |
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.
Definition at line 70 of file evolution_selection.h.