#include <evolution_replacement.h>
|
| template<Population P> |
| bool | operator() (P &, const scored_t &, status_t &) const |
| template<Population P> |
| bool | operator() (P &pop, const scored_t &offspring, status_t &status) const |
| template<SizedRandomAccessPopulation P> |
| std::vector< typename tournament< E >::scored_t > | operator() (const P &pop) const |
| template<SizedRandomAccessPopulation P> |
| std::vector< typename tournament< E >::scored_t > | operator() (const P &pop) const |
| | strategy (E &, const parameters &) |
|
|
using | individual_t = evaluator_individual_t<E> |
|
using | fitness_t = evaluator_fitness_t<E> |
|
using | scored_t = scored_individual<individual_t, fitness_t> |
|
using | status_t = evolution_status<individual_t, fitness_t> |
|
E & | eva_ |
|
const parameters & | params_ |
template<Evaluator E>
class ultra::replacement::tournament< E >
Tournament based replacement scheme (aka kill tournament).
This strategy select an individual for replacement by kill tournament: pick a number of individuals at random and replace the worst.
- See also
- https://github.com/morinim/ultra/wiki/bibliography#24
◆ operator()() [1/4]
template<Evaluator E>
template<SizedRandomAccessPopulation P>
- Parameters
-
- Returns
- a collection of scored individuals ordered in descending fitness
- Precondition
- Parameters must have been initialised (no auto-tune values)
Tournament selection works by selecting a number of individuals from the population at random (a tournament) and then choosing only the best of those individuals. Recall that better individuals have higher fitness.
Used parameters: evolution.mate_zone, evolution.tournament_size.
- Warning
- This function assumes exclusive access to the population. If other threads can change the individuals, race conditions may happen.
◆ operator()() [2/4]
template<Evaluator E>
template<SizedRandomAccessPopulation P>
- Parameters
-
- Returns
- a collection of scored individuals ordered in descending fitness
- Precondition
- Parameters must have been initialised (no auto-tune values)
Tournament selection works by selecting a number of individuals from the population at random (a tournament) and then choosing only the best of those individuals. Recall that better individuals have higher fitness.
Used parameters: evolution.mate_zone, evolution.tournament_size.
- Warning
- This function assumes exclusive access to the population. If other threads can change the individuals, race conditions may happen.
◆ operator()() [3/4]
template<Evaluator E>
template<Population P>
- Parameters
-
| [in] | pop | a population |
| [in] | offspring | the scored child to be considered for replacement |
| [out] | status | current evolution status |
Used parameters:
- evolution.elitism;
- evolution.tournament_size;
◆ operator()() [4/4]
template<Evaluator E>
template<Population P>
- Parameters
-
| [in] | pop | a population |
| [in] | offspring | the scored child to be considered for replacement |
| [out] | status | current evolution status |
Used parameters:
- evolution.elitism;
- evolution.tournament_size;
The documentation for this class was generated from the following files: