RobertTLange / code-and-blog

Some small scale experiments for my blog posts 📝

Home Page:https://roberttlange.github.io/year-archive/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

y_w in CMA-ES

namheegordonkim opened this issue · comments

Hi Robert,

Thanks for the super helpful implementation guide for CMA-ES in JAX. I came across an inconsistency in the implementation about the variable y_w in your code.

Eq. 45 from Hansen's tutorial looks like this

image

Eq. 41 defines $\left<y\right>_w$ as follows:

image

which is "step of the distribution mean disregarding step-size σ". The pure-python implementation you link in your tutorial honours Eq. 41.

https://github.com/CyberAgentAILab/cmaes/blob/7508e8a7fea0102932a6d57f4a7be528cce306e4/cmaes/_cma.py#L336

However, it seems that y_w is divided by the step size in your implementation.

image

Am I missing something here? I'm not entirely sure how big of a difference this makes either.

Aha, I misread the notation for $y_{1:\lambda}$. My apologies.

No worries and thank you for the kind words and being such an active reader 🤗