Opposition-Based Adaptive Fireworks Algorithm

: A ﬁreworks algorithm (FWA) is a recent swarm intelligence algorithm that is inspired by observing ﬁreworks explosions. An adaptive ﬁreworks algorithm (AFWA) proposes additional adaptive amplitudes to improve the performance of the enhanced ﬁreworks algorithm (EFWA). The purpose of this paper is to add opposition-based learning (OBL) to AFWA with the goal of further boosting performance and achieving global optimization. Twelve benchmark functions are tested in use of an opposition-based adaptive ﬁreworks algorithm (OAFWA). The ﬁnal results conclude that OAFWA signiﬁcantly outperformed EFWA and AFWA in terms of solution accuracy. Additionally, OAFWA was compared with a bat algorithm (BA), differential evolution (DE), self-adapting control parameters in differential evolution (jDE), a ﬁreﬂy algorithm (FA), and a standard particle swarm optimization 2011 (SPSO2011) algorithm. The research results indicate that OAFWA ranks the highest of the six algorithms for both solution accuracy and runtime cost.


Introduction
In the past twenty years several swarm intelligence algorithms, inspired by natural phenomena or social behavior, have been proposed to solve various real-world and complex global optimization problems.Observation of the behavior of ants searching for food lead to an ant colony optimization (ACO) [1] algorithm, proposed in 1992.Particle swarm optimization (PSO) [2], announced in 1995, is an algorithm that simulates the behavior of a flock of birds flying to their destination.PSO can be employed in the economic statistical design of X control charts, a class of mixed discrete-continuous nonlinear problems [3] and used in solving multidimensional knapsack problems [4,5], etc. Mimicking the natural adaptations of the biological species, differential evolution (DE) [6] was published in 1997.Inspired by the behavior of the flashing characteristics of fireflies, a firefly algorithm (FA) [7] was presented in 2009, and a bat algorithm (BA) [8] was proposed in 2010 which is based on the echolocation of microbats.
The fireworks algorithm (FWA) [9] is considered a novel swarm intelligence algorithm.It was introduced in 2010 and mimics the fireworks explosion process.The FWA provides an optimized solution for searching a fireworks location.In the event of a firework randomly exploding, there are explosive and Gaussian sparks produced in addition to the initial explosion.To determine the firework's local space, a calculation of explosive amplitude and number of explosive sparks is made based on other fireworks and fitness functions.Fireworks and sparks are then filtered based on fitness and diversity.Using repetition, FWA focuses on smaller areas for optimized solutions.
Various types of real-world optimization problems have been solved by applying FWA, such as factorization of a non-negative matrix [10], the design of digital filters [11], parameter optimization for the detection of spam [12], reconfiguration of networks [13], mass minimization of trusses [14], parameter estimation of chaotic systems [15], and scheduling of multi-satellite control resources [16].
However, there are disadvantages to the FWA approach.Although the original algorithm worked well on functions in which the optimum is located at the origin of the search space, when the optimum of origin is more distant it becomes more challenging to locate the correct solution.Thus, the quality of the results of the original FWA deteriorates severely with the increasing distance between the function optimum and the origin.Additionally, the computational cost per iteration is high for FWA compared to other optimization algorithms.For these reasons, the enhanced fireworks algorithm (EFWA) [17] was introduced to enhance FWA.
The explosion amplitude is a significant variable and affects the performance of both the FWA and EFWA.In EFWA, the amplitude is near zero with the best fireworks, thus employing an amplitude check with a minimum.An amplitude like this is calculated according to the maximum number of evaluations, which leads to a local search without adaption around the best fireworks.Thus, the adaptive fireworks algorithm (AFWA) introduced an adaptive amplitude [18] to improve the performance of EFWA.In AFWA, the adaptive amplitude is calculated from a distance between filtered sparks and the best fireworks.
AFWA improved the performance of EFWA on 25 of the 28 CEC13's benchmark functions [18], but our in-depth experiments indicate that the solution accuracy of AFWA is lower than that of EFWA.To improve the performance of AFWA, opposition-based learning was added and used to accelerate the convergence speed and increase the solution accuracy.
Opposition-based learning (OBL) was first proposed in 2005 [19].OBL simultaneously considers a solution and its opposite solution; the fitter one is then chosen as a candidate solution in order to accelerate convergence and improve solution accuracy.It has been used to enhance various optimization algorithms, such as differential evolution [20,21], particle swarm optimization [22], the ant colony system [23], the firefly algorithm [24], the artificial bee colony [25], and the shuffled frog leaping algorithm [26].Inspired by these studies, OBL was added to AFWA and used to boost the performance of AFWA.
The remainder of this paper is organized in the following manner.Both AFWA and OAFWA are summarized in Section 2. In the third section, twelve benchmark functions and implementations are listed.Section 4 covers simulations that have been conducted, while Section 5 presents our conclusion.

