A new hybrid cuckoo search and firefly optimization

2 downloads 0 Views 642KB Size Report
Jan 29, 2018 - by the following abbreviations: Fmin is the minimum of the function, Niter is the number of iteration, SR is the success rate in %, Time is the time ...
Monte Carlo Methods Appl. 2018; aop

Research Article Mariam Elkhechafi*, Hanaa Hachimi and Youssfi Elkettani

A new hybrid cuckoo search and firefly optimization https://doi.org/10.1515/mcma-2018-0003 Received May 11, 2017; accepted January 4, 2018

Abstract: In this paper, we present a new hybrid algorithm which is a combination of a hybrid Cuckoo search algorithm and Firefly optimization. We focus in this research on a hybrid method combining two heuristic optimization techniques, Cuckoo Search (CS) and Firefly Algorithm (FA) for the global optimization. Denoted as CS-FA. The hybrid CS-FA technique incorporates concepts from CS and FA and creates individuals in a new generation not only by random walk as found in CS but also by mechanisms of FA. To analyze the benefits of hybridization, we have comparatively evaluated the classical Cuckoo Search and Firefly Algorithms versus the proposed hybridized algorithms (CS-FA). Keywords: Optimization, metaheuristics, hybrid algorithms, Cuckoo Search, Firefly Algorithm MSC 2010: 90C90, 90C29, 90C15, 68W27, 68W40

1 Introduction A metaheuristic is a higher-level procedure designed to find, generate, or select a lower-level procedure or heuristic that may provide a sufficiently good solution to an optimization problem, where classical approaches fail, or cannot even been applied [7]. Historically, many of the most successful meta-heuristic approaches have had a biological inspiration, they become increasingly popular. There are many reasons for such a popularity and attention, and two main reasons are probably that these Swarm Intelligence (SI)-based algorithms are flexible and versatile [14], their power comes from the fact that they imitate the best feature in nature [3]. One of the latest nature-inspired metaheuristic algorithms is Cuckoo Search (CS) developed in 2009 by Xin-She Yang and Suash Deb [13], it was inspired by the obligate brood parasitism of some cuckoo species by laying their eggs in the nests of other host birds (of other species). Recent studies show that CS is potentially far more efficient than other bio-inspired algorithms such as Particle Swarm Optimization (PSO) and Genetic Algorithms (GA) [15]. One year before, based on the flashing patterns and behavior of fireflies, Xin-She Yang has developed a new heuristic algorithm called Firefly Algorithm (FA). The discovery of this algorithm was inspired by observations of social behaviors of fireflies who use flashing to attract mating partners. This movement is determined by the resulting attraction, and the attractiveness is related to the intensity of the emitted light. The FA literature has expanded significantly in the last five years with several hundred papers published about structure design, stock forecasting, and production scheduling [5].

*Corresponding author: Mariam Elkhechafi, Department of Mathematics, Ibn Tofail University, B.P 241, Kenitra, Morocco, e-mail: [email protected] Hanaa Hachimi, National School of Applied Sciences, Ibn Tofail University, B.P 242, Kenitra, Morocco, e-mail: [email protected] Youssfi Elkettani, Department of Mathematics, Ibn Tofail University, B.P 241, Kenitra, Morocco, e-mail: [email protected]

Authenticated | [email protected] author's copy Download Date | 1/29/18 12:23 PM

2 | M. Elkhechafi, H. Hachimi and Y. Elkettani, Hybrid cuckoo search and firefly

Both CS and FA have been found to be very efficient in solving global optimization problems [2]. It is noted that the vast majority of research works has proved that despite CS has outperformed FA in multi-modal optimization, FA is better in terms of time taken for generating optimum or near optimum value compared to CS [8]. Taking advantage of the compensatory property of CS and FA, we propose a new algorithm that combines the evolutionary natures of both (denoted as CS-FA). The robustness of CS-FA will be tested against a set of benchmark multi-modal test functions [10].

