Open bheijden opened 9 months ago
Closing because duplicate of #45.
On second thought, I do re-open this issue, because the solution I propose could potentially be a permanent fix that does not require extra work from the user.
Feel free to close if you think it's not worth the effort!
Hi,
Great work on the toolkit!
I encountered a problem while employing the CMA-ES algorithm. Specifically, one parameter had a standard deviation of approximately
1e-6
, resulting in a variance of1e-12
. This level of precision exceeded the capabilities of thefloat32
data type, rendering it inadequate for representing the covariance matrix accurately. Consequently, this limitation caused the generation of samples with zero variance. Although rescaling the covariance matrix was a potential solution, I opted to implement the algorithm usingfloat64
precision as a preliminary measure with:However, this approach led to a type mismatch error between float32 and float64, caused by a specific value set as float32 data type, as indicated here:
The fix below to this line resolves the problem. Other strategies may also be affected.
MWE: