Soft Computing

, Volume 21, Issue 18, pp 5325–5339 | Cite as

Randomly attracted firefly algorithm with neighborhood search and dynamic parameter adjustment mechanism

  • Hui Wang
  • Zhihua Cui
  • Hui Sun
  • Shahryar Rahnamayan
  • Xin-She Yang
Methodologies and Application


Firefly algorithm (FA) is a new swarm intelligence optimization algorithm, which has shown an effective performance on many optimization problems. However, it may suffer from premature convergence when solving complex optimization problems. In this paper, we propose a new FA variant, called NSRaFA, which employs a random attraction model and three neighborhood search strategies to obtain a trade-off between exploration and exploitation abilities. Moreover, a dynamic parameter adjustment mechanism is used to automatically adjust the control parameters. Experiments are conducted on a set of well-known benchmark functions. Results show that our approach achieves much better solutions than the standard FA and five other recently proposed FA variants.


Firefly algorithm (FA) Random attraction Neighborhood search Dynamic parameter adjustment mechanism Global optimization 



This work is supported by the Priority Academic Program Development of Jiangsu Higher Education Institutions, Jiangsu Collaborative Innovation Center on Atmospheric Environment and Equipment Technology, the Humanity and Social Science Foundation of Ministry of Education of China (No. 13YJCZH174), the National Natural Science Foundation of China (Nos. 61305150, 61261039, and 61461032), and the Natural Science Foundation of Jiangxi Province (No. 20142BAB217020).

Compliance with ethical standards

Conflict of interest

The authors declare that they have no conflict of interest.

Ethical approval