2 Algorithms description 2.1 Cuckoo Search (CS) Cuckoo Search (CS) is one of the latest nature-inspired metaheuristic algorithms, developed by Yang and Deb [13]. It is based on the brood parasitism of some cuckoo species. Cuckoo are fascinating birds, not only because of the beautiful sounds they can make, but also because of their aggressive reproduction strategy. Some species, such as the ani and Guira cuckoos, lay their eggs in communal nests, though they may remove others eggs to increase the hatching probability of their own eggs [4]. To summarize and make it simple, we can say that the cuckoo search is based on the tree following pillars: ∙ Each cuckoo lays one egg at a time and dumps it in a randomly chosen nest. ∙ The best nests with high-quality eggs will be carried over to the next generations. ∙ The number of available host nests is fixed, and the egg laid by a cuckoo is discovered by the host bird with a probability P a ∈ [0, 1]. There are a number of published modifications proposed to improve the performance of the standard CS algorithm [11], such us Kanagaraj [2], who proposed hybridization of CS with a Genetic Algorithm (GA) to improve its global search performance. In December 2009, Yang and Deb (the CS inventors) formulated a combination of CS and Lévy flight behavior of some birds and fruit flies [13]. The advantage of the random walk via Lévy flight used her in our study is that the latter is more efficient than the classic CS in exploring the search space as its step length is much longer in the long run. By summarizing the tree roles of CS recently cited and the following Lévy flight function (1), we can formulate the pseudo-code of CS via Lévy flight as succeeding Algorithm 1: Algorithm 1. Cuckoo Search via Lévy flights. Objective function f(x), x = (x1 , . . . , x d )T . Generate initial population of n host nests x i (i = 1, 2, . . . , n). while (t ≺ MaxGeneration) or (stop criterion) do Get a cuckoo randomly by Lévy flights evaluate its quality/fitness F i . Choose a nest among n (say, j) randomly. if (F i ≻ F j ) then replace j by the new solution. else A fraction (p a ) of worse nests are abandoned and new ones are built. Keep the best solutions (or nests with quality solutions). Rank the solutions and find the current best. end Postprocess results and visualization X i (t+1) = X i t + α ⊕ Lévy(λ). end

Authenticated | [email protected] author's copy Download Date | 1/29/18 12:23 PM

(1)

M. Elkhechafi, H. Hachimi and Y. Elkettani, Hybrid cuckoo search and firefly |

3

2.2 Firefly Algorithm (FA) As CS, the firefly is one of the most impressive performances swarm intelligence algorithms in solving optimization problems, which was based on the flashing patterns and behavior of fireflies [1]. Fireflies are insects characterized by their amazing flashing light produced by a process of bioluminescence. The main role of such flashes can be reduced to the following two tasks: Firstly to attract mating partners and secondly to remind potential predators of the bitter taste of fireflies. A pseudo-code of the FA is illustrated in Algorithm 2, from which it can be seen that the algorithm consists of the following elements: ∙ a representation of a firefly, ∙ an initialization, ∙ a moving operator, ∙ an objective function. Algorithm 2. Firefly Algorithm. Input: Population of fireflies x = (x1 , . . . , x N ), objective function f(x i ). Output: The best solution xbest and fmin = min(f(xbest )). (0) Generate initial population x(0) = (x1 (0) , . . . , x N ). (0) f(x i ) = evaluate new solution and update light intensity. t = 0. while (t ≺ MaxGeneration) do for i = 1 to N do for j = 1 to N do if I j ≻ I i then move firefly i towards j using uniform distribution. end end end f(x i (t) ) = evaluate new solution and update light intensity. Rank fireflies and find the best. t = t + 1. end

As presented in the experimental Section 3 bellow, FA shows high-performance in terms of convergence speed. This is due to the effect of attractiveness function, which is unique to firefly behavior.

