[BibTeX] cite as:
Nikolaus Hansen, Youhei Akimoto, and Petr Baudis. CMA-ES/pycma on Github. Zenodo, DOI:10.5281/zenodo.2559634, February 2019.
pycma
is a Python implementation of CMA-ES and a few related numerical optimization tools.
The Covariance Matrix Adaptation Evolution Strategy (CMA-ES) is a stochastic derivative-free numerical optimization algorithm for difficult (non-convex, ill-conditioned, multi-modal, rugged, noisy) optimization problems in continuous search spaces.
Useful links:
Installation of the (almost) latest release
Type
python -m pip install cma
in a system shell to install the latest release from the Python Package Index (PyPI) (which may be behind the lastest release tag on Github). The release link also provides more installation hints and a quick start guide.
conda install --channel cma-es cma
installs from the conda cloud channel cma-es
.
The quick way (requires git to be installed):
pip install git+https://github.com/CMA-ES/pycma.git@master
The long version: download and unzip the code (see green button above) or
git clone https://github.com/CMA-ES/pycma.git
and
-
either, copy (or move) the
cma
source code folder into a folder visible to Python, namely a folder which is in the Python path (e.g. the current folder). Then,import cma
works without any further installation. -
or, install the
cma
package by typing within the folder, where thecma
source code folder is visible,pip install -e cma
Moving the
cma
folder away from its location would invalidate this installation.
It may be necessary to replace pip
with python -m pip
and/or prefixing
either of these with sudo
.
-
Release
3.0.3
provides parallelization withOOOptimizer.optimize(..., n_jobs=...)
(fix for3.0.1/2
) and improvedpickle
support. -
Release
3.0.0
provides non-linear constraints handling, improved plotting and termination options and better resilience to injecting bad solutions, and further various fixes. -
Version
2.7.1
allows for a list of termination callbacks and a light copy ofCMAEvolutionStrategy
instances. -
Release
2.7.0
logger now writes into a folder, new fitness model module, various fixes. -
Release
2.6.1
allow possibly much larger condition numbers, fix corner case with growing more-to-write list. -
Release
2.6.0
allows initial solutionx0
to be a callable. -
Version
2.4.2
added the functioncma.fmin2
which, similar tocma.purecma.fmin
, returns(x_best:numpy.ndarray, es:cma.CMAEvolutionStrategy)
instead of a 10-tuple likecma.fmin
. The result 10-tuple is accessible ines.result
:
namedtuple
. -
Version
2.4.1
includedbbob
testbed. -
Version
2.2.0
added VkD CMA-ES to the master branch. -
Version
2.*
is a multi-file split-up of the original module. -
Version
1.x.*
is a one file implementation and not available in the history of this repository. The latest1.*
version1.1.7
can be found here.