This article does not contain any studies with human participants or animals performed by any of the authors.


  1. Amiri B, Hossain L, Crawford JW, Wigand RT (2013) Community detection in complex networks: multi-objective enhanced firefly algorithm. Knowl Based Syst 46:1–11CrossRefGoogle Scholar
  2. Brest J, Greiner S, Bo\(\check{s}\)kovi\(\acute{c}\) B, Mernik M, \(\check{Z}\)umer V, (2006) Self-adapting control parameters in differential evolution: a comparative study on numerical benchmark problems. IEEE Trans Evolut Comput 10(6):646–657Google Scholar
  3. Chandrasekaran K, Simon SP, Padhy NP (2013) Binary real coded firefly algorithm for solving unit commitment problem. Inf Sci 249:67–84CrossRefGoogle Scholar
  4. Chen BJ, Shu HZ, Coatrieux G, Chen G, Sun XM, Coatrieux JL (2015) Color image analysis by quaternion-type moments. J Math Imaging Vis 51(1):124–144MathSciNetCrossRefzbMATHGoogle Scholar
  5. Chhikara RR, Singh L (2015) An improved discrete firefly and t-Test based algorithm for blind image steganalysis. In: The 6th international conference on intelligent systems, modelling and simulation (ISMS), pp 58–63Google Scholar
  6. Coelho LS, Mariani VC (2013) Improved firefly algorithm approach applied to chiller loading for energy conservation. Energy Build 59:273–278CrossRefGoogle Scholar
  7. Das S, Abraham A, Chakraborty U, Konar A (2009) Differential evolution using a neighborhood-based mutation operator. IEEE Trans Evol Comput 13(3):526–553CrossRefGoogle Scholar
  8. Dorigo M, Maniezzo V, Colorni A (1996) The ant system: optimization by a colony of cooperating agents. IEEE Trans Syst Man Cybern Part B Cybern 26:29–41CrossRefGoogle Scholar
  9. Duang H, Luo Q (2015) New progresses in swarm intelligence-based computation. Int J Bio-Inspir Comput 7(1):26–35CrossRefGoogle Scholar
  10. Farahani SM, Abshouri AA, Nasiri B, Meybodi MR (2011) A Gaussian firefly algorithm. Int J Mach Learn Comput 1(5):448–453CrossRefGoogle Scholar
  11. Fister Jr I, Yang XS, Fister I, Brest J (2012) Memetic firefly algorithm for combinatorial optimization. In: Bioinspired optimization methods and their applications (BIOMA 2012), pp 1–14Google Scholar
  12. Fister I Jr, Fister I, Yang XS, Brest J (2013) A comprehensive review of firefly algorithms. Swarm Evolut Comput 13:34–46CrossRefGoogle Scholar
  13. Fister I, Yang XS, Brest J, Fister I Jr (2013) Modified firefly algorithm using quaternion representation. Exp Syst Appl 40(18):7220–7230CrossRefGoogle Scholar
  14. Fister I Jr, Yang XS, Fister I, Brest J, Fister D (2013) A brief review of nature-inspired algorithms for optimization. Elektrotehniǎki Vestnik 80(3):1–7zbMATHGoogle Scholar
  15. Fister I Jr, Perc M, Kamal SM, Fister I (2015) A review of chaos-based firefly algorithms: perspectives and research challenges. Appl Math Comput 252:155–165MathSciNetzbMATHGoogle Scholar
  16. Fister I Jr, Yang XS, Brest J, Fister D, Fister I (2015) Analysis of randomisation methods in swarm intelligence. Int J Bio-Inspir Comput 7(1):36–49CrossRefGoogle Scholar
  17. Florence AP, Shanthi V (2014) A load balancing model using firefly algorithm in cloud computing. J Comput Sci 10(7):1156–1165CrossRefGoogle Scholar
  18. Fu ZJ, Sun XM, Liu Q, Zhou L, Shu JG (2015) Achieving efficient cloud search services: multi-keyword ranked search over encrypted cloud data supporting parallel computing. IEICE Trans Commun E98–B(1):190–200CrossRefGoogle Scholar
  19. Gandomi AH, Yang XS, Alavi AH (2013) Mixed variable structural optimization using firefly algorithm. Comput Struct 89(23–24):2325–2336Google Scholar
  20. Gandomi AH, Yang XS, Talatahari S, Alavi AR (2013) Firefly algorithm with chaos. Commun Nonlinear Sci Numer Simul 18(1):89–98MathSciNetCrossRefzbMATHGoogle Scholar
  21. García S, Fern\(\acute{a}\)ndez A, Luengo J, Herrera F (2010) Advanced nonparametric tests for multiple comparisons in the design of experiments in computational intelligence and data mining: experimental an alysis of power. Inf Sci 180(20):2044–2064Google Scholar
  22. Gopinadh V, Singh A (2015) Swarm intelligence approaches for cover scheduling problem in wireless sensor networks. Int J Bio-Inspir Comput 7(1):50–61CrossRefGoogle Scholar
  23. Gu B, Sheng VS, Tay KY, Romano W, Li S (2015) Incremental support vector learning for ordinal regression. IEEE Trans Neural Netw Learn Syst 26(7):1403–1416MathSciNetCrossRefGoogle Scholar
  24. Gu B, Sheng VS, Wang ZJ, Ho D, Osman S, Li S (2015) Incremental learning for \(\nu \)-support vector regression. Neural Netw 67:140–150CrossRefGoogle Scholar
  25. Hassanzadeh T, Vojodi H, Moghadam AME (2011) An image segmentation approach based on maximum variance intra-cluster method and firefly algorithm. In: The 7th international conference on natural computation (ICNC), pp 1817–1821Google Scholar
  26. Horng MH (2012) Vector quantization using the firefly algorithm for image compression. Exp Syst Appl 39(1):1078–1091CrossRefGoogle Scholar
  27. Kazem A, Sharifi E, Hussain F, Saberi M, Hussain OK (2013) Support vector regression with chaos-based firefly algorithm for stock market price forecasting. Appl Soft Comput 13(2):947–958CrossRefGoogle Scholar
  28. Kennedy J, Eberhart RC (1995) Particle swarm optimization. In: Proceedings of IEEE international conference on neural networks, pp 1942–1948Google Scholar
  29. Kougianos E, Mohanty SP (2015) A nature-inspired firefly algorithm based approach for nanoscale leakage optimal RTL structure. Integr VLSI J 51:46–60CrossRefGoogle Scholar
  30. Li J, Li XL, Yang B, Sun XM (2015) Segmentation-based image copy-move forgery detection scheme. IEEE Trans Inf Forensics Secur 10(3):507–518CrossRefGoogle Scholar
  31. Liang RH, Wang JC, Chen YT, Tseng WT (2015) An enhanced firefly algorithm to multi-objective optimal active/reactive power dispatch with uncertainties consideration. Int J Electr Power Energy Syst 64:1088–1097CrossRefGoogle Scholar
  32. Long NC, Meesad P, Unger H (2015) A highly accurate firefly based algorithm for heart disease prediction. Exp Syst Appl 42(21):8221–8231CrossRefGoogle Scholar
  33. Ma TH, Zhou JJ, Tang ML, Tian Y, Al-dhelaan A, Al-rodhann M, Lee S (2015) Social network and tag sources based augmenting collaborative recommender system. IEICE Trans Inf Syst E98–D(4):902–910CrossRefGoogle Scholar
  34. Mahapatra S, Panda S, Swain SC (2014) A hybrid firefly algorithm and pattern search technique for SSSC based power oscillation damping controller design. Ain Shams Eng J 5:1177–1188CrossRefGoogle Scholar
  35. Marichelvam MK, Prabaharan T, Yang XS (2014) A discrete firefly algorithm for the multi-objective hybrid flowshop scheduling problems. IEEE Trans Evol Comput 18(2):301–305CrossRefGoogle Scholar
  36. Miguel LFF, Lopez RH, Miguel LFF (2013) Multimodal size, shape, and topology optimisation of truss structures using the firefly algorithm. Adv Eng Softw 56:23–37CrossRefGoogle Scholar
  37. Poursalehi N, Zolfaghari A, Minuchehr A (2013) Multi-objective loading pattern enhancement of PWR based on the discrete firefly algorithm. Ann Nucl Energy 57:151–163CrossRefGoogle Scholar
  38. Rahmani A, MirHassani SA (2014) A hybrid firefly-genetic algorithm for the capacitated facility location problem. Inf Sci 283:70–78MathSciNetCrossRefzbMATHGoogle Scholar
  39. Ren YJ, Shen J, Wang J, Han J, Lee S (2015) Mutual verifiable provable data auditing in public cloud storage. J Int Technol 16(2):317–323Google Scholar
  40. Sahu RK, Panda S, Padhan S (2015) A hybrid firefly algorithm and pattern search technique for automatic generation control of multi area power systems. Int J Electr Power Energy Syst 64:9–23CrossRefGoogle Scholar
  41. Saraç E, Özel SA (2013) Web page classification using firefly optimization. In: IEEE international symposiumon innovations in intelligent systems and applications (INISTA), pp 1–5Google Scholar
  42. Sayadi MK, Hafezalkotob A, Naini S (2013) Firefly-inspired algorithm for discrete optimization problems: an application to manufacturing cell formation. J Manuf Syst 32(1):78–84CrossRefGoogle Scholar
  43. Senthilnath J, Omkar SN, Mani V (2011) Clustering using firefly algorithm: performance study. Swarm Evolut Comput 1(3):164–171CrossRefGoogle Scholar
  44. Shen J, Tan HW, Wang J, Wang JW, Lee S (2015) A novel routing protocol providing good transmission reliability in underwater sensor networks. J Int Technol 16(1):171–178Google Scholar
  45. Shomalnasab F, Sadeghzadeh M, Esmaeilpour M (2014) An optimal similarity measure for collaborative filtering using firefly algorithm. J Adv Comput Res 5(3):101–111Google Scholar
  46. Srivatsava PR, Mallikarjun B, Yang XS (2013) Optimal test sequence generation using firefly algorithm. Swarm Evolut Comput 8:44–53CrossRefGoogle Scholar
  47. Tilahun SL, Ong HC (2012) Modified firefly algorithm. J Appl Math 2012:1–12. doi: 10.1155/2012/467631 MathSciNetCrossRefzbMATHGoogle Scholar
  48. Wang H, Wu ZJ, Rahnamayan S, Li CH, Zeng SY, Jiang DZ (2011) Particle swarm optimization with simple and efficient neighbourhood search strategies. Int J Innov Comput Appl 3(2):7–104Google Scholar
  49. Wang H, Rahnamayan S, Sun H, Omran MGH (2013) Gaussian bare-bones differential evolution. IEEE Trans Cybern 43(2):634–647CrossRefGoogle Scholar
  50. Wang H, Sun H, Li CH, Rahnamayan S, Pan JS (2013) Diversity enhanced particle swarm optimization with neighborhood search. Inf Sci 223:119–135MathSciNetCrossRefGoogle Scholar
  51. Wang B, Li DX, Jiang JP, Liao YH (2014) A modified firefly algorithm based on light intensity difference. J Comb Optim 31(3):1045–1060MathSciNetCrossRefzbMATHGoogle Scholar
  52. Wang H, Wang WJ, Sun H, Rahnamayan S (2016) Firefly algorithm with random attraction. Int J Bio-Inspir Comput 8(1):33–41CrossRefGoogle Scholar
  53. Wen XZ, Shao L, Xue Y, Fang W (2015) A rapid learning algorithm for vehicle classification. Inf Sci 295:395–406Google Scholar
  54. Xia ZH, Wang XH, Sun XM, Liu QS, Xiong NX (2014) Steganalysis of LSB matching using differences between nonadjacent pixels. Multimed Tools Appl. doi: 10.1007/s11042-014-2381-8
  55. Xia ZH, Wang XH, Sun XM, Wang Q (2015) A secure and dynamic multi-keyword ranked search scheme over encrypted cloud data. IEEE Trans Parallel Distrib Syst. doi: 10.1109/TPDS.2015.2401003
  56. Xia ZH, Wang XH, Sun XM, Wang BW (2014) Steganalysis of least significant bit matching using multi-order differences. Secur Commun Netw 7(8):1283–1291CrossRefGoogle Scholar
  57. Xie SD, Wang YX (2014) Construction of tree network with limited delivery latency in homogeneous wireless sensor networks. Wirel Pers Commun 78(1):231–246CrossRefGoogle Scholar
  58. Xu M, Liu GZ (2013) A multipopulation firefly algorithm for correlated data routing in underwater wireless sensor networks. Int J Distrib Sens Netw. doi: 10.1155/2013/865154
  59. Yang XS, Deb S (2009) Cuckoo search via Lvy flights. In: World congress on nature and biologically inspired computing (NaBIC 2009), pp 210–214Google Scholar
  60. Yang XS (2010) A new metaheuristic bat-inspired algorithm. In: Nature inspired cooperative strategies for optimization (NICSO 2010), Springer, Berlin, pp 65–74Google Scholar
  61. Yang XS (2008) Nature-inspired metaheuristic algorithms. Luniver Press, LondonGoogle Scholar
  62. Yang XS (2010) Engineering optimization: an introduction with metaheuristic applications. Wiley, New YorkCrossRefGoogle Scholar
  63. Yang XS, Hosseini SSS, Gandomi AH (2012) Firefly algorithm for solving non-convex economic dispatch problems with valve loading effect. Appl Soft Comput 12(3):1180–1186CrossRefGoogle Scholar
  64. Yu SH, Su SB, Lu QP, Huang L (2014) A novel wise step strategy for firefly algorithm. Int J Comput Math 91(12):2507–2513MathSciNetCrossRefzbMATHGoogle Scholar
  65. Yu SH, Zhu SL, Ma Y, Mao DM (2015) A variable step size firefly algorithm for numerical optimization. Appl Math Comput 263:214–220MathSciNetGoogle Scholar
  66. Zheng YH, Jeon B, Xu DH, Wu QMJ, Zhang H (2015) Image segmentation by generalized hierarchical fuzzy C-means algorithm. J Intell Fuzzy Syst 28(2):961–973Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2016

Authors and Affiliations

  1. 1.School of Information EngineeringNanchang Institute of TechnologyNanchangChina
  2. 2.Jiangxi Province Key Laboratory of Water Information Cooperative Sensing and Intelligent ProcessingNanchangChina
  3. 3.School of Computer Science and TechnologyTaiyuan University of Science and TechnologyTaiyuanChina
  4. 4.Department of Electrical, Computer, and Software EngineeringUniversity of Ontario Institute of Technology (UOIT)OshawaCanada
  5. 5.School of Science and TechnologyMiddlesex UniversityLondonUK

Personalised recommendations