We follow an elitist approach. That is, from a population of individuals, the fittest individual is passed to the next generation. The remaining individuals form the pool from which the new generation offspring are created. We randomly select two individuals from the mating pool whose fitness is over a randomly determined value. Then we apply crossover and mutation on them to generate new individuals:
begin
counter := 0;
repeat
r := generate a random number;
i := find the first individual whose fitnessr;
r' := generate a random number;
i' := find the first individual whose fitnessr';
apply crossover operator on i and i';
apply mutation operator on i and i';
counter := counter+1;
until counter = population_size / 2
end