At this point the genetic algorithm can start generating new populations. Usually, the population size is kept constant for convenience. These steps will now be discussed in detail. This is usually implemented as a weighed selection, which means that individuals with a higher fitness have a better chance of being chosen. It is possible for an individual to be selected more than once, or not at all.
Crossover is the most important mechanism of the algorithm.
It makes two new individuals by somehow combining two old ones. There are several variations of crossover. The most simple version is one-point crossover. It works by selecting a point at which the chomosomes are cut off randomly. The parts that are cut off are then switched to make two new chromosomes.