Skip to main content
. 2024 Oct 19;9(10):643. doi: 10.3390/biomimetics9100643
Algorithm 5 HVPIC
Input:
       POP–the final generation of an EA;
       ε–accuracy level;
Output:
  •   S–a set of individuals identified as solutions;

  •  1:

    Initialize a cluster list LC to contain the cluster consisting of all the points, initialize the solution list;

  •  2:

    ph=gbest.fitness //ph is the estimated peak height

  •  3:

    repeat

  •  4:

       Remove the cluster Ch at the head of the clusters list;

  •  5:

       if |Ch|>1 then

  •  6:

           {C1,C2}K-means(Ch,2);

  •  7:

           for i=2 to number of trials do

  •  8:

              {C1,C2}K-means(Ch,2);

  •  9:

              if SSE({C1,C2})<SSE({C1,C2}) then

  • 10:

                  {C1,C2}{C1,C2}

  • 11:

            end if

  • 12:

         end for

  • 13:

       else

  • 14:

         cbesth the best individual in Ch;

  • 15:

         SS{cbesth};

  • 16:

         continue;

  • 17:

       end if

  • 18:

       cbest1 the best individual in C1;

  • 19:

       cbest2 the best individual in C2;

  • 20:

       if hill-valley(cbest1, cbest2)==TRUE then

  • 21:

         if phcbest1.fitnessε then

  • 22:

            LCLC{C1};

  • 23:

         end if

  • 24:

         if phcbest2.fitnessε then

  • 25:

            LCLC{C2};

  • 26:

         end if

  • 27:

       else

  • 28:

         SS{cbesth};

  • 29:

       end if

  • 30:

    until LC=