IMPROVED CUCKOO SEARCH ALGORITHM FOR NUMERICAL FUNCTION OPTIMIZATION

. Cuckoo Search (CS) is a recently proposed metaheuristic algorithm to solve optimization problems. For improving its performance both on the eﬃciency of searching and the speed of convergence, we proposed an improved Cuckoo Search algorithm based on the teaching-learning strategy (TLCS). For a better balance between intensiﬁcation and diversiﬁcation, both a dynamic weight factor and an out-of-bound project strategies are also introduced into TLCS. The results of numerical experiment demonstrate that our improved TLCS performs better than the basic CS and other two improved CS methods appearing in literatures.


Introduction. For the unconstrained function optimization problem
where f (x) is continuous but may be not differentiable or multimodal. It is difficult to solve this problem by many gradient based methods.
In recent decades, more and more heuristic algorithms inspired by nature are emerging to solve the problem above. Most of those algorithms have been widely applied to solve the problems in various engineering and management areas, such as project scheduling [18,19] and RFID network planning [26]. Here are some examples as genetic algorithm [6,13], evolutionary algorithm [14], differential evolution [15,1], particle swarm optimization [3], ant colony optimization [2], artificial bee colony [7], differential search [9,10,21], firefly algorithm [23,8] and so on. All of these heuristic algorithms simulate the behaviors of biotic population. There are two important characteristics in these behaviors, one of them is the selection of the fittest and the other is the adaptation to the environment. Numerically speaking, they can be translated into two crucial characteristics, namely, intensification and diversification, in the population-based algorithm. The intensification strategy enables the algorithm to search around the current best solution and select the best candidate or solution whereas the diversification strategy ensures that the algorithm can efficiently explore the search space. In order to establish a better balance between the intensification and diversification, many hybrid or improved heuristic algorithms are proposed [12,11].
A recently metaheuristic search algorithm, called Cuckoo Search (CS), has been developed by Yang and Deb [24]. This algorithm is inspired by the reproduction strategy of cuckoos. It requires fewer parameters and has been successfully applied to solve optimization problems. However, there are some drawbacks in CS such as that the algorithm is slowly convergent at the later iterations with low accuracy. Then, several improved or modified Cuckoo Search are developed. Dynamic weight CS algorithm (WCS) is presented in [28] where a dynamic weight local search technique is introduced to enhance the optimization ability and to improve the convergence speed of CS algorithm. A self-adaptive step adjustment Cuckoo search algorithm (ASCS) was presented which speeds up the convergence of CS algorithm and improves the calculation accuracy. Another CS optimization algorithm update the disturbance of particles by Gauss distribution instead of Lévy distribution [27]. These improved or modified strategies are helpful for enhancing the performance of CS. For more recent progress on CS, we can refer to both papers [22,5] in which the recent advances and applications of CS are reviewed.
For the better performance for CS, this paper introduces three improvements, (1) updating solutions by a teaching-learning strategy with Lévy flight, (2) adjusting dynamically the weight factor, (3) introducing a novel out-of-bound control project into the basic CS. These improvements can make the CS algorithm to overcome the "premature" and accelerate its convergence to the optimum.
The remainder of this paper is organized as follows: Section 2 describes the principle of the basic Cuckoo search algorithm. In Section 3, our improved CS algorithm is presented in detail. In Section 4, based on the numerical study, we analyze the comparison results on the performance of TLCS, basic CS, WCS and ASCS algorithms. Some conclusions are followed in Section 5.
2. Principle of CS algorithm. Cuckoo Search is a population-based algorithm which simulates the behaviors of cuckoo swarm. Cuckoo Search follows three idealized rules as below [22]: 1) Each cuckoo lays one egg at a time, and dumps its egg in the chosen nest randomly; 2) The best nests with high quality of eggs will carry over to the next generations; 3) The number of available host nests is fixed, and a host can discover an alien egg with a probability p α ∈ [0, 1]. In this case, the host bird can either throw the egg away or abandon the nest so as to build a completely new nest in a new location.
Each egg in a nest represents a solution while an egg be laying by a cuckoo represents a new solution. Namely, a cuckoo represents a new solution. The aim is to use the new and potentially better solutions to replace a not-so-good solution in the nests when CS is used to solve the problem (1). The update equation for a nest is as follows where x t i is the solution, i.e., the i−th nest in generation t, and x t i =(x t i1 , x t i2 , . . . , x t in ). α > 0 is the step size which is related to the scale n of the problem. In most cases, α = 1. The product ⊕ means entry-wise multiplications. Lévy flight essentially provides a random walk, while this random step is drawn from a Lévy distribution L(λ) for a large step.
which has an infinite variance with an infinite mean. Here, the consecutive steps (or jumps) of a cuckoo essentially come form a random walk process which obeys a power-law step-length distribution with a heavy tail.
In the basic CS algorithm, a Lévy flight strategy is used to generate a search step. However, this step size is unstable [4]. Generally, the larger the flight step is, the more extensive the search is. Nevertheless, a large step might lead to a reduction of the accuracy of solution. On the other hand, the smaller the step is, the slower the convergence rate becomes. Therefore, there exist such drawbacks as low accuracy and slow convergence in CS.
3. TLCS algorithm. In this section, we will improve the CS from three aspects, i.e., teaching-learning strategy, dynamic weight factor and out-of-bound project, to enhance its performance for function optimization.
The cuckoo swarm is divided into two parts, teacher cuckoos and learner cuckoos. The searching process of cuckoo swarm for optima simulates three modes of learning: teaching phase, learning phase and Lévy flight phase. The "teaching phase" means learning from the teacher, the "learning phase" means learning through the interaction among learners, and the solutions are eliminated out of the current population at "Lévy phase". Through these three stages, teachers and learners are learning, and a teacher is generated from the learners with the best fitness value. The better the teacher is, the more knowledge the students can obtain.
3.1.1. Teaching phase. At generation t, the mean location of all learner cuckoos is denoted as M t , which is represented by During the teaching phase, the teacher role is assigned to the best individual x teacher . A teacher will put maximum effort into increasing the knowledge level of the whole swarm, while the learners will gain knowledge according to both the quality of teaching delivered by a teacher and the quality of learners. Considering this fact, the difference (indicted by Df ) between the result of the teacher and the mean result of the learners is expressed by where x teacher is the level of teacher, γ ∈ (0, 1) is a random number, and the teaching factor T F , that decides the value of mean to be changed, is randomly assigned a value of either 1 or 2 [17].
Hence, at the teaching phase the new set of improved learners can be generated by where x t new(i) is the new value of i-th learner after being updated, ω is the weight factor. Generally, for achieving the global optimum it is helpful to encourage the individuals to well dispersed in the search space during the early stages of the search. So we set the weight factor ω to adjust dynamically with the current iteration number t by (7) .
where ∆ω = ω max − ω min . Generally, ω max = 0.9, ω min = 0.1 and they are the maximum and minimum values of weight factor, respectively. T is the maximum number of allowable iteration. Therefore, this dynamic weight factor might cause the algorithm to exploit the solutions within the interior of a relatively small space in which the potential global optimum locates at the later searching stages, whereas to explore ones in a large space at the earlier stages.

