A C++ BIPOP-aCMA-ES library (with Eigen
as Math Library).
This is a C++11/Eigen implementation of the BIPOP-aCMA-ES algorithm. The algorithm is referenced from "The CMA Evolution Strategy: A Tutorial, Nikolaus Hansen, 2016". Apparently, he has a new setting for the default negative weights (since 2016).
The compile time is reduced for the purpose of quick editing and running own flavors of CMA-ES (or inspection). The source code is short and follows a linear execution path (i.e. little branching).
The heavy duty work is mostly done by Eigen
BLAS level 2 and BLAS level 3. One eigenvalue/eigenvector decomposition for real symmetric matrices is done by a LAPACK module dsyevd
- which uses the 'divide-and-conquer' algorithm that computes different results than the standard method but it is faster for larger matrices.
Here is a little info about critical methods in the main thread:
N
= Number of parameters. (Usually < 200)
M
= Number of offsprings. (Can grow as much as 2^13)
- O(N*M): sampling of standard normal random variables via mersenne-twister.
- O(N*N*M): dgemm
- O(N^3): dgemm
- O(log2 M): sorting UNOPTIMIZED SO FAR. USE OF STL
sort
.
- O(M): evaluation of cost-function. DANGEROUS BECAUSE USER-PROVIDED.
- O(N^3): divide-and-conquer eigen decomposition.
- Optimize sampling of random variables.
- Optimize sorting (with preservation of indices).
- Avoid array resizing by allocating a sufficient reservation memory.
Have a look at the CMake file.
- Eigen
Feel free to contact me if you have questions or just want to chat about it.