libcmaes 0.10.2
A C++11 library for stochastic optimization with CMA-ES
Loading...
Searching...
No Matches
bipopcmastrategy.h
1
22#ifndef BIPOPCMASTRATEGY_H
23#define BIPOPCMASTRATEGY_H
24
25#include <libcmaes/ipopcmastrategy.h>
26#include <random>
27
28namespace libcmaes
29{
36 template <class TCovarianceUpdate, class TGenoPheno>
37 class CMAES_EXPORT BIPOPCMAStrategy : public IPOPCMAStrategy<TCovarianceUpdate,TGenoPheno>
38 {
39 public:
45 BIPOPCMAStrategy(FitFunc &func,
46 CMAParameters<TGenoPheno> &parameters);
47
54 BIPOPCMAStrategy(FitFunc &func,
55 CMAParameters<TGenoPheno> &parameters,
56 const CMASolutions &solutions);
57
59
63 void tell();
64
72 int optimize(const EvalFunc &evalf,const AskFunc &askf,const TellFunc &tellf);
73
85 {
86 return optimize(std::bind(&BIPOPCMAStrategy<TCovarianceUpdate,TGenoPheno>::eval,this,std::placeholders::_1,std::placeholders::_2),
89 }
90
91 protected:
92 void r1();
93 void r2();
94
95 private:
96 std::mt19937 _gen;
97 std::uniform_real_distribution<> _unif;
98 double _lambda_def;
99 double _lambda_l;
100 double _sigma_init; // to save the original value
101 double _max_fevals; // to save the original value
102 };
103}
104
105#endif
Implementation of the BIPOP flavor of CMA-ES, with restarts that control the population of offsprings...
Definition bipopcmastrategy.h:38
int optimize()
Finds the minimum of the objective function. It makes alternate calls to ask(), tell() and stop() unt...
Definition bipopcmastrategy.h:84
Parameters for various flavors of the CMA-ES algorithm.
Definition cmaparameters.h:37
Holder of the set of evolving solutions from running an instance of CMA-ES.
Definition cmasolutions.h:42
Implementation of the IPOP flavor of CMA-ES, with restarts that linearly increase the population of o...
Definition ipopcmastrategy.h:36
linear scaling of the parameter space to achieve similar sensitivity across all components.
Definition acovarianceupdate.h:30