Learning
Phase. This phase of the algorithm simulates the learning of the learners through interaction among themselves. A learner will learn new knowledge from the others who are more knowledgable. The learning phenomenon in this phase is expressed below. After two learners i and j, (i = j), are randomly selected, the i-th element x t new(i) in the learning phase is given by where the value of the weight factor ω is assigned by (7), r 1 and r 2 are two random constants within interval (0, 1).

Lévy flight phase.
In this phase, more better solutions will be achieved according to a specified Lévy flight and updated by using the following formula which is similar to (2).
where β ∈ R n is a randomly vector whose elements are bounded in [lb, ub], ⊗ indicates the product of the corresponding elements, and Q = (q 1 , q 2 , · · · , q n ) with where r ∈ (0, 1) is a random number and p α is a constant that equals to 0.25 [24].

3.2.
Out-of-bound project. During search process, the individual may get into trouble of sticking at the boundary of the search space or out of the boundary. In order to deal with this case we present a project by which the individual out of the boundary will be projected into the search space. The project is defined as follows: (12) by (12) by (13) by (12) by (12) Figure 1. Project plot. x 1 , x 2 , x 3 are transformed to y 1 , y 2 , y 3 , respectively, by (11) while x 4 is first transformed to y 4 by (11), then to y 4 by (12).
where i = 1, 2, · · · , n, and r 3 , r 4 are two random constants within interval (0, 1). This project devotes to transforming a solution out of the boundary into the search space by (11). If this solution is still not in the search region after transformed by (11), then it is transformed again by (12). This project can ensure that all the solutions are in the search space. We illustrate them by Figure 1 in two dimensional rectangular region. Especially, if there are a large number of new solutions out of the search space but near to boundary, the optimal solution might be near to the boundary. It can keep the transformed solution y 1 or y 3 still near to the boundary to transform solution x 1 or x 3 by (11).
Based on the description above, we state the detail procedure of TLCS by Algorithm 1.
4. Experiment, comparison and discussion. In order to demonstrate the performance of our improved algorithm TLCS, 18 benchmark problems will be tested and the numerical comparisons with CS, ASCS and WCS are made. All programs are coded in Matlab R2013a (win64) and executed in a PC computer with Intel(R) Core(TM) i3-380M, double CPU @ 2.53 GHz under Windows 7 operation system.

