## 2 Materials and Methods  
### Slime Mold Algorithm  
The slime mold algorithm (SMA) [38] is a swarm-based metaheuristic algorithm recently developed by [PERSON] et al. The algorithm simulates a range of behaviors for foraging by the slime mold. The negative and positive feedbacks of the slime mold using a biological oscillator to propagate waves during foraging for a food source are simulated by the SMA using adaptive weights. Three special behaviors of the slime mold are mathematically formulated in the SMA: approaching food, wrapping food, and grabbing food. The process of approaching food can be expressed as  
\[Xi(t+1)=\left\{\begin{array}{cc}Xb(t)+vb\cdot(W\cdot XA(t)-XB(t)),&r<p\\ vc\cdot Xi(t),&r\geq p\end{array}\right. \tag{1}\]  
where \(t\) is the number of current iterations, \(X_{i}(t+1)\) is the newly generated position, \(Xb(t)\) denotes the best position found by the slime mold in iteration \(t\), \(X_{A}(t)\) and \(X_{B}(t)\) are two random positions selected from the population of slime mold, and \(r\) is a random value in \([0,1]\).  
\(vb\) and \(vs.c\) are the coefficients that simulate the oscillation and contraction mode of slime mold, respectively, and \(vs.c\) is designed to linearly decrease from one to zero during the iterations. The range of \(vb\) is from \(-a\) to \(a\), and the computational formula of \(a\) is  
\[a=\text{arctanh}\bigg{(}1-\frac{t}{T}\bigg{)} \tag{2}\]  
where \(T\) is the maximum number of iterations.  
According to Equations (1) and (2), it can be seen that as the number of iterations increases, the slime mold will wrap the food.  
\(W\) is a significantly important factor that indicates the weight of the slime mold, and it is calculated as follows:  
\[W(SnellIndex\;(i))=\left\{\begin{array}{cc}1+\text{rand}\;\cdot\log\bigg{(} \frac{bF-S(i)}{bF-wF}+1\bigg{)},i\leq N/2\\ 1-\text{rand}\;\cdot\log\bigg{(}\frac{bF-S(i)}{bF-wF}+1\bigg{)},i>N/2\end{array}\right. \tag{3}\]  
\[SnellIndex\;(i)=Sort(S(i)) \tag{4}\]  
where \(N\) is the size of the population, \(i\) represents the \(i\)-th individual in the population, \(i\in 1,2\ldots N\), \(rand\) denotes the random value in the interval of \([0,1]\), \(bF\) denotes the optimal fitness obtained in the current iterative process, \(wF\) denotes the worst fitness value obtained in the iterative process currently, \(S(i)\) represents the fitness of \(X\), \(SnellIndex\) denotes the sequence of fitness values sorted.  
\[p=\tanh|S(i)-DF| \tag{5}\]  
where \(DF\) denotes the best fitness obtained in all iterations.  
Finally, when the slime mold has found the food, it still has a certain chance \(z\) to search other new food, which is formulated as  
\[X(t+1)=\text{rand}\cdot(UB-LB)+LB,r_{2}<z \tag{6}\]  
where \(UB\) and \(LB\) are the upper and lower limits, respectively, and \(r_{2}\) implies a random value in the region \([0,1]\). \(z\) is set to 0.03 in original SMA.  
Finally, the pseudo-code of SMA is given in Algorithm 1.  
```
Input: Population size \(N\), Maximum number of iteration \(MaxIt\). Output: The best location \(X_{b}\), the best fitness value \(bestFitness\).
1 Initialize the parameters popsize(\(N\));
2 Initialize the positions of slime mold \(X_{i}(i=1,2,3\dots,N)\) ;
3 while\(t<MaxIt\)do
4 Calculate the fitness of all slime molds;
5 Update \(bestFitness\),\(X_{b}\);
6 Calculate the \(W\) by Equation (3);
7 foreachachslime molddo
8 if\(r_{2}\)<\(z\)then
9 update the position using Equation (6);
10 else
11 Update \(p\), \(vb\), and \(vc\);
12 Update position by Equation (1);
13
14 end if
15
16 end for
17\(t=t+1\);
18
19 end for return\(bestFitness\),\(X_{b}\)
```  
**Algorithm 1**Pseudo-code of the slime mold algorithm (SMA)