Classical approach - Canonical genetic algorithm:
However returning to the classical approach, as there example, whether solving a particular problem involved finding a set of five integers between 1 and 100 after then the search space for a GA would be bits strings when the first eight bits are decoded as the first integer so the next eight bits become the second integer and so on. Therefore representing the solutions is one of the tricky parts to using genetic algorithms hence a problem we come back to later. Thus by assuming that the solutions are represented such as strings of length L.
After then, in the standard approach to GAs, called as the canonical genetic algorithm where the first stage is to generate an initial random population of bit strings of length L. Through random selection here means that the ones and zeros in the strings are chosen at random. Therefore sometimes, not often that the initialization procedure is done by a little more intelligence, as in e..g., utilizing some additional knowledge just about the domain to choose the initial population.
Just after the initialization step then the canonical genetic algorithm proceeds iteratively utilizing selection, mating, and recombination processes and then checking for termination.
In such a scenario the next section where we look in detail that at how individuals are selected, mated, recombined as and mutated for good measure. Through termination of the algorithm may occur whether one or more of the best individuals in the current generation performs well enough with respect to the problem, according this performance specified through the user.