![]() |
Ultra 0.9.4
|
#include <evolution_strategy.h>
Public Member Functions | |
| alps_es (const problem &, E &) | |
| template<LayeredPopulation P> | |
| auto | operations (P &, typename P::layer_iter, const evolution_status< individual_t, fitness_t > &) const |
| template<LayeredPopulation P> | |
| void | init (P &) const |
| template<LayeredPopulation P> | |
| auto * | refinement_subgroup (P &) const noexcept |
| template<LayeredPopulation P> | |
| void | after_generation (P &, const summary< individual_t, fitness_t > &) |
| template<LayeredPopulation P> | |
| std::size_t | max_parallelism (const P &) const noexcept |
| template<LayeredPopulation P> | |
| auto | operations (P &pop, typename P::layer_iter iter, const evolution_status< individual_t, fitness_t > &starting_status) const |
| template<LayeredPopulation P> | |
| void | init (P &pop) const |
| template<LayeredPopulation P> | |
| auto * | refinement_subgroup (P &pop) const noexcept |
| template<LayeredPopulation P> | |
| std::size_t | max_parallelism (const P &) const noexcept |
| template<LayeredPopulation P> | |
| void | after_generation (P &pop, const summary< individual_t, fitness_t > &sum) |
| Public Member Functions inherited from ultra::evolution_strategy< E > | |
| template<Population P> | |
| void | init (P &) const |
| template<Population P> | |
| P * | refinement_subgroup (P &) const noexcept |
| template<Population P> | |
| void | after_generation (P &, const summary< individual_t, fitness_t > &) |
| const problem & | get_problem () const noexcept |
| template<Population P> | |
| std::size_t | max_parallelism (const P &) const noexcept |
| template<LayeredPopulation P> | |
| bool | valid_layer (P &pop, typename P::layer_iter iter) |
| template<Population P> | |
| P * | refinement_subgroup (P &pop) const noexcept |
| template<Population P> | |
| std::size_t | max_parallelism (const P &pop) const noexcept |
| template<Population P> | |
| void | after_generation (P &pop, const summary< individual_t, fitness_t > &sum) |
Static Public Member Functions | |
| static parameters | shape (parameters) |
| Static Public Member Functions inherited from ultra::evolution_strategy< E > | |
| static parameters | shape (const parameters &p) |
Additional Inherited Members | |
| Public Types inherited from ultra::evolution_strategy< E > | |
| using | evaluator_type = E |
| using | fitness_t = evaluator_fitness_t<E> |
| using | individual_t = evaluator_individual_t<E> |
| Protected Member Functions inherited from ultra::evolution_strategy< E > | |
| evolution_strategy (const problem &, E &) | |
| Static Protected Member Functions inherited from ultra::evolution_strategy< E > | |
| template<LayeredPopulation P> | |
| static bool | valid_layer (P &, typename P::layer_iter) |
| Protected Attributes inherited from ultra::evolution_strategy< E > | |
| E & | eva_ |
| const problem & | prob_ |
Basic ALPS strategy.
With ALPS, several instances of a search algorithm are run in parallel, each in its own age-layer, and the age of solutions is kept track of. The key properties of ALPS are:
Age is a measure of how long an individual's family of genotypic material has been in the population. Randomly generated individuals, such as those that are created when the search algorithm are started, start with an age of 0. Each generation that an individual stays in the population its age is increased by one. Individuals that are created through mutation or recombination take the age of their oldest parent and add one to it. This differs from conventional measures of age, in which individuals created through applying some type of variation to an existing individual (e.g. mutation or recombination) start with an age of 0.
The search algorithm in a given layer acts somewhat independently of the others, with an exception being that it can use individuals from both its layer and the layer below to generated new candidate solutions. Also, each age layer has an upper limit on the age of solutions it can contain. When an individual is too old for its current layer, it cannot be used to generate new individuals for that layer and eventually is removed from that layer. Optionally, an attempt can be made to move this individual up to the next layer – in which case it replaces some individual there that it's better than. Finally, at regular intervals the bottom layer is replaced with a new sub-population of randomly generated individuals, each with an age of 0.
| alps_es::alps_es | ( | const problem & | prob, |
| E & | eva ) |
Constructs an ALPS evolution strategy.
| [in] | prob | the optimisation problem |
| [in] | eva | the evaluator used to assess individuals |
Initialises ALPS-specific operators:
| void ultra::alps_es< E >::after_generation | ( | P & | pop, |
| const summary< individual_t, fitness_t > & | sum ) |
Performs ALPS-specific post-generation updates.
| [in,out] | pop | the population after evolution |
| [in] | sum | summary statistics of the current generation |
Responsibilities include:
| void ultra::alps_es< E >::after_generation | ( | P & | pop, |
| const summary< individual_t, fitness_t > & | sum ) |
Performs ALPS-specific post-generation updates.
| [in,out] | pop | the population after evolution |
| [in] | sum | summary statistics of the current generation |
Responsibilities include:
Initialises individual ages for ALPS.
| [in,out] | pop | the population to initialise |
Sets the initial age of all individuals in the population according to ALPS rules.
Initialises individual ages for ALPS.
| [in,out] | pop | the population to initialise |
Sets the initial age of all individuals in the population according to ALPS rules.
|
nodiscardnoexcept |
Returns the maximum useful parallelism for ALPS.
ALPS can add or remove layers at generation boundaries. Therefore the initial number of layers is not a stable upper bound for the whole run. Returning the hardware concurrency lets the evolution driver keep enough workers available for layers introduced later during evolution.
|
noexcept |
Returns the maximum useful parallelism for ALPS.
ALPS can add or remove layers at generation boundaries. Therefore the initial number of layers is not a stable upper bound for the whole run. Returning the hardware concurrency lets the evolution driver keep enough workers available for layers introduced later during evolution.
|
nodiscard |
Assembles one ALPS evolutionary step.
| P | population type |
| [in] | pop | a population. Operations are performed on sub-populations of pop |
| [in] | iter | iterator to the active age layer |
| [in] | starting_status | evolutionary status snapshot |
Builds a callable object encapsulating one iteration of the ALPS evolutionary process for a specific layer.
The returned callable performs:
| auto ultra::alps_es< E >::operations | ( | P & | pop, |
| typename P::layer_iter | iter, | ||
| const evolution_status< individual_t, fitness_t > & | starting_status ) const |
Assembles one ALPS evolutionary step.
| P | population type |
| [in] | pop | a population. Operations are performed on sub-populations of pop |
| [in] | iter | iterator to the active age layer |
| [in] | starting_status | evolutionary status snapshot |
Builds a callable object encapsulating one iteration of the ALPS evolutionary process for a specific layer.
The returned callable performs:
|
nodiscardnoexcept |
Returns the ALPS layer eligible for refinement.
| [in,out] | pop | layered population managed by ALPS |
Refinement is deliberately disabled while the population has fewer than three layers. In that phase ALPS is still dominated by young layers, whose main purpose is exploration and periodic injection of fresh genetic material.
|
noexcept |
Returns the ALPS layer eligible for refinement.
| [in,out] | pop | layered population managed by ALPS |
Refinement is deliberately disabled while the population has fewer than three layers. In that phase ALPS is still dominated by young layers, whose main purpose is exploration and periodic injection of fresh genetic material.
|
staticnodiscard |
Returns strategy defaults derived from an initialised parameter profile.
| [out] | params | generic evolution parameters |
Transforms a fully initialised default profile into strategy-specific defaults.