0
votes

I am using genetic algorithm function

ga(fitnessfcn,nvars,.....,options)  

where we can set various parameters for the algorithms using gaoptimset(...). However, I am not able to understand how to set maximum number of objective function evaluations as the stopping criterion for this function.

I found the parameter Generations for stopping criterion, but it sets only the maximum number of generations and each generation has more than one function evaluations.

So, can anyone help me on this?

1

1 Answers

0
votes

If you are talking about a standard genetic algorithm, let's say you have a population of N chromosomes. In each generation, the fitness of each antibody is calculated by calling the evaluation function. So, for G generations, the total number of function evaluations in G*N. So, instead of setting the number of function evaluations, set the number of generations to

G = (desired number of function evaluations) / (population size)

The number of function evaluations is usually used in comparisons instead of the number of generations because:

  • Different algorithms perform different number of function evaluations per generation. For example, immune systems create C clones for each antibody and evaluate the clones, so the number of function evaluations is G*N*C
  • The evaluation function is usually by far the most computationally expensive part of the algorithm.