# How to detect that the fitness landscape of a genetic algorithm is changing over time?

I understand that in each generation of a genetic algorithm, that generation must re-prove it's fitness (and then the fittest of that population is taken for the next population).

In this case, I guess it's a presumption that if you take the fittest of each generation, and use them to form the basis of the next generation, that your population as a whole is getting fitter with time.

But algorithmically, how can I detect this? If there's no end goal known, then I can't measure the error/distance from goal? So how can you tell how much each generation is becoming fitter by?

• I'm not sure I fully understand your concerns, but one natural way of measuring the fitness of the population, as a whole, is to calculate the average fitness (or something similar) and plot that as a function of time (number of generations). Is this what you're asking? I don't actually know if this is the best way of doing it, but this is what comes to my mind right now. The other thing I don't understand is why you're confused about how to calculate the fitness. The definition of the fitness really depends on the problem. If you need to define how to calculate it for your problem.
– nbro
Jan 1, 2021 at 19:25