How to avoid repeating function evaluations when using ga?

조회 수: 4 (최근 30일)
Schuyler Hinman
Schuyler Hinman 2015년 5월 10일
답변: Alan Weiss 2015년 5월 11일
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.

답변 (1개)

Alan Weiss
Alan Weiss 2015년 5월 11일
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

카테고리

Help CenterFile Exchange에서 Multiobjective Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by