# Analysis and Improvement of Fireworks Algorithm
## 3 Analysis and Improvement of Fireworks Algorithm
### Opposition-Based Learning Population Initialization
```
Find the optimal firework from all fireworks of t generation : \(X_{best}\) Calculate the fitness of the optimal firework of t generation : \(Y_{min}(t)\) Calculate the fitness of the optimal firework of last iteration: \(Y_{min}(t-1)\) Calculate the average fitness value of all fireworks of t generation : \(Y_{agg}(t)\) Calculate the population evolution rate : \(a(t)\) Calculate the population aggregation degree : \(b(t)\) For the optimal firework: If \(a(t)\
eq 1\) or \(b(t)=1\) then \(A_{i}=A_{i}\times\) up else \(A_{i}=A_{i}\times\) low End if For the non-optimal fireworks: \(A_{i}\) is calculated by Equation (1)
```
**Algorithm 5**Update Explosion Amplitude

Figure 1 depicts the process of explosion enlargement and reduction during the optimization of the Sphere function. An alternating behavior is noted, with reduction being performed more often, on the one hand because \(up\) and \(low\) are set to 1.2 and 0.9, on the other hand because the initial value of the explosion amplitude is set to the size of the search space, which is a considerable initial value. ### Analysis and Improvement of Gaussian Mutation

[PERSON] pointed out the shortcomings of Gaussian mutation in FWA [10], and proposed a new type to generating location of Gaussian sparks, which is calculated as follows. \[{x_{l}}^{k}={X_{l}}^{k}+({X_{b}}^{k}-{X_{l}}^{k})\times g \tag{13}\]

where \(g\) = Gaussian(0,1), \({X_{b}}^{k}\) is the position of the optimal firework in the \(k\) dimension of the current fireworks population. Cauchy mutation has a strong global search ability due to larger search range, and Gaussian mutation has a strong local development ability with small search range [19]. Therefore, the advantage of Equation (13) is to improve the local development capability of the algorithm, and does not improve the global search ability in the early stage of algorithm. [PERSON] pointed out \(t\)-distribution mutation combined with the two advantages of the Cauchy and Gaussian mutation [20], which has a strong global search ability in the early stage of algorithm and a good local development ability in the later stage of algorithm. From Equation (13), when the optimal firework of the current population is selected for Gaussian mutation exactly, apply it into Equation (13). \[{x_{l}}^{k}={X_{l}}^{k} \tag{14}\]

As we know, the optimal firework is the best information for the current population carrier, but Gaussian mutation does not have any effect on the optimal firework in Equation (14). To sum up, the adaptive \(t\)-distribution mutation is proposed for non-optimal fireworks to effectively keep a better balance between exploration and exploitation. Elite opposition-based learning for optimal firework to make the FWA jump out of the local optimum effectively and accelerate the global search ability. #### 3.3.1 Adaptive \(t\)-Distribution Mutation

\(T\)-distribution, also known as the student's \(t\)-distribution, includes \(n\) degrees of freedom. When \(t\)(\(n\)\(\rightarrow\)\(\infty\)), it is equal to Gaussian(0,1); when \(t\)(\(n\)\(\rightarrow\)1), it is equal to Cauchy(0,1). That is the Gaussian distribution and the Cauchy distribution are two boundary special cases of \(t\)-distribution [20]. Figure 1: Enlargement and reduction of explosion amplitude (on the Sphere function). **Definition 4**. : Adaptive \(t\)-distribution mutation for non-optimal fireworks is used to generate location of sparks as follows. \[{x_{i}}^{k}={X_{i}}^{k}+({X_{b}}^{k}-{X_{i}}^{k})\times t(n) \tag{15}\]

where \(n\) is the number of iterations, that is the number of iterations is the freedom of \(t\)-distribution. Algorithm 6 is performed for Adaptive \(t\)-distribution mutation for non-optimal fireworks to generate location of sparks as follows.