Abstract
The artificial fish swarm algorithm can achieve good convergence effects in the early stage, but in the late stage, the algorithm has the problems of slow convergence speed and low optimization accuracy, and it is easy to fall into local extremes, making the algorithm’s convergence effect poor. Therefore, the characteristics of fireworks algorithm are used to improve the deficiency of fish swarm algorithm that is easy to fall into local extreme value in the late stage, and FWA-artificial fish swarm algorithm is put forward. When the effect of artificial fish swarm algorithm is poor, the explosion, mutation, mapping, and selection operations of fireworks algorithm are introduced to increase the variability of artificial fish, so as to enhance the optimization speed and ability of the algorithm. Finally, the improved algorithm is tested by four typical complex functions which are difficult to find the optimal solution by traditional method. Simulation results prove that the algorithm has the advantages of faster optimization speed, higher precision, and stronger stability.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Avoid common mistakes on your manuscript.
1 INTRODUCTION
Artificial fish swarm algorithm is a swarm intelligence algorithm based on animal autonomous body model proposed by Li et al. [1]. Later, Li et al. [2] further modified the fish swarm algorithm by introducing survival and competition mechanism. The algorithm has good convergence effect in the early stage, but in the late stage the algorithm tends to fall into the vicinity of the local optimal, resulting in slow searching speed and low solution accuracy. Scholars have raised many improvement methods to do with these problems. According to the distance between artificial fish and optimal solution, Qiu et al. [3] set the changing speed and used it to replace the step size, so as to improve the accuracy on the premise of ensuring the speed. Neshat et al. [4] reviewed the development of artificial fish swarm algorithm and various methods combining AFSA with other optimization algorithms and then described the application of this algorithm in various fields. Luan et al. [5] adopted relative base reinforcement learning algorithm to initialize the position of artificial fish and adjusted the parameters of artificial fish by Cauchy distribution and normal distribution. Geng et al. [6] combined the frog jump algorithm and fish swarm algorithm, and the mixed algorithm with higher accuracy and faster convergence rate was applied to parameter identification. In order to better solve the robot path planning problem, Zhang et al. [7] put forward an improved fish swarm algorithm on the basis of direction operator and immune algorithm. Kong et al. [8] adjusted the step size of artificial fish according to the spectral peak of stochastic resonance. Zheng et al. [9] combined the fish swarm algorithm with particle swarm optimization algorithm and used the hybrid algorithm to detect weak signals adaptively. Wang et al. [10] took advantage of the merits of simulated annealing algorithm and genetic algorithm to modify the deficiencies of fish swarm algorithm. In the PID neural network control method, Mai [11] used fish swarm algorithm to optimize the parameters to shorten the response time and enhance control ability of vehicle. Yang et al. [12] introduced differential evolution algorithm to enhance the local solving ability of fish swarm algorithm.
In 2010, Tan [13] proposed a new swarm intelligence algorithm, fireworks algorithm (FWA), inspired by the phenomenon of fireworks explosion. Cao et al. [14] introduced elite individual chaotic search and dynamic radius factor based on logical adaptive function into the fireworks algorithm, selected excellent sparks by using the tournament strategy based on fitness value, and applied the modified algorithm to discrete scheduling problem. Reddy et al. [15] established a smart grid model with the goals of cost and carbon emissions and proposed a binary fireworks algorithm to solve the grid scheduling problem. Xue et al. [16] proposed fireworks algorithm based on binary reverse points and tested it with the multidimensional backpack problem. Zhang et al. [17] proposed the concept of pioneer sparks and solved the problems in mapping by using mirror mapping rule. Mo et al. [18] improved the diversity of population through the adoption of “elite–random” strategy and integrated the bat algorithm into fireworks algorithm by using a collaborative optimization way so as to make the reformative algorithm can automatically adjust the step length and enhance local search capability. Cai et al. [19] introduced the idea of quantum evolutionary algorithm into fireworks algorithm to enhance the degree of fireworks’ variation, applied variable neighborhood search for further optimization, and finally used CVRP model for simulation analysis. Xue et al. [20] applied quantum behavior to explosive operator to optimize the performance of fireworks algorithm and used the algorithm to solve the path problem of mobile robot. Liu et al. [21] combined principal component analysis with fireworks algorithm and used it to determine the conversion rate of acropropyl aldehyde. Zeng Min et al. [22] replaced Gaussian variation with Cauchy variation and selected the optimal individuals by elist-random selection method, making performance of the improved algorithm better.
In view of the problems existing in the late stage of fish swarm algorithm, the explosion and Gaussian mutation sparks in the fireworks algorithm are introduced into the fish swarm algorithm, so as to make the information exchange between individuals better, increase the variation degree of fish and make the artificial fish can display stronger search capability. The mapping and selection operations in the fireworks algorithm are used to make all individuals within the defined scope. FWA-artificial fish swarm algorithm (FWA-AFSA) is put forward and applied to four typical functions.
The rest of this paper is as follows: Section 2 elaborates FWA- artificial fish swarm algorithm. Section 3 provides the searching process of the reformative artificial fish swarm algorithm, FWA-AFSA. Section 4 tests the algorithm with four functions, and the simulation results are shown and explained in detail. At last, conclusion is made in Section 5.
2 FWA-AFSA
The fireworks algorithm makes the adaptability of the group in the environment better and better by transmitting information, in order to get the global optimal solution. In the practical application of fireworks algorithm, the objective function is used to represent fitness value of fireworks, and each firework represents a solution to the problem. The process of finding extreme value is the process of producing sparks from fireworks explosion. The fitness value of fireworks with better quality is smaller, and the fitness value of fireworks with worse quality is larger. Fireworks algorithm mainly includes four parts: explosion operator, Gaussian mutation operator, mapping rule, and selection strategy. When optimization effect of fish swarm algorithm is poor, the introduction of fireworks algorithm can not only ensure that population is full of variation, but also take into account global and local search. In this paper, the artificial fish swarm algorithm is optimized by setting the parameter \(\lambda \) with constant or minimal change of the optimal solution and using fireworks algorithm. The specific ideas are as follows: (1) The number of times that the solution obtained by the basic fish swarm algorithm is constant or changes very little is \(\gamma \). When \(\gamma \) reaches \(\lambda \), the current optimal state is directly saved to the next generation, and explosion and Gaussian mutation operations are performed on some artificial fish in other states; (2) Through mapping rules, it is guaranteed that the artificial fish after explosion and Gaussian mutation will never exceed the range to be solved. (3) The selection strategy is performed on artificial fish to eliminate individuals with poor states. And combine the preferred artificial fish into the next iterative process with the previously reserved optimal state.
(1) Explosion operator: The calculation formulas of spark number \({{S}_{i}}\) and explosion radius \({{R}_{i}}\) generated by explosion of fireworks \({{X}_{i}}\) are shown in Eqs. (1) and (2), respectively. In these two formulas, \(m\) is a constant used to constrain the number of sparks generated, the fitness value of \({{X}_{i}}\) is \(f\left( {{{X}_{i}}} \right)\), \({{Y}_{{{\text{worst}}}}}\) and \({{Y}_{{{\text{best}}}}}\) represent the current worst and best fitness values respectively, \(\xi \) is a very small number to prevent the denominator from being 0, \({{R}_{0}}\) represents the maximum range of explosion radius.
In order to ensure that the number of sparks with good adaptability is not too much, the number of sparks with poor adaptability is not too small, and the number of sparks produced by the explosion is an integer, it is necessary to use formula (3) to control the number of explosion sparks. \({\text{round}}\left( {} \right)\) is an integer function; a and b are two preset constants, usually \(a = 0.04\), \(b = 0.8\) [20]; am is the product of a and m, and bm is the product of b and m.
The realization process of explosion is as follows: select \(z\) dimensions in fireworks Xi randomly and offset the randomly selected dimension \(k \in \left\{ {1,2, \ldots ,\,z} \right\}\) to generate sparks according to Eq. (4). \(U\left( { - 1,\,\,1} \right)\) is the uniform distribution in the interval of \(\left[ { - 1,\,\,1} \right]\).
(2) Gaussian variation: The specific process is as follows: A firework \({{X}_{i}}\) is randomly selected from the population, and, then, a certain dimension k is randomly selected for Gaussian variation. The formula is expressed as:
In formula (5), \(g\) obeys a Gaussian distribution with a mean of 1 and variance of 1.
(3) Mapping rule: Explosion and Gaussian mutation may produce individuals outside the defined scope, which requires mapping rules to bring these individuals back to the defined scope. The formula is
where \(\bmod \) is the remainder function, \(X_{{\max }}^{k}\) and \(X_{{\min }}^{k}\), respectively, represent the maximum and minimum values of the kth dimension of the ith spark, and \(X_{i}^{k}\) represents the position of the spark \({{X}_{i}}\) that is out of range on the kth dimension.
(4) Selection strategy: The optimal individual is first retained into the next generation, and, then, other \(N - 1\) fireworks are randomly selected from the candidate set by means of roulette. The set of sparks produced by explosion and Gaussian mutation operator is set K, and the distance between any two fireworks is measured by Euclidean distance, as shown in formula (7). \(\left\| {{{X}_{i}} - {{X}_{j}}} \right\|\) represents the Euclidean distance between \({{X}_{i}}\) and \({{X}_{j}}\); \(D\left( {{{X}_{i}}} \right)\) represents the sum of distance between the firework \({{X}_{i}}\) and other fireworks.
The probability that the firework \({{X}_{i}}\) is selected is:
From Eq. (8), it can be seen that the more sparks around the firework \({{X}_{i}}\), the lower the probability of the firework being selected.
3 SEARCHING PROCESS
The optimization process of the FWA-artificial fish swarm algorithm is as follows:
Step 1. Initialize algorithms. The fireworks algorithm is initialized with the given number of explosive sparks m, the maximum explosion radius R0, the explosion number limiting factors a and b, and the number of Gaussian variation sparks number M.
Step 2. Set up a bulletin board to record status of artificial fish.
Step 3. Perform three basic behavior of artificial fish, including foraging, cluster, and follow.
Step 4. Depending on the state of artificial fish, decide whether to update the bulletin board, and its state takes a better one. If the bulletin board is updated very little or does not update for a certain number of times \(\gamma \), explosion, mutation, mapping, and selection operations are introduced, and proceed with step 5; otherwise, proceed with step 6.
Step 5. Fireworks algorithm is introduced, and \(\gamma \) becomes 0.
Step 6. Judge whether the termination condition is met or not. If so, the bulletin board’s value is output; otherwise, return to step 3 to continue running.
Figure 1 displays the program flowchart of FWA-artificial fish swarm algorithm.
4 FUNCTION OPTIMIZATION SIMULATION
In order to test the performance of the modified algorithm, two-dimensional functions and multi-dimensional functions are independently tested 30 times by using MATLAB R2018a, and FWA-AFSA is compared with the basic fish swarm algorithm (AFSA) and the improved algorithm, DNA-AFSA, in literature [23]. Specific test functions are shown in Table 1.
According to references [20, 24, 25], parameter settings are as follows: artificial fish \(fishnum = 30\), maximum number of heuristics \(try\_number = 50\), visual field range \(visual = 2\), step size \(step = 0.3\), crowding factor \(\delta = 0.618\). The limiting factor of explosion number \(a = 0.04\), \(b = 0.8\).
4.1 The Two-Dimensional Eggcrate Function
Maximum iteration number \(maxgen = 200\), DNA cross probability \({{P}_{c}} = 0.9\), DNA variation probability \({{P}_{m}} = 0.01\). A constraint on the number of sparks produced by an explosion \(m = 6\), maximum explosion radius \({{R}_{0}} = 4\), the number of sparks in the Gaussian variation operation \(M = 5\), the threshold value of the maximum number of iterations without change \(max\_unchange = 10\). The results of 100 and 200 iterations are shown in Table 2. When the optimization accuracy is 0.01, Table 3 shows the results. The optimal coordinate movements of AFSA and FWA-AFSA are shown in Figs. 2 and 3, respectively. Figure 4 shows the optimal value of algorithms changes with the number of iterations, when the maximum number of iterations is 200.
4.2 The Two-Dimensional Schaffer Function
Maximum iteration number \(maxgen = 200\), DNA cross probability \({{P}_{c}} = 0.9\), DNA variation probability \({{P}_{m}} = 0.01\). A constraint on the number of sparks produced by an explosion \(m = 5\), maximum explosion radius \({{R}_{0}} = 5\), the number of sparks in the Gaussian variation operation \(M = 5\), the threshold value of the maximum number of iterations without change \(max\_{\kern 1pt} unchange = 10\). The results of 100 and 200 iterations are shown in Table 4.
When the optimization accuracy is 0.001, Table 5 shows the results. The optimal coordinate movements of AFSA and FWA-AFSA are shown in Figs. 5 and 6, respectively. Figure 7 shows the optimal value of algorithms changes with the number of iterations, when the maximum number of iterations is 200.
4.3 The Ten-Dimensional Rosenbrock Function
Maximum iteration number \(maxgen = 2000\), DNA cross probability \({{P}_{c}} = 0.9\), DNA variation probability \({{P}_{m}} = 0.01\). A constraint on the number of sparks produced by an explosion \(m = 6\), maximum explosion radius \({{R}_{0}} = 4\), the number of sparks in the Gaussian variation operation M = 4, the threshold value of the maximum number of iterations without change \(\max \_unchange = 10\). The results of 1000 and 2000 iterations are shown in Table 6. When the optimization accuracy is 10, Table 7 shows the results. The optimal coordinate movements of AFSA and FWA-AFSA are shown in Figs. 8 and 9, respectively. Figure 10 shows the optimal value of algorithms changes with the number of iterations, when the maximum number of iterations is 2000.
4.4 The Ten-Dimensional Griewank Function
Maximum iteration number \(maxgen = 2000\), DNA cross probability \({{P}_{c}} = 0.8\), DNA variation probability \({{P}_{m}} = 0.1\). A constraint on the number of sparks produced by an explosion \(m = 5\), maximum explosion radius \({{R}_{0}} = 4\), the number of sparks in the Gaussian variation operation \(M = 5\), the threshold value of the maximum number of iterations without change \(max\_{\kern 1pt} unchange = 10\). The results of 1000 and 2000 iterations are shown in Table 8. When the optimization accuracy is 0.0001, Table 9 shows the results. The optimal coordinate movements of AFSA and FWA-AFSA are shown in Figs. 11 and 12, respectively. Figure 13 shows the optimal value of algorithms changes with the number of iterations, when the maximum number of iterations is 2000.
From the analysis of the above results: (1) In the case of the same number of iterations, the optimal value, average value, and worst value of the basic fish swarm algorithm are relatively large, especially in the two-dimensional Eggcrate function and the ten-dimensional Rosenbrock function, indicating that it has low optimization accuracy. The experimental results of FWA-AFSA are smaller than that of AFSA and DNA-AFSA, which shows that FWA-AFSA can jump out of the local extremum and has higher optimization accuracy. Moreover, among the three algorithms, the standard deviation of FWA-AFSA is the smallest, indicating that FWA-AFSA has better stability. (2) In the case of fixed solving accuracy, the algorithm is easy to fall into local extreme value in the late stage, which makes it hard to achieve a very small precision, so the success rate of AFSA is low. And the success rate of FWA-AFSA can reach 100%, indicating that FWA-AFSA has higher reliability. Besides, FWA-AFSA’s average convergence algebra is less than that of AFSA and DNA-AFSA, so the faster convergence speed is proved. (3) These eight optimal coordinate movement charts display algorithms’ optimization process, which shows that artificial fish in AFSA are scattered around the definition domain, while artificial fish in FWA-AFSA are concentrated near the optimal value. (4) The optimization curves show that, compared with other algorithms, FWA-AFSA can converge faster and achieve a smaller solution result, which also indicates that FWA-AFSA has a faster convergence speed and a higher solution accuracy.
5 CONCLUSIONS
To enhance diversity of artificial fish and solve the problem that the basic fish swarm algorithm is difficult to find the global optimal solution, explosion, mutation, mapping, and selection operations in fireworks algorithm are introduced into the late stage of fish swarm algorithm. And a reformative fish swarm algorithm combined with fireworks algorithm is put forward. The functional simulation results show that compared with other algorithms, the proposed algorithm, FWA-AFSA, can jump out of the local extremum better and has best solving effects in convergence, accuracy, and stability. In the later research, we will use the FWA-AFSA to solve complex problems in practical life, such as path optimization and center location. And fireworks algorithm will be applied to the optimization study of other intelligent algorithms.
REFERENCES
Li, X., Shao, Z., and Qian, J., An optimizing method based on autonomous animals: fish swarm algorithm, Syst. Eng.: Theory Pract., 2002, vol. 22, no. 11, pp. 32–38.
Li, X. and Qian, J., Studies on artificial fish swarm optimization algorithm based on decomposition and coordination techniques, J. Circuits Syst., 2003, vol. 8, no. 1, pp. 1–6.
Qiu, Y. and Li, Z., An improved artificial fish swarm algorithm and its application for SVM parameter optimization, Comput. Eng. Sci., 2018, vol. 40, no. 11, pp. 2074–2079.
Neshat, M., Sepidnam, G., Sargolzaei, M., and Toosi, A.N., Artificial fish swarm algorithm: A survey of the state-of-the-art, hybridization, combinatorial and indicative applications, Artif. Intell. Rev., 2012, vol. 42, no. 4, pp. 965–997. https://doi.org/10.1007/s10462-012-9342-2
Luan, X., Liu, T., and Zhou, Z., LED color mixing design based on improved artificial fish swarm algorithm, Chin. J. Luminescence, 2015, vol. 36, no. 1, pp. 113–120.
Geng, C., Wang, F., Su, L., and Zhang, J., Parameter identification of Jiles–Atherton model for transformer based on hybrid artificial fish swarm and shuffled frog leaping algorithm, Proc. CSEE, 2015, vol. 35, no. 18, pp. 4799–4807.
Zhang, Yi, Guan, G., and Pang, D., Robot path planning method based on modified artificial fish swarm algorithm, Comput. Simul., 2016, vol. 33, no. 12, pp. 374–379.
Kong, D., Peng, H., and Ma, J., Adaptive stochastic resonance method based on artificial-fish swarm optimization, Acta Electron. Sinica, 2017, vol. 45, no. 8, pp. 1864–1872.
Zheng, W., Wen, X., Yang, W., and Yao, Y., Stochastic resonance weak signal detection based on hybrid intelligent algorithm, Comput. Simul., 2021, vol. 38, no. 6, pp. 469–474.
Wang, N., Dai, J., and Han, J., Strategy on target allocation of anti-tbm combat based on improved artificial fish-swarm algorithm, Fire Control Command Control, 2019, vol. 44, no. 4, pp. 65–68.
Mai, P., Research on anti-skid pid neural network control of vehicle based on artificial fish swarm algorithms, Chin. J. Constr. Mach.¸2020, vol. 18, no. 3, pp. 215–219.
Yang, X., Lv, H., and Zhu, H., Reconfiguration of distribution network based on improved artificial fish swarm algorithm, Electr. Meas. Instrum., 2020, vol. 57, no. 17, pp. 72–78.
Tan, Y. and Zhu, Y., Fireworks algorithm for optimization, Advances in Swarm Intelligence. ICSI 2010, Tan, Y., Shi, Y., and Tan, K.C., Eds., Lecture Notes in Computer Science, vol. 6145, Berlin: Springer, 2010, pp. 355–364. https://doi.org/10.1007/978-3-642-13495-1_44
Cao, L., Ye, Ch., and Huang, X., Applying chaotic fireworks algorithm in solving permutation flow shop problem, Comput. Appl. Software, 2016, vol. 33, no. 11, pp. 188–192.
Reddy, K.S., Panwar, L.K., Kumar, R., and Panigrahi, B.K., Distributed resource scheduling in smart grid with electric vehicle deployment using fireworks algorithm, J. Mod. Power Syst. Clean Energy, 2016, vol. 4, no. 2, pp. 188–199. https://doi.org/10.1007/s40565-016-0195-6
Xue, J., Wang, Y., Meng, X., and Xiao, J., Binary opposite backward learning fireworks algorithm for multidimensional knapsack problem, Syst. Eng. Electron., 2017, vol. 39, no. 2, pp. 451–458.
Zhang, W., Ma, Y., Zhao, H., Zhang, L., Li, Y., and Li, X., Obstacle avoidance path planning of intelligent mobile based on improved fireworks-ant colony hybrid algorithm, Control Decis., 2019, vol. 34, no. 2, pp. 335–343.
Mo, H., Zhao, Z., Zeng, M., Shi, J., and Wen, T., Hybrid bats and fireworks algorithm with adaptive step size and collaborative optimization, J. Chin. Comput. Syst., 2019, vol. 40, no. 7, pp. 1423–1429.
Cai, Y., Chen, H., and Qi, Y., Variable neighborhood quantum fireworks algorithm for solving CVRP, Comput. Eng. Appl., 2019, vol. 55, no. 9, pp. 230–236.
Xue, Y., Zhang, X., Zhang, G., and Jia, S., Path planning and smoothing based on quantum-behaved fireworks algorithm for mobile robot, Control Theory Appl., 2019, vol. 36, no. 9, pp. 1398–1408.
Liu, S., Gao, X., He, H., and Qi, W., Soft sensor modelling of acrolein conversion based on hidden markov model of principle component analysis and fireworks algorithm, Can. J. Chem. Eng., 2019, vol. 97, no. 12, pp. 3052–3062. https://doi.org/10.1002/cjce.23520
Zeng, M., Zhao, Z., and Li, Z., Self-learning improved fireworks algorithm with Cauchy mutation, J. Chin. Comput. Syst., 2020, vol. 41, no. 2, pp. 264–270.
Fei, T., Zhang, L., Bai, Y., and Chen, L., Improved artificial fish swarm algorithm based on DNA, J. Tianjin Univ. (Sci. Technol.), 2016, vol. 49, no. 6, pp. 581–588.
Wang, L. and Shi, Q., Parameters analysis of artificial fish swarm algorithm, Comput. Eng., 2010, vol. 36, no. 24, pp 169–171.
Zhu, X., Ni, Z., and Cheng, M., Self-adaptive improved artificial fish swarm algorithm with changing step, Comput. Sci., 2015, vol. 42, no. 2, pp. 210–216.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
The authors declare that they have no conflicts of interest.
About this article
Cite this article
Liyi Zhang, Fu, M., Fei, T. et al. The Artificial Fish Swarm Algorithm Improved by Fireworks Algorithm. Aut. Control Comp. Sci. 56, 311–323 (2022). https://doi.org/10.3103/S0146411622040101
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.3103/S0146411622040101