Skip to main content
. 2022 Aug 22;10(8):2052. doi: 10.3390/biomedicines10082052
Algorithm 1: Pseudo-code of SMA
Begin
 Initialize the parameters: Max_iter, N
 Initialize slime mould population X
 While t Max_iter
  Calculate the fitness of each individual in the slime mould
  Update best fitness and the Xb
  Calculate the weight W according to Equation (3)
  Calculate a according to Equation (4)
  Calculate b according to Equation (5)
  For i=1,2, ,N (each search agent)
   Update p according to Equation (2)
   Update vb, vc based on a and b, respectively
   Update the positions according to Equation (1)
  EndFor
  iteration = iteration + 1
 EndWhile
 Return the best fitness and Xb
End