nojhan / paradiseo

An evolutionary computation framework to (automatically) build fast parallel stochastic optimization solvers
https://nojhan.github.io/paradiseo/
Other
92 stars 33 forks source link

Correction errors found #67

Open BertheasLeo opened 2 years ago

BertheasLeo commented 2 years ago

Hello,

We found 2 errors in the source code.

The first one is due to an error in compilation on windows where sighandler is not defined. We need to add in eo/src/eoSIGContinue.h (line 36) :

#include <csignal>
typedef void (*sighandler_t)(int);
#include "eoContinue.h"

The second one was observed during test on the CMAES algorithm where the solution was converging on a area and at a certain point got a switched and diverged a lot without success to reconverging on a area. We found out that it was due to the covaraince matrix where an utilisation of a eigen fonction wasn't working as it has to be with like it seems to be an "aliasing issue". So in edo/src/edoEstimatorNormalAdaptive.h (line 236):

Matrix mD = eigensolver.eigenvalues().asDiagonal();
// from variance to standard deviations
// Correction
mD = mD.cwiseSqrt();

Thanks

Best regards

nojhan commented 1 year ago

Thanks. The fix being easy to do, don't you want to make a pull request, so as to be credited? Or do you prefer me to do it on your behalf? Or just do it myself and not crediting you?