This is motivated by a hope that the new population will be fitter than the old one. The offspring replace the old population and a generation is complete. This process is repeated until certain criteria are met. For example, the reproduction will stop until the total number of generations reaches 200. Below is the outline of the basic genetic algorithm.
Crossover occurs with certain probability.
If no crossover is performed, the offspring is an exact copy of one of the parents. If no mutation occurred, the offspring is the direct result of crossover, or a copy of one of the parents 3.4. Use new generated population for a further run of algorithm 5. If the end condition is satisfied, stop, and return the best solution in current population 6. Format of chromosome is called encoding.