How to avoid repeating function evaluations when using ga?

2 visualizaciones (últimos 30 días)
Schuyler Hinman
Schuyler Hinman el 10 de Mayo de 2015
Respondida: Alan Weiss el 11 de Mayo de 2015
Hi,
I have noticed when using ga() that fitness values for the same optimization input will be evaluated multiple times. For example, when an elite gets passed from one generation to the next, it gets evaluated again in the next generation. This creates significant decrease in efficiency for me as my fitness function is a CFD code that takes approximately a minute to complete. This also really ends up slowing down the progress of the optimization as the results start to converge (ie. the mean fitness value approaches the best). Since alot of the population members start to be the same.
Is there an option to tell the genetic algorithm to not repeat the function evaluation? Or perhaps is this not happening and I am way off? Any insight would be useful for me.
W. S. H.

Respuestas (1)

Alan Weiss
Alan Weiss el 11 de Mayo de 2015
As far as I know, there is no built-in option for ga to avoid repeated evaluation of the same point. Sorry.
I bet that you would be happier using patternsearch, which does have a Cache option that you can set to 'on' using psoptimset. This avoids repeated evaluation of the same point. And you would probably be happier using patternsearch in any case, as it is usually faster and more robust and easier to tune than ga.
If your problem has finite bounds on all variables, you can get initial points for patternsearch using the code
x0 = lb + rand(size(lb)).*(ub - lb);
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by