|
libstp
Robotics library for Botball
|
DE/rand/1/bin optimizer. Port of DifferentialEvolution.ts. More...
#include <differential_evolution.hpp>
Public Member Functions | |
| DifferentialEvolution (IDifferentialEvolutionRating &rating, int numParams, bool dither=false, std::uint32_t seed=0xC0FFEEu) | |
| std::vector< double > | getBestCandidate () const |
| Best (lowest-rated) parameter vector found so far. | |
| void | createCandidates (const std::vector< double > &initMinParams, const std::vector< double > &initMaxParams, const std::vector< double > &limitMinParams, const std::vector< double > &limitMaxParams) |
| Seed the population uniformly in [initMin, initMax] and rate it. | |
| void | evolutionStep () |
| One generation of mutation / crossover / greedy selection. | |
DE/rand/1/bin optimizer. Port of DifferentialEvolution.ts.
Definition at line 51 of file differential_evolution.hpp.
| libstp::autotune::control::DifferentialEvolution::DifferentialEvolution | ( | IDifferentialEvolutionRating & | rating, |
| int | numParams, | ||
| bool | dither = false, | ||
| std::uint32_t | seed = 0xC0FFEEu ) |
| rating | cost function (minimised). |
| numParams | problem dimensionality. |
| dither | enable per-step random weighting factor. |
| seed | PRNG seed (defaults to a fixed value for reproducibility). |
| void libstp::autotune::control::DifferentialEvolution::createCandidates | ( | const std::vector< double > & | initMinParams, |
| const std::vector< double > & | initMaxParams, | ||
| const std::vector< double > & | limitMinParams, | ||
| const std::vector< double > & | limitMaxParams ) |
Seed the population uniformly in [initMin, initMax] and rate it.
| void libstp::autotune::control::DifferentialEvolution::evolutionStep | ( | ) |
One generation of mutation / crossover / greedy selection.
|
nodiscard |
Best (lowest-rated) parameter vector found so far.