Skip to content

Commit

Permalink
fixed auto init of TPA, ref CMA-ES#88, CMA-ES#103
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel Benazera committed Feb 6, 2015
1 parent c4dcee3 commit 15a654a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmaparameters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ namespace libcmaes
void CMAParameters<TGenoPheno>::set_tpa(const int &b)
{
this->_tpa = b;
if (this->_tpa > 0)
if (this->_tpa == 2)
_dsigma = 4 - 3.6 / std::sqrt(Parameters<TGenoPheno>::_dim);
else if (!this->_vd)
_dsigma = 1.0+_csigma+2.0*std::max(0.0,sqrt((_muw-1)/(Parameters<TGenoPheno>::_dim+1))-1); // default
Expand Down

0 comments on commit 15a654a

Please sign in to comment.