Under what conditions do the fitness values in the GA solver (genetic algorithm) not fall monotonically over iterations?

1 vue (au cours des 30 derniers jours)
Using MATLAB R2014a, but get similar results for MATLAB 2013b. Global Optimization Toolbox. Options are the following:
optParams.gaOpt = gaoptimset(... 'Display', 'iter', ... 'Generations', 10, ... 'InitialPopulation', {[]}, ... 'PopulationSize', 16, ... 'TimeLimit', 5*60*60,... 'StallGenLimit', 100, ... 'TolFun', 1e-16, ... 'PlotFcns', @gaplotbestf, ... 'MutationFcn', @mutationadaptfeasible, ... 'EliteCount', 1,... 'CrossoverFraction', 0.2, ... 'Vectorized', 'on', ... 'UseParallel', 'never' ... );
I expect that the plotted fitness value from @gaplotbestf to fall monotonically for non-zero EliteCount.
Here's a Mathworks link where the 2nd and 3rd figures show non-monotonic fitness function values:
The problem is when my optimization terminates the result I get is worse than the best possible value found over all iterations. I also worry that the best population member is not carried forward and so does not contribute to improving the optimization.
Best..
  2 commentaires
Rakesh Kumar
Rakesh Kumar le 6 Mai 2014
The new version (R2014a) seems to have a bug (I will investigate more) with default EliteCount value (it is set to zero for smaller population). This is the reason for the example plot to show non-monotone best fitness function value.
Your options setting for EliteCount will not have this bug in R2013b or R2014a.
However, I have some questions about the options settings you posted. You are specifying an initial population as {[]}, a cell array is used to indicate custom population. And at the same time, you are using @mutationadaptfeasible which is for 'doubleVector' population. These options will result in error. Am I missing something here?
Can you post more details about this problem?
Regards, Rakesh
JMB
JMB le 13 Mai 2014
Thanks for the tip Rakesh. I actually set the InitialPopulation to null further down in the code before running the ga. Sorry for the misunderstanding. Everything seems to be working now.

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by