## 2 The Principles of SSA  
In the SSA, a population consisting of \(n\) sparrows can be represented in the following form:  
\[X= \begin{bmatrix}x_{1,1}&x_{1,2}&\cdots&x_{1,d}\\ x_{2,1}&x_{2,2}&\cdots&x_{2,d}\\ \vdots&\vdots&\vdots&\vdots\\ x_{n,1}&x_{n,2}&\cdots&x_{n,d}\end{bmatrix}  \tag{1}\]  
where \(d\) represents the dimensionality of the problem to be solved. The fitness values of all sparrows can be represented in the following form:  
\[F_{X}= \begin{bmatrix}f([x_{1,1}\ x_{1,2}&\cdots&x_{1,d}])\\ f([x_{2,1}\ x_{2,2}&\cdots&x_{2,d}])\\ \vdots\\ \vdots\\ f([x_{n,1}\ x_{n,2}&\cdots&x_{n,d}])\end{bmatrix}  \tag{2}\]  
where \(f\) represents an individual's fitness value, and \(F_{X}\) represents the fitness value of all sparrows. The primary task of the founder in the sparrow population is to search for food in the environment, providing the entire population with the location and direction of the discovered food. Since founders are more likely to find food, the fitness values of producers are superior, and their position in the entire solution space is close to the location of the optimal solution. During each iteration of the search process, the founder updates its position while searching for food, and the specific calculation is expressed with the following equation:  
\[X_{i,j}^{t+1}=\left\{ \begin{array}{ll}X_{i,j}^{t}\cdot\exp(-\frac{i}{\alpha \cdot iter_{\max}})&if\ R_{2}<ST\\ X_{i,j}^{t}+Q\cdot L&if\ R_{2}\geq ST\end{array} \right. \tag{3}\]  
where \(t\) denotes the current iteration number; \(j\) = 1, 2, 3,..., \(d\); \(iter_{\max}\) represents the current maximum iteration count; \(X_{ij}\) represents the position of the \(i\)-th sparrow along the \(j\)-th dimension; and \(\alpha\in(0,1)\) is the uniform random number. \(R_{2}(R_{2}\in[0,1])\) and \(ST\) (\(ST\in[0.5,1]\)) denote the warning value and safety value, respectively. Q is a randomly generated number following a normal distribution, and \(L\) represents a \(1\times d\) matrix, where every element in the matrix is equal to 1. \(R_{2}<ST\) indicates that, in the foraging environment, there are no predators present, allowing the founder to explore freely and extensively. However, \(R_{2}\geq ST\) indicates that certain sparrows within the population have detected predators and signaled warnings to other members. Consequently, all sparrows must promptly relocate to alternative safe locations for foraging. While foraging, certain scroungers consistently observe the founder. Upon realizing that the founder has discovered superior food, they promptly abandon their current position to vie for the food. The position update process for scroungers is outlined as follows:  
\[X_{i,j}^{t+1}=\left\{ \begin{array}{ll}Q\cdot\exp(\frac{X_{worst}-X_{i,j}^{t} }{i^{2}})&if\ i>n/2\\ X_{p}^{t+1}+\left|X_{i,j}^{t}-X_{p}^{t+1}\right|\cdot A^{+}\cdot L&\text{ \emph{otherwise}}\end{array} \right. \tag{4}\]  
where \(X_{p}\) represents the current optimal position held by the founder; \(X_{worst}\) represents the current globally worst position; \(A\) is a \(1\times d\) matrix consisting of elements randomly assigned values of either 1 or \(-1\); and \(A^{+}=A^{T}(AA^{T})^{-1}\). When \(i>n/2\), the \(i\)-th joiner with a lower fitness value has not yet secured food and is in a highly hungry state. Consequently, it must relocate to another area for foraging to replenish its energy. In the simulation experiments, the proportion of sparrows exhibiting danger perception was determined to range between 10% and 20% of the total population. Their initial positions are randomly distributed throughout the entire population, and their mathematical representation is as follows:  
\[X_{i,j}^{t+1}=\left\{ \begin{array}{ll}X_{best}^{t}+\beta\cdot\left|X_{i,j} ^{t}-X_{best}^{t}\right|&if\ f_{i}>f_{g}\\ X_{i,j}^{t}+K\cdot(\frac{\left|X_{i,j}^{t}-X_{worst}^{t}\right|}{(f_{i}-f_{w})+ \varepsilon})&if\ f_{i}=f_{g}\end{array} \right.