Adaptive Fireworks Algorithm
Suppose that N denotes the quantity of fireworks, while d stands for the number of dimensions, and x i stands for each firework in AFWA.The explosive amplitude A i and the number of explosion sparks S i can be defined according to the following expressions: where y max = max( f px i q), y min = min( f px i q), and Â and M e are two constants.denotes the machine epsilon, i " p1, 2, . . ., d).
In addition, the number of sparks S i is defined by: where S min and S max are the lower bound and upper bound of the S i .
Based on the above A i and S i , Algorithm 1 is performed by generating explosion sparks for x i as follows: Algorithm 1 Generating Explosion Sparks 1: for j = 1 to S i do 2: for each dimension k = 1, 2, . . ., d do 3: obtain r1 from U(0, 1) 4: if r1 < 0.5 then 5: obtain r from U(´1, 1) where NG is the quantity of Gaussian sparks, m stands for the quantity of fireworks, x ˚denotes the best firework, and N(0, 1) denotes normal distribution with an average of 0 and standard deviation of 1.
For the best sparks among the above explosion sparks and Gaussian sparks, the adaptive amplitude of fireworks A ˚in generation g + 1 is defined as follows [18]: where s 1... s n denotes all sparks generated in generation g, s ˚denotes the best spark and x stands for fireworks in generation g.The above parameter λ is suggested to be a fixed value of 1. xi " a i `bi ´xi In fact, according to probability theory, 50% of the time an opposite solution is better.Therefore, based on a solution and an opposite solution, OBL has the potential to accelerate convergence and improve solution accuracy.
Definition 2. The quasi-opposite solution QOP = ( xq 1 , xq 2 , . . ., xq n ) is defined as follows [21]: It is proved that the quasi-opposite solution QOP is more likely than the opposite solution OP to be closer to the solution.
Figure 1 illustrates the quasi-opposite solution QOP in the one-dimensional case.
In fact, according to probability theory, 50% of the time an opposite solution is better.Therefore, based on a solution and an opposite solution, OBL has the potential to accelerate convergence and improve solution accuracy.Definition 2. The quasi-opposite solution QOP = ( , , … , ) is defined as follows [21]: It is proved that the quasi-opposite solution QOP is more likely than the opposite solution OP to be closer to the solution.
Figure 1 illustrates the quasi-opposite solution QOP in the one-dimensional case.

Opposition-Based Adaptive Fireworks Algorithm
The OBL is added to AFWA in two stages: opposition-based population initialization and opposition-based generation jumping [20].

Opposition-Based Population Initialization
In the initialization stage, both a random solution and a quasi-opposite solution QOP are considered in order to obtain fitter starting candidate solutions.
Algorithm 4 is performed for opposition-based population initialization as follows:

Opposition-Based Adaptive Fireworks Algorithm
The OBL is added to AFWA in two stages: opposition-based population initialization and opposition-based generation jumping [20].

Opposition-Based Population Initialization
In the initialization stage, both a random solution and a quasi-opposite solution QOP are considered in order to obtain fitter starting candidate solutions.
Algorithm 4 is performed for opposition-based population initialization as follows:

Benchmark Functions
In order to assess the performances of OAFWA, twelve standardized benchmark functions [27] are employed.The functions are uni-modal and multi-modal.The global minimum is zero.

Success Criterion
We utilize the success rates S r to compare performances of different FWA based algorithms including EFWA, AFWA, and OAFWA.
S r can be defined as follows: S r " 100¨N successful N all (7) where N successful is the number of trials that were successful, and N all stands for the total number of trials.When an experiment locates a solution that is close in range to the global optimum, it is found to be a success.A successful trial is defined by: where D denotes the dimensions of the test function, and X gb i denotes the dimension of the best result by the algorithm.

