Skip to content
Emmanuel Benazera edited this page Jul 3, 2014 · 34 revisions

Welcome to the libcmaes documentation

libcmaes is a multithreaded C++11 library for high performance blackbox stochastic optimization using the CMA-ES algorithm for Covariance Matrix Adaptation Evolution Strategy.

It is especially useful and efficient for finding minimums and maximums of possibly complex, non-separable, non-derivable functions.

The library exposes a set of simple structures to the user. Below, the function to be optimized is refered to as the objective function, whose parameters define the state-space into which the search for solution takes place. The hyper-parameters are the set of parameters that govern the CMA-ES algorithm: some have their value determined automatically, and others can be overridden by the user.

1. Building and installing libcmaes

Dependencies:

  • eigen for all matrix operations;
  • glog for logging events and debug (optional);
  • gflags for command line parsing (optional);
  • gtest for unit testing (optional).
sudo apt-get install libgoogle-glog-dev libgflags-dev libeigen3-dev

For compiling with basic options enabled:

./autogen.sh
./configure
make

To specify the location of your Eigen header repository, do:

./configure --with-eigen3-include=/path/to/eigen3
make

In order to install in a repository of your choice, for instance your home, do:

./configure --prefix=/home/username
make
make install

The installed files will be found in /home/username/include and /home/username/lib

All available options to configure can be listed with:

./configure --help

2. Quick start

3. Library structures and API

4. Using libcmaes

  1. Optimizing a function
  2. Visualizing optimization results and convergence
  3. Defining and using bounds on parameters
  4. Using parameter space transforms known as genotype/phenotype transforms
  5. Using a custom progress function
  6. Using a user-defined gradient function
  7. Defining a custom algorithm based on libcmaes primitives
  8. Compiling and running BBOB'2013 benchmark

5. Applications

  1. using CMA-ES in CERN's ROOT
  2. experiments with CMA-ES and neural networks