# A Novel Adaptive Sparrow Search Algorithm Based on Chaotic Mapping and T-Distribution Mutation
## 2 Basic SSA  
The SSA algorithm is a new swarm intelligence optimization algorithm, which is inspired by foraging behavior of sparrows, anti-predation behavior and swarm intelligence. The foraging process of sparrows can be visually abstracted as a discoverer-joiner model. The discoverer is responsible for looking for food for the population and providing foraging areas and directions for the entire sparrow population, while joiners obtain food by taking advantage of discovers. In order to obtain food, sparrows can usually forage for food using two behavioral strategies: discoverer and joiner. Individuals will monitor the behavior of other individuals in the population, and attackers will compete with high-intake companions for food resources to increase their predation rate. In addition, when the sparrow population is aware of danger, it will assume anti-predator behavior. The matrix representation of the sparrow set is described as follows. \[X=[x_{1},x_{2}\ldots x_{N}]^{T} \tag{1}\]  
\[x_{i}=[x_{i,1},x_{i,2},\ldots,x_{i,d}] \tag{2}\]  
where, \(X\) represents the size of the sparrow population, and \(d\) represents the dimension of the variable. The fitness matrix of the sparrow is expressed as follows. \[f(x_{i})=[f(x_{i,1}),f(x_{i,2}),\ldots,f(x_{i,d})] \tag{3}\]  
\[F_{x}=[f(x_{1}),f(x_{2})\ldots f(x_{N})]^{T} \tag{4}\]  
where, \(N\) represents the size of the sparrow population, \(f(x_{i})\) represents the fitness value of each individual, and \(F_{x}\) represents matrix of individual fitness values. The sparrow with the best fitness value is given priority to get food, and points out the direction to the food for other individuals as the discoverer. The location of the discoverer is updated as follows. \[X_{i,j}^{t+1}=\left\{ \begin{array}{ll}X_{i,j}^{t}\cdot\exp(\frac{-i}{\pi \cdot iter_{\max}}),&if\ R_{2}<ST\\ X_{i,j}^{t}+Q\cdot L,&if\ R_{2}\geq ST\end{array} \right. \tag{5}\]  
where, \(t\) represents the current number of iterations, \(j=(1,2,\ldots,d)\), and \(X_{i,j}^{t+1}\) represents the position of the \(i\)-th sparrow in the \(j\)-th position. \(iter_{max}\) represents the maximum number of iterations. \(\alpha\in(0,1)\), \(\alpha\) is a random number in the range. \(R_{2}\) and \(ST\) represent the pre-warning and safety values, respectively. \(Q\) is a random number between 0 and 1. \(L\) is a \(1\times d\) matrix of all elements with the value of 1. When \(R_{2}<ST\), it means safety, and the discoverer conducts an extensive search mode. When \(R_{2}\geq ST\), it means that some sparrows have detected natural enemies and need the entire population to go to other safe areas as soon as possible. The location of the joiner is updated as follows. \[X_{i,j}^{t+1}=\left\{ \begin{array}{ll}Q\cdot\exp(\frac{X_{worst}^{t}-X_{i,j}^ {t}}{t^{2}})&i>\frac{N}{2}\\ X_{p}^{t+1}+\left|X_{i,j}^{t}-X_{p}^{t+1}\right|\cdot A^{+}\cdot L&\text{other }\end{array} \right. \tag{6}\]  
where, \(X_{p}\) represents the optimal position of the discoverer. \(X_{worst}^{t}\) denotes the global worst location. A is a matrix of 1\(\times\)d, in which each element is randomly assigned 1 or \(-1\). When \(i>N/2\), it suggests that the \(i\)-th joiner with the worse fitness value is most likely to be starving. The energy value is lower, and they need to go to other areas to find food to supplement their energy. Detection and early warning sparrows are aware of danger, and generally account for 10-20% of the total number of sparrows. Location updates are described 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\left(\frac{|X_{i,j}^{t}-X_{worst}^{t}|}{(f_{i}-f_{w})+ \epsilon}\right)&if\ f_{i}=f_{g}\end{array} \right. \tag{7}\]  
where, \(X_{best}^{t}\) is current global optimal position. \(\beta\) is a normal distribution of random numbers with a mean value of 0 and a variance of 1, which is regarded as the step size control parameter. \(K\in[-1,1]\) is a random number.