3 Hybrid model CS-FA for optimization 3.1 Algorithm description As mentioned in the algorithms description, both FA and CS have their own advantages and they both work well for a wide range of optimization problems. In this paper, we propose a new hybrid algorithm based on FA and CS by combining some of the advantages of both algorithms. We call the proposed approach the Cuckoo Firefly (CS-FA) that combines the attraction mechanism of FA with the very relevant reproduction strategy of CS as shown in Figure 1 Firstly, the earlier observations and studies in the literature indicated that the firefly algorithm can subdivide the whole population into subgroups automatically in terms of the attraction mechanism via the variation of light intensity. Such advantages mean that FA is good at exploration as well as diversification.

Authenticated | [email protected] author's copy Download Date | 1/29/18 12:23 PM

4 | M. Elkhechafi, H. Hachimi and Y. Elkettani, Hybrid cuckoo search and firefly

Figure 1: Scheme of CS-FA.

From this starting point parallel hybridization came to mind. So here the idea is to mix and group the location information of the best identity obtained after the evaluation of the best result of objectives function of CS and FA processes applied in parallel instead of new random walking positions. The superiority of this hybridization in parallel is to guarantee the search in the best location of the previous iteration instead of having to search or re-search in a random way. The pseudo-code shown in Algorithm 3 summarizes the basic steps of parallel hybridization of CS-FA. Algorithm 3. Pseudo-code of CS-FA. Begin: Divide the whole group into two groups: G1 and G2. Initialize the populations G1 and G2. Evaluate the fitness value of each particle. repeat Do in parallel Perform CS operation on G1. Perform FA operation on G2. END do in parallel Update the global best in the two population. Mix the two groups and regroup them randomly into new groups: G1 and G2. Evaluate the fitness value of each particle. until a terminate-condition is met; End: Post-process results and visualization.

These particle may be regarded as nests in the case of CS, or as fireflies of FA.

3.2 Testing hybrid CS-FA for benchmark functions Various studies show that FA algorithms can outperform genetic algorithms (GA) and other conventional algorithms for solving many optimization problems [12]. This is partially due to that fact that the broadcasting ability of the current best estimates gives better and quicker convergence towards the optimality. A general framework for evaluating statistical performance of evolutionary algorithms has been discussed in detail by Shilane [9]. Various test functions for optimization algorithms have been developed over many years, and a relatively comprehensive review of these test functions can be found in Table 2. Now, we will compare the FA with CS and CS-FA for various standard test functions. We will use the same population size of n = 40 for all algorithms in all our simulations. The CS used is the standard version Authenticated | [email protected] author's copy Download Date | 1/29/18 12:23 PM

M. Elkhechafi, H. Hachimi and Y. Elkettani, Hybrid cuckoo search and firefly |

Cuckoo Search Algorithm Function

Fmin

Niter

Ackley 6.0210E−06 24100 Camel −1.04567 1147 De Jont 3.98E−06 520 Sphere 0.9999 66 Rastrigin 5.05E−04 1452 Schaffer 2 −11.2345 543 Schaffer 4 −11.785 1425

Time

Firefly Algorithm SR

Fmin

Niter

3.273 60 5.210E−07 500 2.154 75 0.04567 2541 2.32 82 −2.017E−06 756 4.281 100 2.542 66 2.123 75 0.123 250 1.397276 50 −11.1879 2540 1.332279 29 −11.58029 3600

5

CS-FA Algorithm

Time

SR

Fmin

Niter

1.273 2.154 3.21 2.28 2.4587 4.231 1.3569

65 9.220E−07 1000 62 0.067 321 81 0.018E−06 145 95 −0.3256 145 95 0.23 245 66 −10.15319 45 80 −10.40294 87

Time

SR

1.2 80 1.23 75 1.21 85 2.145 75 0.452 89 0.223916 100 1.005 100

Table 1: The results of the algorithm applied with benchmark function. It summarizes our comparison of results and we mean by the following abbreviations: Fmin is the minimum of the function, Niter is the number of iteration, SR is the success rate in %, Time is the time per seconds.