4.1.
Properties of the benchmark functions. All 18 test problems are selected from [12] and listed in Table 1. The objective functions of these problems consist of many different kinds of properties such as unimodal, multimodal, regular, irregular, separable, non-separable and multidimensional. Specifically, there are 4 non-separable and 3 multimodal functions, respectively. Their names, characteristics, ranges, formulas, and optimal function values are also offered in Table 1. 4.2. Parameter settings. All 18 functions of two different dimensions, 5 and 10, are tested. The maximum number of iterations T = 500 and the population size is set to 20 for all test functions of different dimensions. Set other three parameters ω max = 0.9, ω min = 0.1 and P α = 0.25.

Algorithm 1 Procedure of TLCS algorithm
Initialization. Preset the number of population, N ; the maximum iteration number, T ; the probability parameter, p α ; the teaching factor, T F ; the range of weight factors [ω min , ω max ]. Initialize the population by the uniform distribution; Generate nests that correspond to the solutions in the search space. repeat Compute fitness, f (x t i ), i = 1, 2, · · · , N , of all the nests. Evaluate nests based on their fitness, select the best. for i = 1; i < N ; i + + do //Teaching-learning Phase. Update x t new(i) by Eqs. (6), (11) and (12).
if a random number r ∈ (0, 1) > p α then Update x t i by Eqs.(9), (11) and (12). end if end for until Termination criteria are met 4.3. Results and discussion. The best, mean and standard deviation for each test function of 5 and 10 dimensions achieved by different algorithms are listed in Table 2 and Table 3, respectively. To attract attention, the best numerical results achieved by our improved algorithm are marked in bold font in both tables.
As seen from both tables, the performance of TLCS is better than CS, ASCS in the exploitation for most functions. For 5 dimensions benchmarks, TLCS, WCS can find the much better solutions than others for all the functions, and TLCS gets better solutions for f 5 , f 6 , f 7 , f 13 , f 15 , f 18 . For 10 dimensions benchmarks, TLCS also gets better solutions for f 5 , f 7 , f 15 , f 18 . Although all these four algorithms fail to find the optimal solution for f 11 , the values for f 11 achieved by TLCS is slightly better than the other three algorithms. It is because that Schwefel function is deceptive in that the global minimum is geometrically distant, over the search space, from the next best local minima. Therefore, the search algorithms are potentially prone to convergence in the wrong point.
The convergence curves of four algorithms for 1-8 benchmarks with 5 dimensions are plotted in Figure 2, respectively. Figure 2(a)-(h) graphically present the comparison on convergence characteristics between four algorithms over some a run for eight functions of 5 dimensions with the maximum number of iterations T = 500. Table 1. 18 benchmark problems of n(≥ 2) dimensions used in experiments. x = (x 1 , x 2 , · · · , x n ), C: characteristic, Opt.: optimal function value, U.: unimodal, M.: multimodal, S.: separable, N.: non-separable.
As illustrated in Figure 2, TLCS always keeps convergent faster than the other algorithms in all cases. Therefore, the teaching-learning strategy does have significant effects on the performance of algorithm. And the dynamic weight factors can keep a faster convergence for our improved algorithm. Best -3.0000e+01 -3.0000e+01 -3.0000e+01 -3.0000e+01 Mean -3.0000e+01 -3.0000e+01 -3.0000e+01 -3.0000e+01 Std.
9.4746e-13 6.1618e-13 0.0000e+00 0.0000e+00 f17 Best -3.5527e-15 -3.5527e-15 0.0000e+00 0.0000e+00 Furthermore, we apply statistical significance testing, which is a meaningful way to study the difference between any two stochastic algorithms, to do comparison among four algorithms. A non-parametric test, Wilcoxon rank sum test, is chosen to judge the difference between paired scores. The statistical results based on the best and average function values are presented in Table 4, where rank sum is the sum of ranks based on the absolute value of the difference between two test algorithms. It returns a logical h-value indicating the test decision. As a null hypothesis, there is no significant difference between the best/or mean values of two samples. Whereas the alternative hypothesis it is assumed that there is a significant difference in the best and/or mean fitness values of the two samples, at the 5% significance level. We use the function rank sum for the computation of the h-value for these tests, where the number "1" means that the first algorithm is significantly better than the second , and the "0" means that there is no significant difference between both algorithms. From Table 4, TLCS is clearly superior to CS, ASCS on 5D and 10D functions with regard to the best solutions and is equivalent to WCS.

5.
Conclusion. In this paper, we introduce three strategies into the Cuckoo Search algorithm and then propose a TLCS algorithm. The TLCS combines the Lévy flight with dynamic weight teaching-learning strategy to establish a better balance between exploitation and exploration in the process of searching optima. In addition, a dynamic weight factor and a out-of-bound project strategy are helpful to enhance the performance of TLCS. The proposed algorithm has been validated and compared with other improved CS algorithms appearing in recent literatures. Simulations and comparison show that TLCS is superior to others for those multimodal or non-seperatable objective functions. This is partly due to the fact that three strategies mentioned above are effective in TLCS. This potentially powerful optimization strategy can easily be extended to study constrained optimization or multiobjective optimization.