# Analysis and Improvement of Fireworks Algorithm
## 3 Analysis and Improvement of Fireworks Algorithm
### Opposition-Based Learning Population Initialization
```
Initialize the location of the explosion sparks: \(X_{j}=X_{i}\)  Set \(z=\) rand(1,\(d\))  For \(k=1\):\(d\) do  If \(k\)\(\in\)\(z\) then \(X_{j}^{k}=X_{j}^{k}+({X_{b}}^{k}-{x_{j}}^{k})\times t(n)\)  If \({X_{i}}^{k}\) out of bounds \(X_{j}^{k}=X_{min}^{k}+\mid X_{j}^{k}\mid\%(X_{max}^{k}-X_{min}^{k})\)  End if  End if  End for
```
**Algorithm 6**Generating \(t\)-Distribution Mutation Sparks

In the early stage of the algorithm, the value of \(n\) is small and the \(t\)-distribution mutation is similar to Cauchy distribution mutation, and it has a good global exploratory ability. In the later stage of the algorithm, the value of n is large, and the \(t\)-distribution mutation is similar to Gaussian distribution mutation, and it has a good local development ability. In the mid-run of the algorithm, the \(t\)-distribution mutation is between the Cauchy distribution mutation and the Gaussian distribution mutation. Therefore, the \(t\)-distribution combines the advantages of Gaussian distribution and Cauchy distribution, balancing the exploration and exploitation. #### 3.3.2 Elite Opposition-Based Learning

The basic idea of opposition-based learning is as follows: for a feasible solution, we evaluate the opposition-based solution simultaneously, and the optimal solution is selected as the next generation in the current feasible solution and opposition-based solution. Opposition-based learning keeps the diversity of population but large, if all the fireworks produce opposition-based solution, it is blind and increasing the amount of calculation. Therefore, here we choose the optimal individual to perform opposition-based learning. **Definition 5**. : Assume \(X_{best}=(x_{best,1}x_{best,2},...,x_{best,d})\) is a solution of the optimal firework with \(d\) dimensions, where \(x_{best,1}x_{best,2},...,x_{best,d}\)\(\in\)\(R\) and \(x_{



Algorithm 7 is performed for elite opposition-based learning for optimal firework to generate location of sparks. This algorithm is performed \(N_{op}\) times (\(N_{op}\) is a constant to control the number of elite opposition-based sparks). ```
Find the location of optimal firework: \(X_{best}=(x_{1}x_{2}\),...,\(x_{d})\) For \(i=1d\) do  Find \(\min_{i}\) and \(\max_{i}\) of the current search interval on the \(i\) dimension \(\alpha_{best,l}=\text{rand}\times(\min_{i}+\max_{i})-x_{best,i}\) If \(\alpha_{i}\) out of bounds \(\alpha_{i}=X_{min}{}^{i}+\mid\alpha_{i}\mid\%\left(X_{max}{}^{i}-X_{min}{}^{i}\right)\) End if End for
```

**Algorithm 7**Generating Elite Opposition-Based Sparks

### Analysis and Improvement of Selection Strategy

From Equations (4) and (5), the selection strategy is based on the distance measure in FWA. However, this requires that the euclidean distance matrix between any two points in each generation, which will lead to fireworks algorithm time consuming. Based on this, this paper proposes a new selection strategy: Elitism-Disruptive selection strategy. The same as FWA, the Elitism-Disruptive selection also requires that the current best location is always kept for the next iterations. In order to keep the diversity, the remaining \(N-1\) locations are selected based on disruptive selection operator. For location \(X_{i}\), the selection probability \(p_{i}\) is calculated as follows [21]:

\[p_{i}=\frac{Y_{i}}{\sum\limits_{n=1}^{SN}Y_{n}} \tag{17}\]

\[Y_{i}=\left|Y_{i}-Y_{avg}\right| \tag{18}\]

where \(Y_{i}\) is the fitness value of the objective function, \(Y_{avg}\) is the mean of all fitness values of the population in generation \(t\), \(SN\) is the set of all fireworks. The selection probabilities determined by this method can give both good and poor individuals more chances to be selected for the next iteration, while individuals with mid-range fitness values will be eliminated. This method can not only maintain the diversity of the population, reflect the better global searching ability, but also reflect greatly reduce the run-time compared with the FWA. **4.