Begin

Set the parameters; i = 1;

Initialize the population (pop);

while condition is not satisfied Do

Calculate the length of each solution;

shortPath;

pop = selection (pop);

pop = crossover (pop);

pop = mutation (pop);

i = i + 1

End