Ultra 0.9.4
Loading...
Searching...
No Matches
ultra::parameters::evolution_parameters Struct Reference

Public Attributes

unsigned brood_recombination {0}
double elitism {-1.0}
unsigned generations {0}
std::size_t mate_zone {0}
unsigned max_stuck_gen = {0}
double p_cross {-1.0}
double p_mutation {-1.0}
std::size_t tournament_size {0}

Static Public Attributes

static constexpr std::size_t max_tournament_size {10000}

Member Data Documentation

◆ brood_recombination

unsigned ultra::parameters::evolution_parameters::brood_recombination {0}

This parameter controls the brood recombination/selection level (1 to turn it off).

In nature it's common for organisms to produce many offspring and then neglect, abort, resorb, eat some of them or allow them to eat each other. There are various reasons for this behavior (e.g. progeny choice hypothesis). The phenomenon is known variously as soft selection, brood selection, spontaneous abortion. The "bottom line" of this behaviour in nature is the reduction of parental resource investment in offspring who are potentially less fit than others.

See also
Note
  • 0 means auto-tune;

◆ elitism

double ultra::parameters::evolution_parameters::elitism {-1.0}

Controls how strongly the search tries to preserve the best individuals. Higher elitism increases selection pressure and reduces the chance that exceptional individuals are lost, at the cost of diversity.

Note
  • 0.0 disables elitist protection;
  • 1.0 applies the maximum configured protection;
  • values outside the [0.0; 1.0] range mean auto-tune.

◆ generations

unsigned ultra::parameters::evolution_parameters::generations {0}

Maximum number of generations allowed before terminate a run.

Note
0 means auto-tune.
Examples
symbolic_regression02.cc.

◆ mate_zone

std::size_t ultra::parameters::evolution_parameters::mate_zone {0}

This is used for the trivial geography scheme. The population is viewed as having a 1-dimensional spatial structure - actually a circle, as we consider the first and last locations to be adjacent. The production of an individual from location i is permitted to involve only parents from i's local neighborhood, where the neightborhood is defined as all individuals within distance mate_zone of i.

Note
  • 0 means auto-tune.
  • std::numeric_limits<std::size_t>::max() (or a large enough number) disables the scheme.
See also
https://github.com/morinim/ultra/wiki/bibliography#3

◆ max_stuck_gen

unsigned ultra::parameters::evolution_parameters::max_stuck_gen = {0}

Used by some evolution strategies to stop evolution when there aren't improvements within the given number of generations.

0 means auto-tune.

◆ max_tournament_size

std::size_t ultra::parameters::evolution_parameters::max_tournament_size {10000}
staticconstexpr

Maximum allowed value for evolution.tournament_size.

This guard prevents pathological configurations that would make tournament selection excessively expensive.

◆ p_cross

double ultra::parameters::evolution_parameters::p_cross {-1.0}

Crossover probability.

Note
Values outside the [0.0;1.0] range mean auto-tune.

◆ p_mutation

double ultra::parameters::evolution_parameters::p_mutation {-1.0}

Mutation rate probability.

Mutation is one of the principal "search operators" used to transform individuals in evolutionary algorithms. It causes random changes in the genes.

Warning
p_cross + p_mutation != 1.0: p_mutation is the probability to mutate a gene; it's not the probability of choosing the mutation operator (which depends depends on the recombination algorithm).
Note
Values outside the [0.0;1.0] range mean auto-tune.

◆ tournament_size

std::size_t ultra::parameters::evolution_parameters::tournament_size {0}

Size of the tournament to choose the parents from.

Tournament sizes tend to be small relative to the population size. The ratio of tournament size to population size can be used as a measure of selective pressure.

Note
  • A tournament size of 1 would be equivalent to selecting individuals at random.
  • A length of 0 means auto-tune.

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