CMA-ES / pycma

Python implementation of CMA-ES

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`seed=0` might not fix the optimisation result

nzw0301 opened this issue · comments

When I use seed=0 to fix the optimisation results, it works except for seed=0. However, when I used seed=0, the results differ. The minimal reproducible code would be as follows:

import cma

es = cma.CMAEvolutionStrategy(8 * [0], 0.5, inopts={"seed": 0})
es.optimize(cma.ff.rosen)

I suppose the first condition at

if not opts['seed'] or opts['seed'] is time:
become False when seed=0, as a result, the seed value is not used as I expected.


Related versions:

Python: 3.10.9
pycma: 3.3.0

Sorry, this was the intended behaviour according to #111; let me close this issue.