Enum programinduction::GPSelection
source · pub enum GPSelection {
Deterministic,
Drift(f64),
Hybrid(f64),
Probabilistic,
Resample,
}
Expand description
The mechanism by which individuals are selected for inclusion in the population.
Variants§
Deterministic
Deterministic
implies a strict survival-of-the-fittest selection
mechanism, in which the best individuals are always retained. An
individual can only be removed from a population if a better-scoring
individual arises to take its place.
Drift(f64)
Drift(alpha)
implies a noisy survival-of-the-fittest selection
mechanism, in which individuals are selected probabilistically without
replacement from the combination of the population and offspring to form
a new population. Offspring fitness is simply determined by the task,
while the fitness of members of the pre-existing population is computed
as a linear combination of their prior fitness and fitness on the
current task, given as fitness_{:t} = alpha * fitness_{:t-1} + (1-alpha) * fitness_t
. An individual can be removed from a population
by lower-scoring individuals, though this is relatively unlikely.
Hybrid(f64)
Hybrid(deterministic_proportion)
implies a selection mechanism in which
some portion of the population is selected deterministically such that the
best individuals are always retained. The remainder of the population is
sampled without replacement from the remaining individuals. An individual
can be removed from a population by lower-scoring individuals, though this
is relatively unlikely, and impossible if the individual is considered one
of the “best” in the population. The number of “best” individuals is
floor(population.len() * deterministic_proportion)
.
The deterministic_proportion
should be between 0 and 1.
Probabilistic
Probabilistic
implies a noisy survival-of-the-fittest selection
mechanism, in which a population is selected probabilistically from a
set of possible populations in proportion to its overall fitness. An
individual can be removed from a population even by lower-scoring
individuals, though this is relatively unlikely.
Resample
Resample
implies that individuals are selected by sampling from the
offspring with replacement, as in a particle filter.