without any inertia function, while the implemented genetic algorithm has a mutation probability of 0.05 and a crossover probability of 0.95 without use of elitism. After implementing these algorithms using Matlab, we have carried out extensive simulations and each algorithm has been run at least 100 times so as to carry out meaningful statistical analysis. The algorithms stop when the variations of function values are less than a given tolerance ϵ ≤ 10−5 . The results are summarized in Table 1 where the global optima are reached. We can see that the CS-FA is much more efficient in finding the global optima with higher success rates. Each function evaluation is virtually instantaneous on modern personal computer. For example, the computing time for 10,000 evaluations on a 3 GHz desktop is about 5 seconds. Here we can clearly see that our hybrid CS-FA algorithm has outperformed both CS and FA. The algorithm CS-FA is much more efficient in finding the global optima with higher success rates. For the majority of test functions detailed in Table 2, the fitness value of the CS-FA algorithm is much closer to global optima as compared to the two other algorithms FA and CS. But if we just compare the algorithms FA and CS, their results are very close to each other especially in low-dimensional functions. For processing time which is basically time consumed by the algorithm to process single simulation, (it includes time consumed by a fixed number of iterations to solve the problem) CS-FA is the best. From Table 1 it is quite easily visible that time taken/consumed by the CS-FA algorithm is much less than time taken/consumed by the two other algorithms. We can also compute from Table 1 that time consumed by FA is less than time consumed by CS although the difference is not much.

4 Benchmark test functions The test of reliability, efficiency and validation of optimization algorithms is frequently carried out by using a chosen set of common standard benchmarks or test functions from the literature. The number of test functions in most papers varied from a few to about two dozens. Ideally, the test functions used should be diverse and unbiased, however, there is no agreed set of test functions in the literature. Basic information about the benchmark functions are reported in Table 2. Ackley function. We have f(x, y) = −20 exp[−0.5(cos 2πx + cos 2πy)] + e + 20. This function has the global minimum f0 = 0 at x0 = (0, 0, . . . , 0). De Jong function. The simplest of De Jong’s functions is the so-called sphere function n

f(x) = ∑ x2i ,

−5.12 ≤ x i ≤ 5.12,

i=1

whose global minimum is obviously f0 = 0 at (0, 0, . . . , 0). This function is unimodal and convex. A related Authenticated | [email protected] author's copy Download Date | 1/29/18 12:23 PM

6 | M. Elkhechafi, H. Hachimi and Y. Elkettani, Hybrid cuckoo search and firefly

Function

Minimum

Search domain

Ackley function Camel function De Jong function Rastrigin function Sphere function Rosenbrock function Schaffer functions 2 and 4

0 −1.031628 0 0 0 0 0

[−5, 5] [−5, 5] [−100, 100] [−5.12, 5.12] – – [−100, 100]

Table 2: Basic information about the benchmark functions.

function is the so-called weighted sphere function or hyper-ellipsoid function n

f(x) = ∑ ix2i ,

−5.12 ≤ x i ≤ 5.12,

i=1

which is also convex and unimodal with a global minimum f0 = 0 at x0 = (0, 0, . . . , 0). Another related test function is the sum of different power functions n

f(x) = ∑ | (x i )i+1 , i=1

which has a global minimum f0 = 0 at (0, 0, . . . , 0). Rastrigin function. For x i ∈ [−5.12, 5.12], i = 1, . . . , d, n = d, and A = 10, n

f(x) = An + ∑ [x2i − A cos(2πx i )], i=1

whose global minimum is f0 = 0 at (0, 0, . . . , 0). This function is highly multimodal. Spher function. We have n

f(x) = ∑ x2i , i=1

which is also convex and unimodal with a global minimum f0 = 0 at x0 = (0, 0, . . . , 0). Schaffer function No. 2. We have f(x, y) = 0.5 +

sin2 (x2 − y2 ) − 0.5 . [1 + 0.001(x2 + y2 )]2

Schaffer function No. 4. We have f(x, y) = 0.5 +

cos2 [sin(|x2 − y2 |)] − 0.5 . [1 + 0.001(x2 + y2 )]2

Camel function. We have f(x, y) = 2x2 − 1.05x4 +

