Skip to main content
. 2026 Feb 16;16(4):625. doi: 10.3390/ani16040625
Algorithm 1 The Improved Tuna School Optimization Algorithm
  • Input: 

    the population size NP and maximum iteration tmax

  •   1:

    Assign free parameters a and z

  •   2:

    Sine-Logistic chaotic map initialization population of tunas Xiint(i=1,2,…,NP)

  •   3:

    while t<tmax do

  •   4:

       Calculate the fitness values of tunas

  •   5:

       Update Xbestt

  •   6:

       for each tuna do

  •   7:

         Update α1, α2, p

  •   8:

         if rand<z then

  •   9:

            Update the position Xit+1 using Equation (14)

  • 10:

         else

  • 11:

            if rand<0.5 then

  • 12:

              if (t/tmax)<rand then

  • 13:

                  Update the position Xit+1 using Equation (15)

  • 14:

              else

  • 15:

                  Update the position Xit+1 using Equation (3)

  • 16:

              end if

  • 17:

            else

  • 18:

                Update the position Xit+1 using Equation (21)

  • 19:

            end if

  • 20:

         end if

  • 21:

       end for

  • 22:

       t=t+1

  • 23:

    end while

  • Output: 

    the location of food (the best individual Xbest) and its fitness value