The GA then calculates whether crossover should take place using a parameter called the crossover probability . This is simply a probability value p and is calculated by flipping a weighted coin. These child strings are then placed in the new population. As an example, say that the strings 10000 and 01110 are selected for crossover and the GA decides to mate them. The GA selects a splcing point of 3.
Crossover is performed until the new population is created.
Then the cycle starts again with selection. Mutation Selection and crossover alone can obviously generate a staggering amount of differing strings. However, depending on the initial population chosen, there may not be enough variety of strings to ensure the GA sees the entire problem space. Or the GA may find itself converging on strings that are not quite close to the optimum it seeks due to a bad initial population. The GA has a mutation probability , m , which dictates the frequency at which mutation occurs.