PaGMO
1.1.5
|
MDE_pBX - Differential Evolution variant. More...
#include <mde_pbx.h>
Public Member Functions | |
mde_pbx (int=100, double=0.15, double=1.5, double=1e-30, double=1e-30) | |
Constructor. More... | |
base_ptr | clone () const |
Clone method. | |
void | evolve (population &) const |
Evolve implementation. More... | |
std::string | get_name () const |
Algorithm name. | |
Public Member Functions inherited from pagmo::algorithm::base | |
base () | |
Default constructor. More... | |
virtual | ~base () |
Trivial destructor. More... | |
std::string | human_readable () const |
Return human readable representation of the algorithm. More... | |
void | set_screen_output (const bool p) |
Setter-Getter for protected m_screen_output data. More... | |
bool | get_screen_output () const |
Gets screen output. More... | |
void | reset_rngs (const unsigned int) const |
Resets the seed of the internal rngs using a user-provided seed. More... | |
Protected Member Functions | |
std::string | human_readable_extra () const |
Extra human readable algorithm info. More... | |
double | powermean (std::vector< double >, double) const |
Computes the powermean of a set given as a vector. | |
Friends | |
class | boost::serialization::access |
Additional Inherited Members | |
Protected Attributes inherited from pagmo::algorithm::base | |
bool | m_screen_output |
Indicates to the derived class whether to print stuff on screen. | |
rng_double | m_drng |
Random number generator for double-precision floating point values. | |
rng_uint32 | m_urng |
Random number generator for unsigned integer values. | |
unsigned int | m_fevals |
A counter for the number of function evaluations. | |
MDE_pBX - Differential Evolution variant.
MDE_pBX is a member of the Differential Evolution (pagmo::algorithm::de) algorithms. It uses the mutation scheme DE/current-to-gr_best/1 which takes the best individual on a q% sample of the complete population for the generation of the donor vector (by default: q% = 15%). The crossover scheme used is p-best crossover which uses a random vector choosen uniformly out of the p best individual from the population. The fitness scale Factor F and Crossover Probability Cr are adapted each generation and thus do not need to be provided as input. For each individual, Cr and F are drawn from a random distributions, defined by Cr_m and F_m. Each time, an individual with better fitness is created, the corresponding values for F and Cr are memorized. After one evolution step, the powermean of all these memorized successful factors is used to perturb the original random distributions, in order to generate better Cr and F in the next generation.
NOTE: No memory parameter is used, since the algorithm depends on the current generation (it is recommended to use a high number of generations in order to exploit this adaptive feature. Running this algorithm 1000 times with just 10 Generations consecutively on the same population will yield different results than i.e. evolving just once but for 10000 Generations!)
pagmo::algorithm::mde_pbx::mde_pbx | ( | int | gen = 100 , |
double | qperc = 0.15 , |
||
double | nexp = 1.5 , |
||
double | ftol = 1e-30 , |
||
double | xtol = 1e-30 |
||
) |
Constructor.
Allows to specify in detail all the parameters of the algorithm.
[in] | gen | number of generations. |
[in] | qperc | percentage of population to choose the best vector |
[in] | nexp | exponent for the powermean |
[in] | ftol | stopping criteria on the x tolerance |
[in] | xtol | stopping criteria on the f tolerance |
value_error | if f,cr are not in the [0,1] interval, strategy is not one of 1 .. 10, gen is negative |
Definition at line 56 of file mde_pbx.cpp.
|
virtual |
Evolve implementation.
Run the MDE_pBX algorithm for the number of generations specified in the constructors. At each improvments velocity is also updated.
[in,out] | pop | input/output pagmo::population to be evolved. |
Implements pagmo::algorithm::base.
Definition at line 82 of file mde_pbx.cpp.
|
protectedvirtual |
Extra human readable algorithm info.
Reimplemented from pagmo::algorithm::base.
Definition at line 325 of file mde_pbx.cpp.