x6 + xy + y2 . 6

Conclusion In this paper, a robust algorithm which is based on hybridization of the Cuckoo Search with the Firefly Algorithm is proposed to find global minimum: CS-FA is swarm intelligence-based, so it has similar advantages as other swarm intelligence-based algorithms. However, CS-FA has two major advantages over other algorithms: automatical subdivision and the ability to deal with multimodality.

Authenticated | [email protected] author's copy Download Date | 1/29/18 12:23 PM

M. Elkhechafi, H. Hachimi and Y. Elkettani, Hybrid cuckoo search and firefly |

7

The proposed CS-FA-based algorithm found exactly global minimum of ten benchmark problems, so it is obvious that the best values obtained by using the proposed GA-PSO-based algorithm are the best values found for the tested benchmark problems.

References [1] [2] [3] [4] [5] [6] [7] [8]

[9] [10] [11]

[12] [13] [14] [15]

I. Fister, Jr., M. Perc, S. M. Kamal and I. Fister, A review of chaos-based firefly algorithms: Perspectives and research challenges, Appl. Math. Comput. 252 (2015), 155–165. G. Kanagaraj, S. G. Ponnambalam and N. Jawahar, A hybrid cuckoo search and genetic algorithm for reliability-redundancy allocation problems, Comput. Ind. Eng. 66 (2013), no. 4, 1115–1124. V. Kelner, F. Capitanescu, O. Léonard and L. Wehenkel, A hybrid optimization technique coupling an evolutionary and a local search algorithm, J. Comput. Appl. Math. 215 (2008), no. 2, 448–456. M. D. R. Payne, The Cuckoos, Oxford University Press, Oxford, 2005. G. Preet Singh and A. Singh, Comparative study of krill herd, firefly and cuckoo search algorithms for unimodal and multimodal optimization, Int. J. Intell. Syst. Appl. 2 (2014), no. 3, 35–49. A. Ouaarab, B. Ahiod and X. S. Yang, Discrete cuckoo search algorithm for the travelling salesman problem, Neural Comput. Appl. 24 (2014), no. 7–8, 1659–1669. S. Salcedo-Sanz, Modern meta-heuristics based on nonlinear physics processes: A review of models and design procedures, Phys. Rep. 655 (2016), 1–70. S. S. Sankalap Arora and S. Singh, A conceptual comparison of firefly algorithm, bat algorithm and cuckoo search, in: 2013 International Conference on Control Computing Communication & Materials (Allahabad 2013), IEEE Press, Piscataway (2013), 1–4. D. Shilane, J. Martikainen, S. Dudoit and S. J. Ovaska, A general framework for statistical performance comparison of evolutionary computation algorithms, Inform. Sci. 178 (2008), no. 14, 2870–2879. N. P. N. Suganthan, Problem definitions and evaluation criteria for the CEC 2005 special session on real-parameter optimization, Technical Report, Nanyang Technological University, Singapore, 2005. D. A. Wood, Hybrid cuckoo search optimization algorithms applied to complex wellbore trajectories aided by dynamic, chaos-enhanced, fat-tailed distribution sampling and metaheuristic profiling, J. Natural Gas Sci. Eng. 34 (2016), no. 1, 236–252. X.-S. Yang, Firefly algorithm, Lévy flights and global optimization, in: Research and Development in Intelligent Systems XXVI, Springer London (2010), 209–218. X.-S. Yang and S. Deb, Cuckoo search via Lévy flights, in: World Congress on Nature and Biologically Inspired Computing (Coimbatore 2009), IEEE Press, Piscataway (2009), 210–214. X.-S. Yang and M. Karamanoglu, Swarm Intelligence and Bio-Inspired Computation: An Overview, Elsevier, Amsterdam, 2013. Y. W. Zhang, L. Wang and Q. D. Wu, Dynamic adaptation cuckoo search algorithm, Control Decision 29 (2014), no. 4, 617–622.

Authenticated | [email protected] author's copy Download Date | 1/29/18 12:23 PM