icaros-usc / pyribs

A bare-bones Python library for quality diversity optimization.
https://pyribs.org
MIT License
210 stars 35 forks source link

[BUG] Review CMA-ES implementation #121

Open btjanaka opened 3 years ago

btjanaka commented 3 years ago

Description

It seems we may have some errors in the CMA-ES implementation.

For instance, when calculating covariance matrix update (https://github.com/icaros-usc/pyribs/blob/master/ribs/emitters/opt/_cma_es.py#L264), we don't multiply by the sum of the weights, but it looks like they do this in pycma (https://github.com/CMA-ES/pycma/blob/master/cma/purecma.py#L417). This does not matter since the weights sum to 1 anyway, but this would be an issue when implementing active CMA-ES (#85).

As such, we should go thru the CMA-ES implementation and check that it matches the purecma implementation in pycma.

tehqin commented 3 years ago

This value is always one. But we should add this when we implement active-CMA-ES.