Initialization
We tested the benchmark functions using 100 independent algorithms based on various FWA based algorithms.In order to fully evaluate the performance of OAFWA, statistical measures were used including the worst, best, median, and mean objective values.Standard deviations were also determined.

Comparison with FWA-Based Algorithms
To assess the performance of OAFWA, OAFWA is compared with AFWA, and then with FWA-based algorithms including EFWA and AFWA.

Comparison with AFWA
To compare the performances of OAFWA and AFWA, both algorithms were tested on twelve benchmark functions.
Table 2 shows the statistical results for OAFWA.Table 3 shows the statistical results for AFWA.Table 4 shows the comparison of OAFWA and AFWA for solution accuracy from Tables 2 and 3.The statistical results from Tables 2-4 indicate that the accuracy of the best solution and the mean solution for OAFWA were improved by average values of 10 ´288 and 10 ´53 , respectively, as compared to AFWA.Thus, OAFWA can increase the performance of AFWA and achieve a significantly more accurate solution.
To evaluate whether the OAFWA results were significantly different from those of the AFWA, the OAFWA mean results during iteration for each benchmark function were compared with those of the AFWA.The Wilcoxon signed-rank test, which is a safe and robust, non-parametric test for pairwise statistical comparisons [28], was utilized at the 5% level to detect significant differences between these pairwise samples for each benchmark function.
The signrank function in Matlab 7.0 was used to run the Wilcoxon signed-rank test, as shown in Table 5.Here P is the p-value test and H is the result of the hypothesis test.A value of H = 1 indicates the rejection of the null hypothesis at the 5% significance level.
Table 5 indicates that OAFWA showed a large improvement over AFWA.

Comparison with FWA-Based Algorithms
To compare performances of OAFWA, AFWA, and EFWA, EFWA was tested for twelve benchmark functions.Success rates and mean error ranks for three FWA based algorithms were obtained.
Table 6 shows the statistical results for EFWA.
The results from Tables 6 and 7 indicate that the mean error of AFWA is larger than that of EFWA.The Sr of AFWA is lower that of EFWA.Thus, AFWA is not better than EFWA; The Sr of OAFWA is the highest and OAFWA ranks the highest among three FWA algorithms.Thus, OAFWA greatly improved the performance of AFWA.
For the runtimes of EFWA, AFWA and OAFWA, Tables 2 and 3 indicate that the time cost of OAFWA is not much different from that of AFWA.But Tables 2 and 6 indicate the time cost of OAFWA drops significantly as compared with that of EFWA.
Table 7 compares three FWA-based algorithms.Figure 2 shows searching curves for EFWA, AFWA, and OAFWA.Figure 2 shows that OAFWA results in a global optimum for all twelve functions and with fast convergence.However, the alternative EFWA methods do not always locate the global optimum solutions.These include EFWA for F9 and F11.AFWA is the worst among the three algorithms.It is bad for a majority of functions.Thus, OAFWA is the best one in terms of solution accuracy.The results from Tables 6 and 7 indicate that the mean error of AFWA is larger than that of EFWA.The Sr of AFWA is lower that of EFWA.Thus, AFWA is not better than EFWA; The Sr of OAFWA is the highest and OAFWA ranks the highest among three FWA algorithms.Thus, OAFWA greatly improved the performance of AFWA.
For the runtimes of EFWA, AFWA and OAFWA, Tables 2 and 3 indicate that the time cost of OAFWA is not much different from that of AFWA.But Tables 2 and 6 indicate the time cost of OAFWA drops significantly as compared with that of EFWA.
Figure 2 shows searching curves for EFWA, AFWA, and OAFWA.Figure 2 shows that OAFWA results in a global optimum for all twelve functions and with fast convergence.However, the alternative EFWA methods do not always locate the global optimum solutions.These include EFWA for F9 and F11.AFWA is the worst among the three algorithms.It is bad for a majority of functions.Thus, OAFWA is the best one in terms of solution accuracy.

