Currently, we only provide our custom implementation of CMA-ES for use with emitters like EvolutionStrategyEmitter. This PR instead makes it possible to use the pycma implementation of CMA-ES, which provides many more features.
In emitters, pycma can now be used by passing es="pycma_es" as an argument.
pycma can be installed separately with pip install cma; this PR also provides an extra for installing it with pip install ribs[pycma]. I have also added cma under the all extra; I believe it is a good idea to have the pycma extra and have cma under the all extra because pycma is fairly stable, so depending on it should be fine.
TODO
[x] Add extra for installing pycma
[x] Register pycma in ribs.emitters.opt
[x] Implement PyCMAEvolutionStrategy
[x] Benchmark PyCMA-ME on sphere -> tends to do slightly better but much slower
[x] Write tests
Example Outputs
(These are fairly consistent across runs)
cma_me_imp (set the es parameter to cma_es or pycma_es inside sphere.py):
Description
Currently, we only provide our custom implementation of CMA-ES for use with emitters like EvolutionStrategyEmitter. This PR instead makes it possible to use the pycma implementation of CMA-ES, which provides many more features.
In emitters, pycma can now be used by passing
es="pycma_es"
as an argument.pycma can be installed separately with
pip install cma
; this PR also provides an extra for installing it withpip install ribs[pycma]
. I have also addedcma
under theall
extra; I believe it is a good idea to have the pycma extra and have cma under the all extra becausepycma
is fairly stable, so depending on it should be fine.TODO
ribs.emitters.opt
Example Outputs
(These are fairly consistent across runs)
cma_me_imp
(set thees
parameter tocma_es
orpycma_es
inside sphere.py):Our CMA-ES:
With pycma CMA-ES:
Status
yapf
pytest
pylint
HISTORY.md