## 2 Materials and Methods
### Explosion  
The \"explosion\" is the key operator of BFWA, which includes the number of sparks and explosion amplitude as two important parameters. The number of sparks during an explosion is used to determine the new firework in the evolution process. The number of sparks is expressed as:  
\[num_{i}\ =\ Num*\frac{Y_{\max}-f(X_{i})+\varepsilon}{\sum\limits_{i}^{N}{(Y_{ \max}-f(X_{i}))}+\varepsilon}, \tag{2}\]  
where \(num_{i}\) is the number of sparks produced by firework \(X_{i}\), and \(Num\) is a constant, which is used to control the number of sparks generated by each firework. Generally, a smaller value of \(Num\) makes it difficult for the BFWA to find the optimal wavelengths, and larger \(Num\) will bring unnecessary computation and affect the evolution speed. In this study, \(Num\) was chosen to be 400, after balancing between a global optimal solution and evolution time through preliminary experiments. \(N\) is the number of fireworks in the population, and \(f(X_{i})\) is used to calculate the fitness value function. \(Y_{\max}\) is the maximum fitness value in the population. To avoid a zero denominator, a minimum constant \(\varepsilon\) is added to the numerator and denominator. \(\varepsilon\) was set to \(1e-38\)[19]. To avoid excessive or few sparks during the operation, the number of sparks generated is limited by using Formula (3):  
\[S_{i}\ =\ \left\{ \begin{array}{ll}S_{\min}&if\ num_{i}<S_{\min}\\ S_{\max}&if\ num_{i}>S_{\max}\\ round(num_{i})&otherwise\end{array} \right., \tag{3}\]  
where \(S_{i}\) is the actual number of sparks produced by firework \(X_{i}\), \(num_{i}\) is the number of sparks calculated based on Formula (2), \(S_{\min}\) is the least number of fireworks in the explosion process, and \(S_{\max}\) is the maximum number of sparks produced by each firework. Through many simulation and data analyses, when the number of sparks produced by fireworks was too large, the amount of calculation was increased. If the number of sparks was too small, however, it will produce an incomplete search in the local analytical domain. Considering all facets comprehensively, \(S_{\min}\) was set to be 10 and \(S_{\max}\) was set to be 40 by trial and error method to find the optimal solution. Explosion amplitude refers to the scope of finding other solutions near a firework, which can control the range of an explosion in the position of fireworks [11]. Compared to the original FWA, in the BFWA explosion amplitude is replaced by explosion radius. The range of finding the best solution is accurate (explosion radius becomes smaller) with the increase of iterations, and the definition of explosion radius \(A_{i}\) is shown as Formula (4) [20]:  
\[A_{i}\ =\ (\frac{T-t}{T})^{expo}(A_{init}-A_{end})+A_{end}, \tag{4}\]  
where \(A_{i}\) is the explosion radius of firework \(X_{i}\), \(T\) is the maximum number of iterations, \(t\) indicates the number of current iterations, and \(A_{init}\) is the maximum radius of the initial firework explosion. \(A_{end}\) is the largest explosion radius of the last firework explosion. \(expo\) is a constant. Considering the complexity and running time of the BFWA, the parameters were selected by some preliminaryexperiments and related references. We found that the BFWA worked quite well at the setting: \(A_{init}=5\), \(A_{end}=50\), \(expo=0.04\)[21]. Generation of Sparks and Selection  
The key step in the selection of optimal wavelengths by BFWA is the generation of new locations. The location of a spark is based on the location of fireworks. The spark location contains a lot of information about fireworks. The spark location can obtain much information that several original fireworks do not have by changing the operation. A total of 94 wavelength positions are used for the selective operation. The steps for generating sparks from a firework \(X_{i}\) are as follows:  
Step 1: \(A_{i}\) is the explosion radius of firework \(X_{i}\), which is calculated from Formula (4).