Skip to main content
. 2023 May 24;10(6):639. doi: 10.3390/bioengineering10060639
Algorithm 1 The fundamental steps of the genetic algorithm.
  • 1:

    Initialization:

  • 2:

          Generate and evaluate randomly initial chromosomes.

  • 3:

          Define the control parameters Crossover Rate (CR) and Mutation Rate (MR).

  • 4:

    Repeat

  • 5:

          Selection:

  • 6:

               Select chromosomes depending on the probability values according to selection strategy (best-fits).

  • 7:

          Crossover:

  • 8:

                Produce the new offsprings depends on crossover strategy over CR.

  • 9:

          Mutation:

  • 10:

               Apply the mutation to the new offspring as randomly over MR

  • 11:

         Evaluate the new offsprings.

  • 12:

         Replace least-fit population with new offspring.

  • 13:

         Keep the best offspring in the memory.

  • 14:

    Until (Maximum generation number)