Skip to content

Commit

Permalink
for problems above 1000-D, use slightly different csigma, ref CMA-ES#97
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel Benazera committed Jan 19, 2015
1 parent 8333abd commit f9b2120
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmaparameters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ namespace libcmaes

_muw = sum_weights*sum_weights / sq_weights;

_csigma = (_muw+2.0)/(Parameters<TGenoPheno>::_dim+_muw+5.0);
if (Parameters<TGenoPheno>::_dim < 1000)
_csigma = (_muw+2.0)/(Parameters<TGenoPheno>::_dim+_muw+5.0);
else _csigma = (std::sqrt(_muw) + 2.0) / (std::sqrt(Parameters<TGenoPheno>::_dim) + std::sqrt(_muw) + 3.0);
_cc = (4.0+_muw/static_cast<double>(Parameters<TGenoPheno>::_dim))/(Parameters<TGenoPheno>::_dim+4.0+2.0*_muw/static_cast<double>(Parameters<TGenoPheno>::_dim));

_c1 = 2.0/(pow((Parameters<TGenoPheno>::_dim+1.3),2)+_muw);
Expand Down

0 comments on commit f9b2120

Please sign in to comment.