3.1 The fireworks algorithm
The fireworks algorithm is a parallel explosive optimization algorithm proposed by Tan Ying, inspired by the natural fireworks exploding behavior [
20]. In the fireworks algorithm, the sparks generated by fireworks and their explosions and mutations resemble feasible solutions, and the explosion process simulates the process of optimizing in the current feasible solution domain [
25,
26]. In nature, high-quality fireworks explosions produce more and more sparks, while the inferior fireworks explosions produce much fewer sparks. The fireworks algorithm follows the natural rules: the fitness value is good, the fireworks quality is excellent, the explosion range is small, and the sparks generated are in large quantity. On the other hand, when the fitness value is not good, the fireworks quality is inferior, the explosion range is large, and the sparks generated are limited [
1,
20,
21,
27]. The fireworks algorithm includes explosive sparks, mutation sparks, mapping rules, selection strategies, and other elements [
20].
The explosion operator produces explosion sparks, which play a key role in the fireworks algorithm, whose metrics include explosion intensity, explosion amplitude, and displacement operation [
28,
29]. The explosion intensity is the core of the explosion operator, indicating the quantity of sparks generated during the explosion [
30,
31]. The fireworks based on better fitness value can produce more sparks and avoid them swinging around the optimal value during optimization. The calculation method for the number of sparks is shown in Eq. (
2).
$$\begin{array}{@{}rcl@{}} S_{i}=S \cdot \frac{F_{\text{max}}-f(X_{i})+\epsilon}{\sum\limits_{i=1}^{N}\left(F_{\text{max}}-f\left(X_{i}\right)\right)+\epsilon} \end{array} $$
(2)
Si indicates the number of subgeneration sparks in the ith fireworks. S represents the maximum number of sparks in the fireworks subgeneration. Fmax indicates the worst fitness value of this generation. f(Xi) represents the fitness value of the ith fireworks. ε is a minimal constant, avoiding the divide-by-zero error.
In order to control the number of subgeneration sparks of high quality fireworks and inferior fireworks, fireworks
i is limited, as shown in Eq. (
3).
$$ S_{i}=\left\{ \begin{array}{ll} \text{round}(a\cdot S) \quad \, & {S_{i} \prec a\cdot S}\\ \text{round}(b\cdot S) \quad \, & {S_{i} \succ b\cdot S}\\ \text{round}(S) \quad \, & \text{else}\\ \end{array}\right. $$
(3)
a and b are given constants. round is the integral function, following the principle of rounding.
The explosion amplitude is set to explore the optimum value within a certain range around this generation of fireworks [
32,
33]. The fireworks with poor fitness value can produce sparks in a wider range and avoid “premature” phenomenon [
34,
35]. The calculation method of explosion amplitude is shown in Eq. (
4).
$$ R_{i}=R \cdot \frac{f(X_{i})-F_{\text{min}}+\epsilon}{\sum\limits_{i=1}^{N}\left(f\left(X_{i}\right)-F_{\text{min}}\right)+\epsilon} $$
(4)
Ri indicates the range of the explosion amplitude of the ith fireworks. R shows the maximum range of the fireworks explosion. Fmin represents the best fitness value of the current generation of fireworks.
The displacement operation is performed on each dimension of the fireworks
i according to the explosion intensity and the explosion amplitude [
36,
37], as shown in Eq. (
5).
$$ \Delta X_{i}^{k}=X_{i}^{k}+\text{rand}(0,R_{i}) $$
(5)
\(X_{i}^{k}\) indicates the value of the location vector of fireworks i in the kth dimension. \(\Delta X_{i}^{k}\) represents the value of the location vector of the sparks generated by fireworks i explosion in the kth dimension. rand(0,Ri) indicates the random number between 0 and Ri.
In the fireworks algorithm, the diversity of the population is further improved by the mutation spark. The Gauss distribution is used to preform Gauss mutation on any dimensions of fireworks in the population [
38‐
40]. The calculation method is shown in Eq. (
6).
$$ \nabla X_{i}^{k}=X_{i}^{k} \cdot n $$
(6)
\(\nabla X_{i}^{k}\) indicates the value of the location vector of the sparks produced by fireworks
i Gauss mutation in the
kth dimension.
n obeys the Gauss distribution of the mean value of 1 and the variance of 1, as shown in Eq. (
7).
If fireworks
i is near the boundary of the feasible domain, it may produce sparks across the boundary. Therefore, we use the rule of modular operation to map it back to the feasible domain, as shown in Eq. (
8).
$$ X_{i}^{k} = X_{\text{min}}^{k}+\left|X_{i}^{k}\right|\text{mod}\left(X_{\text{max}}^{k}-X_{\text{min}}^{k}\right) $$
(8)
\(X_{\text {max}}^{k}\) and \(X_{\text {min}}^{k}\) indicate the upper and lower bounds of the location vector of fireworks i in the kth dimension, respectively.
According to the explosion operator and Gauss mutation operator, the current population contains this generation of fireworks, the explosion sparks, and the Gauss mutation sparks. The individuals with the best fitness values are retained to the next generation with probability 1. Then, the rest
N−1 individuals are selected according to the Roulette rule with the probability in Eq. (
9).
$$ P_{i}= \frac{\sum_{j\in K} D_{ij}}{\sum_{i\in K} \sum_{j\in K} D_{ij}} $$
(9)
Pi indicates the probability that fireworks
i is selected.
K is a set of fireworks, explosion sparks, and Gauss mutation sparks.
Dij represents the Euclidean distance between fireworks
i and fireworks
j, as shown in Eq. (
10):
$$ D_{ij}= \sum\limits_{j = 1}^{K} ||X_{i}-X_{j}|| $$
(10)
3.2 The process of adaptive Gaussian mutation
The basic fireworks algorithm increases the diversity of the population through Gauss mutation and uses Gauss distribution to mutate any of the multiple dimensions of the fireworks in the population [
20]. The actual effect of Gauss mutation can be easily influenced by the selected Gauss mutation fireworks and mutation dimensions. Therefore, for having a good fireworks population diversity and short convergence time, the process of Gauss mutation is redesigned.
With a poor fitness value of Gauss mutation, the contribution of the poor fireworks to the mutant becomes too large, thereby reducing the convergence speed of the algorithm. According to Pareto’s rule, the most important part of anything is only 20%, and the remaining 80% are secondary, although they are the majority [
41]. Therefore, in order to ensure that the algorithm has a fast convergence speed, the improved fireworks algorithm randomly selects one of the fireworks for Gauss mutation among the top 20% of the fitness value.
When the fireworks with better fitness value are selected for Gauss mutation, if the mutation dimension constantly remains large, despite the improved diversity of the fireworks population, the contribution of fireworks with better fitness value to the population is reduced, thereby slowing down the convergence speed of the algorithm. In contrast, if the mutation dimension constantly remains small, although the information of the fireworks with better fitness value is retained, the diversity of the fireworks population is also reduced and consequently makes the algorithm fall into the local optimum. Therefore, to guarantee a fast convergence speed while not falling into the local optimal, the adaptive Gauss mutation dimension is presented. The value of the dimension is shown in the Eq. (
11).
$$ z(t+1)=\left\lceil w(t) \times z(t)\right\rceil $$
(11)
w is a nonlinear function that decreases by the iterations
t, as shown in Eq. (
12). Considering that the value of Gauss mutation dimension should be a positive integer, the value of
z(
t+1) is rounded up to
w(
t)×
z(
t).
At the beginning of iteration, w is relatively large, and the corresponding mutation dimension z is also large, which helps improve the diversity of fireworks population and enhances the algorithm with global search. In the later stage of the iteration, the value of w decreases gradually along with the iterations. The corresponding mutation dimension z decreases, the Gauss mutation dimension decreases gradually, and the information of the fireworks with better fitness value is preserved, so that the algorithm achieves optimization in the later stage of the iterations. The improved fireworks algorithm fully plays the role of Gauss mutation, avoiding the waste of resources caused by improper selection of the mutation fireworks and the improper determination of the mutation dimension. Meanwhile, the algorithm improves the ability of global search and convergence speed.