Skip to main content
. 2020 Nov 6;20(21):6333. doi: 10.3390/s20216333
Algorithm 1. Genetic Algorithm pseudo-code.
Pseudo-code of the GA
  • 1:

    Initialise the populations;

  • 2:

    Evaluate the initial population through fitness function;

  • 3:

    for (iteration < MaxIteration) do

  • 4:

    while (not meet the stopping criteria) do

  • 5:

      Select the elitists for next generation;

  • 6:

      Crossover

  • 7:

      Mutation

  • 8:

     end while

  • 9:

     Evaluate the new population fitness;

  • 10:

    end for

  • 11:

    Output the best solutions;