MATLAB: How to get more information about the GA process

gaoptimization

Hi,
I am working with a GA optimization and I would like to get more information about the optimization performance. To customize it, I want to know obtain: A matrix of the tested individuals and their fitness; A way to know which of the individuals were selected as elite, for crossover, and for mutation.
Many thanks, Eric

Best Answer

The way to monitor an optimization is to use an output function. For ga, there is a special syntax for a custom output function, and the State Structure contains the information that you can monitor. For an example, see Custom Output Function for Genetic Algorithm.
I think that you will see that the state structure does not contain all the information that you mentioned. You can compute some of it yourself (such as the fitness values, and maybe the elite individuals), but you cannot monitor every single detail of the optimization.
I hope that this helps,
Alan Weiss
MATLAB mathematical toolbox documentation