## Materials and Methods  
### Firefly Algorithm and Its Improvements  
#### 2.1.1 Classic Firefly Algorithm  
Firefly Algorithm (FA) is a swarm intelligence optimization algorithm proposed by [PERSON] in 2008 to simulate the group behavior of fireflies [13]. The classic firefly algorithm uses the mutual attraction of fireflies to affect the movement of firefly groups, and has a stronger local attraction feature than the global optimal attraction. The firefly algorithm has few parameters, simple principle and easy operation. When the algorithm is running, the fireflies will automatically be divided into multiple small groups, which makes FA very suitable for nonlinear optimization problems, such as multi-peak, feature extraction, clustering, etc. Therefore, FA is increasingly used to solve important optimization problems in engineering and scientific fields, such as network, image processing, robot trajectory planning and text selection [14; 15; 16]. However, FA also has some defects such as low convergence accuracy, slow convergence speed at the end of the iteration, and is difficult to be away from local optimality [17; 18; 19; 20; 21]. In order to improve the ability of FA, many research scholars have transformed FA, and there are two main ideas for improvement. One is to optimize the parameters of FA, and the other is to combine the excellent ideas of other group optimization algorithms with FA to obtain better search capabilities. [PERSON] [22] proposed the Levy-flight Firefly Algorithm (LFA), which absorbed the distribution characteristics of the long tail in the Levy flight algorithm, and improved the update step strategy of the firefly algorithm. [PERSON] [23] combines the idea of differential evolution with FA. He gathered the poor fireflies together to form new populations, and updated the coordinates of the fireflies through differential evolution, thereby improving the ability of the algorithm to remove local optimality, called the hybrid evolution firefly algorithm (HEFA). The steps of the classic firefly algorithm are as follows:  
1. FA parameters initialization. First, we set the size of the solution space to \(D\), then set an appropriate number of fireflies N according to \(D\). The maximum update number \(tmax\) is set appropriately, and the appropriate absorption coefficient is set according to different media, usually 1; the initial step size \(s\) is usually set to 0.5. The initial attraction \(\beta_{0}\) represents the attraction at the light source (distance \(r=0\)), usually set to 1, and the coordinate of the \(i\)-th firefly is expressed as \(X_{i}\)= (\(x_{i1}\), \(x_{i2}\),..., \(x_{iD}\)). 2. Firefly's attractiveness calculation. According to the coordinates of each firefly and the corresponding fitness evaluation function, the fitness of the firefly is calculated as the brightness of the fireflies. The aim of the firefly algorithm is to find the optimal solution in the objective function, and the brightness of the firefly's position is the firefly's solution in the objective function. When the function is known, the brightness of the firefly can be obtained by introducing the position coordinates of the firefly, which can be used to judge the position of the firefly. Then, based on the brightness, the absorption coefficient and the distance between fireflies the attraction \(\beta\) between fireflies is calculated, as shown below: \[\left\{ \begin{array}{c}\beta(r_{ij})=\beta_{0}\times e^{-r_{ij}^{2}}\\ r_{ij}=\|x_{i}-x_{j}\|\end{array} \right.,\] (1) where \(r_{ij}\) is the distance between two fireflies. Fireflies' location update. According to the calculated attraction, each firefly flies to a more attractive firefly. The update step calculation formula for the \(t\)-th generation fireflies is as follows:  
\[s(t)=s^{t}\cdot\varepsilon^{t}, \tag{2}\]  
where \(s^{t}\) stands for the \(t\)-th step, \(\varepsilon^{t}\) represents the random coefficient of the \(t\)-th generation obeying uniform distribution.