Skip to main content
. 2024 Jan 4;9(1):31. doi: 10.3390/biomimetics9010031
Algorithm 1: Pseudo-code of SMA
1. Initialize the parameters z,max_t,N,Dim;
2. Initialize slime mould’s random location Xi(i=1,2,,N);
3. While (tmax_t)
4.  Check the boundary and determine the fitness S;
5.  Sort the fitness S;
6.  Update bF,wF,DF,Xb;
7.  Calculate W as per Equation (4);
8.  Update p,vb,vc,A,B;
9.  For each search agents
10.   Update location as per Equation (1);
11.  End For
12.  t=t+1;
13. End While
14. Return DF,Xb;