Fixed problem in RankMuCMA mutator with large ranges
This commit is contained in:
parent
a9a8559e69
commit
29c655f874
@ -82,7 +82,9 @@ public class MutateESRankMuCMA implements InterfaceMutationGenerational, Seriali
|
||||
*/
|
||||
private double getInitSigma(Population initGen) {
|
||||
switch (initialSig) {
|
||||
case avgInitialDistance: return initGen.getPopulationMeasures()[0];
|
||||
case avgInitialDistance:
|
||||
// scaled by average range as the measures are normed
|
||||
return initGen.getPopulationMeasures()[0]*getAvgRange();
|
||||
case halfRange: return getAvgRange()/2.;
|
||||
default: return 0.2;
|
||||
}
|
||||
@ -181,8 +183,11 @@ public class MutateESRankMuCMA implements InterfaceMutationGenerational, Seriali
|
||||
if (TRACE_2) System.out.println("Aft: C is \n" + mC.toString());
|
||||
|
||||
/* update of sigma */
|
||||
sigma *= Math.exp(((psNorm / expRandStepLen) - 1) * getCs()
|
||||
double sigFact = Math.exp(((psNorm / expRandStepLen) - 1) * getCs()
|
||||
/ getDamps());
|
||||
if (Double.isInfinite(sigFact)) sigma *= 10.; // in larger search spaces sigma tends to explode after init.
|
||||
else sigma *= sigFact;
|
||||
|
||||
if (Double.isInfinite(sigma) || Double.isNaN(sigma)) {
|
||||
System.err.println("Error, unstable sigma!");
|
||||
}
|
||||
|
@ -873,7 +873,8 @@ public class Population extends ArrayList implements PopulationInterface, Clonea
|
||||
|
||||
/**
|
||||
* Returns the average, minimal and maximal phenotypic individual distance as diversity measure for the population.
|
||||
*
|
||||
* Distances are thus scaled by the problem range.
|
||||
*
|
||||
* @return the average, minimal and maximal mean distance of individuals in an array of three
|
||||
*/
|
||||
public double[] getPopulationMeasures() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user