Skip to main content
. 2022 Nov 21;12(11):2892. doi: 10.3390/diagnostics12112892
Algorithm 2 Stochastic fractal search (SFS) algorithm
  • 1:

    Initialize SFS population Si(i=1,2,,d) with size d, iterations Tmax, fitness function Fn, t=1, SFS parameters

  • 2:

    Calculate fitness function Fn for each Si

  • 3:

    Find best solution as S

  • 4:

    whiletTmaxdo

  • 5:

         for (i=1:i<n+1) do

  • 6:

            Calculate updated best solution as in Equation (5)

  • 7:

         end for

  • 8:

         Update the fitness function Fn for each Si

  • 9:

         Find best solution as S

  • 10:

       Update SFS parameters, t=t+1

  • 11:

    end while

  • 12:

    ReturnS