Skip to main content
. 2019 Oct 10;19(20):4383. doi: 10.3390/s19204383
Algorithm 1. The GA pseudocode.
  1. Input: GA parameters

  2. Begin

  3. P←Generate-Initial-Population ();

  4. Best-Solution ←Evaluate-Fitness(P)

  5. while stopping_criterion is not reached do

  6. Begin

  7.    Parents←Selection(P)

  8.    Children←Crossover (Parents)

  9.    Children←Mutation (Children)

  10.    Best-Solution←Evaluate-Fitness (Children)

  11.    P←P ∪ Children

  12.  End while

  13. End

  14. Output: Best-Solution