Algorithm 1. The GA pseudocode.
|
Input: GA parameters
Begin
P←Generate-Initial-Population ();
Best-Solution ←Evaluate-Fitness(P)
while
stopping_criterion is not reached do
Begin
Parents←Selection(P)
Children←Crossover (Parents)
Children←Mutation (Children)
Best-Solution←Evaluate-Fitness (Children)
P←P ∪ Children
End while
End
Output: Best-Solution
|