Friday 26 August 2022

On the order of executing genetic procedures

The classical approach on genetic algorithm design is to generate an initial population and then in every generation to execute Selection, Crossover and then Mutation; in that particular order. I often place Selection last, after Crossover and Mutation. There are pretty good reasons for following any of the two approaches and the answer to the question of which forms the best strategy is as usually case dependant.

By placing Selection first in order, you actually make a cleaning of the population from weak solutions and then go on with the rest of the procedures. If the population contains lots of invalid or bad solutions without any hope that they will generate a good solution via Crossover or Mutation then this strategy is profitable. But in case the initial population covers a small part of the solution space then starting with Selection limits the possibilities of reaching a goal solution.

Placing Selection last enables the search of a larger part of the solution space and finally choose the best of them. Especially on NP-hard problems where the solution space is large, this strategy enables first the exploration of a wide part of the space and then the cleanup which is a more fruitful strategy.