Initialize parameters;

Generate a population P randomly;

Nbr_generation 1;

while Nbr_generation max_gen do

Clear the new population P;

Evaluate each individual in P using a fitness function μ(·);

while |P| population_size do

Select two parents from P;

Execute crossover;

Execute mutation;

Place the offspring into P;

End while

P P;

Nbr_generation ++;

end while