How to extract overall best individual in Genetic Algorithm

5 views (last 30 days)
Once the Optimization has finished the final result is displayed and the best individual answer can be exported and analysed..
Through the process of optimization there may be at 1 generation where the Overall Best Individual may appear which not necessarily need to be the final generation and due to mutation and crossover may possibly not be replicated again...
EG: Out of 200 generations.. Gen 108 has the best near 0 answer... but Gen 109 till the last Gen, the result is unfortunately not reproduced again due to mutation and crossover even with Elitism on...
Is it possible for me to extract the best individual from E.G. Gen 108?

Accepted Answer

Alan Weiss
Alan Weiss on 10 Mar 2014
As stated in the documentation, if your EliteCount option is set to at least 1 then the best individual will be maintained from one generation to the next. So I am not sure why you would have a better individual at generation 108 than at generation 200, unless the individual at generation 108 was infeasible, which would only happen if you had nonlinear constraints. But with nonlinear constraints you generally have only a few iterations, 5 or so. So I do not understand what you are seeing.
It is possible that you set the EliteCount to zero. It is also possible that you set other options to nondefault values that somehow messed up your optimization. For more detailed help, please give us details on your option settings and the way you called ga.
Alan Weiss
MATLAB mathematical toolbox documentation

More Answers (0)

Community Treasure Hunt

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

Start Hunting!