Comparison with Other Swarm Intelligence Algorithms
Additionally, OAFWA was compared with alternative swarm intelligent algorithms, including BA, DE, self-adapting control parameters in differential evolution (jDE) [29], FA, and SPSO2011 [30].The resulting evaluation times (iteration) and population size are the same for each function.Two cases of population size are tested, 20 and 40, respectively.The parameters are shown in Table 8.How to tune the parameters of the above algorithms is a challenging issue.These parameters are obtained from the literature [31] for BA, [29] for DE and jDE, and [30] for SPSO2011.For FA, reducing randomness increases the convergence.α t`1 " p1 ´δq a t [32] is employed to gradually decrease α. δ is a small constant related to iteration.
Tables 9 and 10 present the mean errors for the six algorithms when population sizes are 20 and 40, respectively.Tables 9 and 10 indicate that certain algorithms perform well for some functions, but less well for others.Overall, OAFWA performance was shown to have more stability than the other algorithms.
Figures 3 and 4 present the runtime cost of the six algorithms for twelve functions when population sizes are 20 and 40, respectively.Figure 3 shows that the runtime cost of DE is the most expensive among the six algorithms, except for F7, F8, F10, and F12. Figure 4 shows that the runtime cost of SPSO2011 is the most expensive among the six algorithms.The time cost of OAFWA is the least.
Tables 11 and 12 present the ranks of the six algorithms for twelve benchmark functions when population sizes are 20 and 40, respectively.Figure 3 shows that the runtime cost of DE is the most expensive among the six algorithms, except for F7, F8, F10, and F12. Figure 4 shows that the runtime cost of SPSO2011 is the most expensive among the six algorithms.The time cost of OAFWA is the least.
Tables 11 and 12 present the ranks of the six algorithms for twelve benchmark functions when population sizes are 20 and 40, respectively.
Tables 11 and 12 indicate that the OAFWA ranks the best (1.42 and 1.00) out of the six algorithms.

Conclusions
OAFWA was developed by applying OBL to AFWA.Twelve benchmark functions were investigated for OAFWA.Results indicated a large boost in performance in OAFWA over AFWA when using OBL.The accuracy of the best solution and the mean solution for OAFWA were improved significantly when compared to AFWA.
The experiments clearly indicate that OAFWA can perform significantly better than EFWA and AFWA in terms of solution accuracy.Additionally, OAFWA is compared with BA, DE, jDE, FA and SPSO2011.Overall, the research demonstrates that OAFWA performed the best for both solution accuracy and runtime cost.

Algorithm 6
Pseudo-Code of OAFWA 1: opposition-based population initialization based on Algorithm 4 2: repeat 3: obtain A i (except for A*) based on Equation (1) 4: obtain S i based on Equations (2) and (3) 5: produce explosion sparks based on Algorithm 1 6: produce Gaussian sparks based on Algorithm 2 7: assess all sparks' fitness 8: obtain A* based on Equation (4) 9: retain the best spark as a firework 10: randomly select other m -1 fireworks 11: opposition-based generation jumping based on Algorithm 5 12: until termination condition is satisfied 13: return the best fitness and a firework location

Figure 3 .
Figure 3. Runtime cost of the six algorithms for twelve functions when popSize = 20.

Figure 4 .
Figure 4. Runtime cost of the six algorithms for twelve functions when popSize = 40.

Figure 4 .
Figure 4. Runtime cost of the six algorithms for twelve functions when popSize = 40.

Algorithm 4
Opposition-Based Population Initialization 1: randomly initialize fireworks pop with a size of m 2: calculate a quasi opposite fireworks Qpop based on Equation (6) 3: assess 2 ˆm fireworks' fitness 4: return the fittest individuals from {pop Y Opop} as initial fireworks 2.3.2.Opposition-Based Generation JumpingIn the second stage, the current population of AFWA is forced to jump into some new candidate solutions based on a jumping rate, J r .

Table 3 .
Statistical results for AFWA.

Table 4 .
Comparison of OAFWA and AFWA for solution accuracy.

Table 5 .
Wilcoxon signed-rank test results for OAFWA and AFWA.

Table 7 .
Success rates and mean error ranks for three FWA-based algorithms.

Table 9 .
Mean errors for the six algorithms when popSize = 20.

Table 10 .
Mean errors for the six algorithms when popSize = 40.Tables 9 and 10 indicate that certain algorithms perform well for some functions, but less well for others.Overall, OAFWA performance was shown to have more stability than the other algorithms.Figures3 and 4present the runtime cost of the six algorithms for twelve functions when population sizes are 20 and 40, respectively.

Table 11 .
Ranks for the six algorithms when popSize = 20.

Table 12 .
Ranks for the six algorithms when popSize = 40.

Table 11 .
Ranks for the six algorithms when popSize = 20.

Table 12 .
Ranks for the six algorithms when popSize = 40.