1 Introduction

Optimization exists in various domains, such as computer science, engineering, economics, medicine, and energy. It is primarily concerned with finding the optimal values for several decision variables to develop a solution for an optimization problem [14]. This solution is optimally considered when it satisfies the decision maker [25]. An optimization problem involves the minimization or maximization of a suitable decision-making algorithm that is typically adapted to approximation methods. The principle of decision making entails choosing among several alternatives [29]. The result of this choice is the selection of the best decision from all available choices.

Optimization algorithms are developed on the basis of nature-inspired ideas that deal with selecting the best alternative by considering a given objective function [13]. An optimization algorithm can either be a heuristic or a metaheuristic approach. Heuristic approaches are problem-designed approaches in which each optimization problem has its particular heuristic methods that are not applicable to other types of optimization problem [30]. A metaheuristic-based algorithm is also a general solver template that can be adopted for different types of optimization problem by appropriately modifying its operators and configuring its parameters. In particular, each optimization algorithm can be categorized into three classes: evolutionary algorithms (EAs), swarm-based algorithms, and trajectory-based algorithms. EAs mimic the evolutionary principle of survival of the fittest. It typically begins with a set of individuals (i.e., solutions) called a population. In each generation, EA algorithms recombine the desirable characteristics of the current population to derive a new population that is selected on the basis of the natural selection principle. Examples of EAs include genetic algorithms (GAs) [12], genetic programming [19], differential evolution [35], and the harmony search algorithm (HS) [9]. Swarm-based algorithms mimic the behavior of a group of organisms as they strive to survive. At each iteration, the solutions are typically constructed on the basis of historical information obtained from the previous generation [4]. Examples of swarm-based algorithms are artificial bee colony [17], the firefly algorithm [40], the cuckoo search algorithm (CSA) [41], and the bat algorithm (BA) [39]. Trajectory-based algorithms begin with a single provisional solution. At each iteration, this solution moves to its neighboring solution, which is located in the same search space region, using a specific neighborhood structure. Examples of trajectory-based algorithms include tabu search (TS) [10], simulated annealing (SA) [18], and hill climbing [20].

This study focuses on CSA, which was developed by Yang and Deb (2009) to emulate the brood parasitism behavior among cuckoo birds. The aggressive breeding behavior of cuckoos has inspired this optimization algorithm. Brood parasitism is a primary survival mechanism of cuckoos. Cuckoos lay eggs in host nests; these eggs carefully mimic the pattern and color of host eggs [5]. In case the host recognizes the cuckoo eggs, it will either throw the mimetic eggs out of its nest or simply leave its nest and build a new one. Therefore, cuckoos must accurately mimic their hosts’ eggs, whereas host birds must improve their skills in identifying parasitic eggs. This relationship illustrates the struggle for survival. In the context of optimization, each egg in the nest represents a solution, and the cuckoo egg represents a new solution. The objective of this study is to offer new and potentially better solutions to replace the mediocre ones in a nest. CSA can be extended to complicated cases in which each nest has multiple eggs that represent a set of solutions.

CSA is a promising optimization technique and has been successfully developed to solve global optimization problems [33]. Nevertheless, it also has drawbacks, such as solutions being poorly exploited at certain times, e.g., in cases when large steps generate a new solution that is either too far from the last solution or out of the boundary. By contrast, the effect is imperceptible when the step is too small; moreover, CSA suffers from a slow convergence rate [26]. In addition, no information is shared among solutions in CSA [24].

Wang et al. [37] proposed a hybrid algorithm that combines CSA and HS (HS/CSA) to address continuous optimization problems. In HS/CSA, the pitch adjustment of HS is used to update the process of CSA, thereby increasing population diversity. However, HS exhibits inherent drawbacks, including weak local search ability [14]. Therefore, HS/CSA still suffers when conducting local search.

Kanagaraj et al. [16] proved the efficiency of hybrid CSA and GA (HCSAGA) in solving engineering design optimization problems. HCSAGA began by randomly generating an initial solution, such that it is distributed throughout the solution space. Then, the authors applied selection, crossover, and mutation to each generation. Thereafter, the best solutions were selected by applying a certain form of elitism. Subsequently, the Levy flight operation for the best solution space was performed. Finally, the solutions in the current population were replaced with better solutions based on genetic principles. On the basis of the previous steps in identifying the best solution, HCSAGA requires a long computation time, which may lead to undesirable real problems, such as those in the clinical field.

A new hybrid algorithm that is composed of CSA and particle swarm optimization (PSO) was introduced by Wang et al. [36]. These authors claimed that the search area of PSO can be extended by hybridizing CSA and PSO, thereby preventing the shortcoming of PSO of falling easily into the extremum point.

In the current study, a hybrid algorithm that combines the optimization capabilities of CSA and BA, called CSBA, is proposed. This hybrid algorithm is introduced to overcome the limitations of CSA by exploiting the abilities of BA. BA directly utilizes the most suitable global solution in a population to identify new positions for particles at each iteration (i.e., sharing information among solutions). In addition, CSBA focuses on exploitation, thereby improving convergence (i.e., avoiding slow convergence). The proposed CSBA is expected to exhibit fast convergence, high computational precision, and improved effectiveness in searching for the optimal objective function value. The performance of CSBA is judiciously evaluated on 13 benchmark functions selected from the literature. The results illustrate the effectiveness of the proposed algorithm compared with other methods on most of the benchmark cases.

The rest of this paper is organized as follows. Section 2 reviews the basic CSA and the basic BA. The CSBA approach is presented in Sect. 3. In Sect. 4, our method is evaluated by using benchmark problems and comparing the results with eight other methods. The last part concludes the paper and points out directions for future work.

2 Preliminaries

2.1 Cuckoo search algorithm

The use of CSA in the optimization context was proposed by Yang and Deb in 2009 [41]. To date, work on this algorithm has significantly increased, and the CSA has succeeded in having its rightful place among other optimization methodologies [43]. This algorithm is based on the obligate brood parasitic behavior found in some cuckoo species, in combination with the Levy flight behavior discovered in some birds and fruit flies. The CSA is an efficient metaheuristic swarm-based algorithm that efficiently strikes a balance between local nearby exploitation and global-wide exploration in the search space problem [31].

The cuckoo has a specific way of laying its eggs to distinguish it from the rest of the birds [42]. The following three idealized rules clarify and describe the standard cuckoo search:

  • 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 ∈ (0, 1). In this case, the host bird can either get rid of the egg or simply abandon the nest and build a completely new nest. In addition, probability can be used by the n host nest to replace the new nests.

CSA is similar to other swarm-based algorithms, and the CSA starts with an initial population of n host nests. These initial host nests will be randomly attracted by the cuckoos with eggs and also by random Levy flights to lay the eggs. Thereafter, nest quality will be evaluated and compared with another random host nest. In case the host nest is better, it will replace the old host nests. This new solution has the egg laid by a cuckoo. If the host bird discovers the egg with a probability P α ∈ (0, 1), the host either throws out the egg or abandons it and builds a new nest. This step is done by replacing the abundant solutions with the new random solutions [32].

Yang and Deb used a certain and simple representation for the implementation, with each egg representing a solution. As the cuckoo lays only one egg, it also represents one solution. The purpose is to increase the diversity of new, and probably better, cuckoos (solutions) and replace them instead with the worst solutions. By contrast, the CSA can be more complicated by using multiple eggs in each nest to represent a set of solutions.

The CSA, as a bat algorithm [39] and an FA [38], uses a balance between exploration and exploitation. The CSA is equiponderant to the integration of a local random walk. The local random walk can be written as

$$ x_{i}^{t + 1} = x_{i}^{t} + \alpha s \otimes H(P\alpha - \varepsilon ) \otimes (x_{j}^{t} - x_{k}^{t} ) $$
(1)

where \( x_{j}^{t} \) and \( x_{k}^{t} \) are two different solutions selected randomly by random permutation, H(u) is a Heaviside function and generates a random number drawn from a uniform distribution between 0 and 1, and s is the step size. Furthermore, global explorative random walk by using Levy flights can be expressed as follows:

$$ x_{i}^{t + 1} = x_{i}^{t} + \alpha L(s,\lambda ), $$
(2)

And

$$ L(s,\lambda ) = \frac{\lambda \varGamma (\lambda )\sin (\lambda \pi /2)}{\pi }\frac{1}{{s^{1 + \lambda } }}\,,\quad s > > s_{0} > 0\quad $$
(3)

where L is the characteristic scale of the problem of interest, while α >0 is a factor of size scaling. The value can be calculated by α  =  O(L/10); for more affectivity, α  =  O(L/100) can be used. In addition, xt in the above equation represents the current location, which is the only way to determine the next location xt+1. This is called the random walk and the Markov chain. In the second term, αL(s, λ) represents the transition probability. However, to avoid premature convergence and increase diversity (not only confined in a local optimum), the new solutions should be generated on a remote sufficient distance from the current best solution and some random elements should be included. Figure 1 shows the representation of the CSA search process.

Fig. 1
figure 1

Flowchart of CSA

2.2 Bat algorithm

Bat-inspired algorithm (BA), introduced by Xin-She Yang in 2010 [39], emulates the echolocation behavior of bats. There are many kinds of bats in nature. All of them have similar behavior when navigating and hunting; however, they are different in terms of size and weight. Microbats extensively used echolocation feature, which assists them in seeking for prey and/or avoids obstacles in a complete darkness. The behavior of microbats can be formulated by the novel optimization technique.

In the BA, the artificial bat has position vector, velocity vector, and frequency vector which are updated during the course of iterations. The BA can explore the search space through position and velocity vectors (or updated position vectors).

Each bat has a position Xi, frequency Fi, and velocity Vi in a d-dimensional search space. The velocity, position, and frequency vectors are updated in Eqs. 4, 5, and 6.

$$ V_{i} \left( {t + 1} \right) = V_{i} \left( t \right) + (X_{i} \left( t \right) - Gbest) \times F_{i} $$
(4)
$$ X_{i} \left( {t + 1} \right) = X_{i} \left( t \right) + V_{i} \left( {t + 1} \right) $$
(5)

where Gbest is the best solution obtained so far and Fi represents the frequency of the ith bat which is updated in each course of iteration as follows:

$$ F_{i} = F_{min} + (F_{max} - F_{min} ) \times \beta $$
(6)

where β is a random number of uniform distribution in [0,1]. The BA employed a random walk to improve its capability in exploitation as given below.

$$ x_{new} = x_{old} + \varepsilon A_{t} $$
(7)

where \( \varepsilon \) is a random number in [-1,1], and A is the loudness of emitted sound. At each iteration, the loudness and pulse emission (r) are updated as follows:

$$ A_{i} \left( {t + 1} \right) = \alpha A_{i} \left( t \right) $$
(8)
$$ r_{i} \left( {t + 1} \right) = r_{i} \left( 0 \right)(1 - e^{( - \gamma \times t)} ) $$
(9)

where α and \( \gamma \) are constant parameters that lies between 0 and 1 and used to update loudness rate Ai and pulse rate (ri). The pseudocode of the algorithm is presented in Algorithm 1.

figure a

3 CSBA

This section provides the details of merging the components of CSA with those of BA. The combined algorithm avoids solutions with poor fitness to increase the quality of solutions and focuses on exploitation to improve slow convergence, thereby improving search efficiency. The following paragraphs describe the details of CSBA.

In general, Levy flight is applied to optimization and optimal search; its efficiency has been proven by achieving favorable results that signify a promising beginning [27]. Therefore, CSA is balanced between exploration and exploitation [22, 23]. However, solutions are poorly exploited at certain times, such as in cases when large steps generate a new solution that is either too far from the last solution or out of the boundary. By contrast, the effect is unnoticeable when the step is too small. CSBA is proposed to overcome this drawback of CSA by utilizing the advantages of BA; BA can provide fast convergence in the initial stage by switching from exploration to exploitation [1, 3, 44]. Thus, the advantages of the CSBA are increasing the quality of the solutions, enhancing performance, and avoiding being trapped in local optima.

Figure 2 illustrates the CSBA flowchart, which is divided into three parts. The first part shows the initialization and comparison between the solutions of Levy flight and tournament selection to send it to the second part. The second part is surrounded by a red stripe, which represents the BA component. A new solution is generated in this part on the basis of solution i from the first part. Furthermore, pulse frequency Fi, loudness Ai, and pulse rate ri are defined, as mentioned in Eqs. 6, 8, and 9, respectively. Velocities and positions (Eqs. 4 and 5) are updated, thereby allowing the search for all possible solutions around the best solution (i.e., increase in exploitation). A solution is then randomly selected among the best solutions, and a local solution is generated close to the selected best solution after checking ri (i.e., intensive local search). The new solution is selected by comparing pulse frequency with the current solution. The second part provides the best solution with a high likelihood to exceed the last condition in the third part, which is called probability Pa (Sect. 2.1). Thus, the best solution of CSBA should be efficient. The first and third parts belong to CSA, whereas the second part belongs to BA.

Fig. 2
figure 2

Flowchart of CSBA

4 Simulations

The parameter settings for the experiments are mentioned in Sect. 4.1. CSBA is compared with five optimization algorithms, i.e., the krill herd algorithm (KH), HS, GA, BA, and CSA, in Sect. 4.2 by using a set of global numerical optimization problems through various experiments performed on benchmark functions. These functions are implemented under the same conditions adopted in Ref. [37]. In the present work, the 13 benchmark functions are used to analyze CSBA. The following points show the information of all benchmark functions. The functions are classified into two groups: (1) unimodal optimization functions with only one local optimum and (2) multimodal optimization functions that frequently contain multiple global and local optima.

  1. 1.

    F1: Ackley

$$ f(x) = 20 + e - 20.e\sqrt[{ - 0.2}]{{\frac{1}{n}}}\sum\limits_{i = 1}^{n} {x_{i}^{2} - e\frac{1}{n}\sum\limits_{i = 1}^{n} {\cos (2\pi x_{i} )} } $$

Ackley is a multimodal function, usually evaluated on the hypercube xi ∈ [− 32.768, 32.768], with the global minimum at xi =  0 [3].

  1. 2.

    F2: Griewank

$$ f(x) = \sum\limits_{i = 1}^{n} {\frac{{x_{i}^{2} }}{4000} - \prod\limits_{i = 1}^{n} {\cos \left( {\frac{{x_{i} }}{\sqrt i }} \right) + 1} } $$

Griewank is a unimodal function, usually evaluated on the hypercube xi ∈ [− 600, 600], with the global minimum at xi = 0 [11].

  1. 3.

    F3: Generalized Penalized #1

$$\begin{aligned} f(x) & = \frac{\pi }{30}\left\{ {10\sin^{2} (\pi y_{i} ) + \sum\limits_{i = 1}^{n - 1} {(y_{i} - 1)^{2} } \cdot \left[ {1 + 10\sin^{2} (\pi y_{i + 1} )} \right] + (y_{n} - 1)^{2} } \right\}\\ &\quad \sum\limits_{i = 1}^{n} {u(x_{i} ,10,100,4)} \end{aligned} $$

Generalized Penalized #1 is a multimodal function, usually evaluated on the hypercube xi ∈ [− 50, 50], with the global minimum at xi= 0 [45], where \( y_{i} = 1 + 0.25(x_{i} + 1) \), \( u(x_{i} ,a,k,l) = k(x_{i} - a)^{l} \)

  1. 4.

    F4: Generalized Penalized #2

$$ \begin{aligned} f(x) & = 0.1\left\{ {\sin^{2} (3\pi x_{1} } \right\} + \sum\limits_{i = 1}^{n - 1} {(x_{i} - 1)^{2} } \cdot \left[ {1 + \sin^{2} (3\pi x_{i + 1} )} \right] \\ &\quad + (x_{n} - 1)^{2} \left[ {1 + \sin^{2} (2\pi x_{n} )} \right] + \sum\limits_{i = 1}^{n} {u(x_{i} ,5,100,4)}\end{aligned} $$

Generalized Penalized #2 is a multimodal function, usually evaluated on the hypercube xi ∈ [− 50, 50], with the global minimum at xi= 0 [45], where \( u(x_{i} ,a,k,l) = k(x_{i} - a)^{l} \)

  1. 5.

    F5: Quartic with noise

$$ f(x)\sum\limits_{i = 1}^{n} {\left( {i.x_{i}^{4} + U(0,1)} \right)} $$

Quartic with noise is a multimodal function, usually evaluated on the hypercube xi ∈ [− 1.28, 1.28], with the global minimum at xi = 0 [34].

  1. 6.

    F6: Rastrigin

$$ f(x) = 10.n\sum\limits_{i = 1}^{n} {\left( {x_{i}^{2} - 10.\cos (2\pi x_{i} )} \right)} $$

Rastrigin is a multimodal function, usually evaluated on the hypercube xi ∈ [− 5.12, 5.12], with the global minimum at xi = 0 [6].

  1. 7.

    F7: Rosenbrock

$$ f(x) = \sum\limits_{i = 1}^{n - 1} {\left[ {100\left( {x_{i + 1} - x_{i}^{2} } \right)^{2} + (x_{i} - 1)^{2} } \right]} $$

Rosenbrock is a multimodal function, usually evaluated on the hypercube xi ∈ [− 5, 10], with the global minimum at xi= 0 [15].

  1. 8.

    F8: Schwefel 2.26

$$ f(x) = 418.9829 \times D - \sum\limits_{i = 1}^{D} {x_{i} \sin \left( {\left| {x_{i} } \right|^{{{1 \mathord{\left/ {\vphantom {1 2}} \right. \kern-0pt} 2}}} } \right)} $$

Schwefel 2.26 is a multimodal function, usually evaluated on the hypercube xi ∈ [− 500, 500], with the global minimum at xi= 420.9687 [21].

  1. 9.

    F9: Schwefel 1.2

$$ f(x) = \sum\limits_{i = 1}^{n} {\left( {\sum\limits_{j = 1}^{i} {x_{j} } } \right)^{2} } $$

Schwefel 1.2 is a unimodal function, usually evaluated on the hypercube xi ∈ [− 100, 100], with the global minimum at xi = 0 [15].

  1. 10.

    F10: Schwefel 2.22

$$ f(x) = \sum\limits_{i = 1}^{n} {\left| {x_{i} } \right| + \prod\limits_{i = 1}^{n} {\left| {x_{i} } \right|} } $$

Schwefel 2.22 is a unimodal function, usually evaluated on the hypercube xi ∈ [− 100, 100], with the global minimum at xi = 0 [15].

  1. 11.

    F11: Schwefel 2.21

$$ f(x) = \max_{i} \left| {x_{i} } \right|,\quad 1 < i < n $$

Schwefel 2.21 is a unimodal function, usually evaluated on the hypercube xi ∈ [− 100, 100], with the global minimum at xi= 0 [28].

  1. 12.

    F12: Sphere

$$ f(x) = \sum\limits_{i = 1}^{n} {x_{i}^{2} } $$

Sphere is a unimodal function, usually evaluated on the hypercube xi ∈ [− 5.12, 5.12], with the global minimum at xi= 0 [8].

  1. 13.

    F13: Step

$$ f(x) = 6.n + \sum\limits_{i = 1}^{n} {\left\lfloor {x_{i} } \right\rfloor } $$

Step is a unimodal function, usually evaluated on the hypercube xi ∈ [− 5.12, 5.12], with the global minimum at xi = 0 [7].

All the experiments are run using a computer with processor Intel(R) Core (TM) i5-3210M CPU @ 2.66 GHz with 4 GB of RAM and 32 bit for operating system with Microsoft Windows 10 professional. The source code is implemented using the MATLAB (R2015a).

It is worth to mention that all the experimental results (Tables 110) show the best normalization (i.e., the best value for each method is determined and then normalized) and the mean normalization (i.e., the average value for each method is determined and then normalized) of each benchmark function for each algorithm. That is, normalization is the process of regularizing data with respect to the difference in values between samples. In the experiments, different benchmark functions are compared with one another. This procedure is difficult due to the wide gap between solutions. Therefore, normalization improves data integrity [9]. In this article, normalization is calculated based on the following equation:

$$ z_{i} = \frac{{x_{i} - \mu }}{S} $$
(10)

where is x = (x1, , xn), n denotes the total number of data, zi denotes the normalized data for element ith, µ is the mean, and S is the standard deviation. Finally, the minimum element of the data will be 1 in the normalization results.

Table 1 Best normalized optimization results for CSBA with different n

4.1 Influence of control parameter

Parameter setting plays an important role in the performance of meta-heuristic methods when solving different problems. In this work, the parameters of BA (i.e., loudness (A), pulse rate (r)) and the parameters of CSA (i.e., discovery rate (), population size (n)) are thoroughly studied with 100 implementations with 10,000 run times performed for each algorithm on each benchmark function to decrease the influence of randomness. The results show the best value of each parameters (see Tables 38) which are used later in Sect. 4.2.

4.1.1 Population size: n

The parameters setting is used in this section as follows: There are different values of n (5, 10, 15, 20, 50, 100, 150, 250, and 500) with the fixed value for each of ( = 0.25, A and r = 0.5). Tables 1 and 2 illustrate the results of CSBA with different values of n.

Table 2 Mean normalized optimization results for CSBA with different n

As shown in Table 1, all the results are close to one another except when n = 20 (i.e., by looking at the last row “Total,” the numbers are nearly similar except when n = 20; the number is 10). The results of the best normalization when n = 20 outperform the others in all benchmark functions except F5, F7, and F11. Furthermore, the results of the mean normalization in Table 2 refer to the convergence of the results for n = 20 by achieving 11 best results out of 13. Therefore, the value of n will be set to 20 in the experiments later.

4.1.2 Discovery rate:

The effect of the elitism parameter is studied in the benchmark problems with the elitism parameter  = 0–1 (0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, and 1.0), both A and r = 0.5, and n = 20 (see Tables 3 and 4).

Table 3 Best normalized optimization results for CSBA with different P α
Table 4 Mean normalized optimization results for CSBA with different P α

Table 3 shows that CSBA performs best when  = 0.1, 0.2, and 0.4; CSBA has a similar performance, especially for F3, F10, and F13; that is, the elitism parameter has little influence on the three benchmark functions. Furthermore, when  = 0, 0.3, and 0.5–0.9, the CSBA performance achieves almost the same results. However, the worst results are obtained when  = 1. Therefore, CSBA has the best performance when  = 0.2. On the basis of these results, is set to 0.2 in the present study.

4.1.3 Loudness: A

The influence of A is investigated through an array of simulations with A = 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0. n, Pα, and r are equal to 20, 0.2, and 0.5, respectively (see Tables 5 and 6). From Table 5, A = 0.7 for F1, F3 to F5, F7, F10, F12, and F13. By contrast, the CSBA performs the worst when A = 0 and 0.1, especially for F1, F9, F10, and F13. Therefore, the value of A will be set to 0.7 in the last experiment for r.

Table 5 Best normalized optimization results for CSBA with different loudness
Table 6 Mean normalized optimization results for CSBA with different loudness

4.1.4 Pulse rate: r

As mentioned in previous paragraphs, the values of n, , and A are set to 20, 0.2, and 0.7, respectively. The influence of pulse rate r is studied in the benchmark functions with r = 0, 0.1, 0.2, 0.9, 1.0 (see Tables 7 and 8).

Table 7 Best normalized optimization results for CSBA with different pulse rate
Table 8 Mean normalized optimization results for CSBA with different pulse rate

Table 7 shows that three sets of results were obtained. Beginning with r = 0.4, which obtained the best CSBA performance for F4, F6–F8, F10, and F12–F13, followed by the second set, which includes r = 0.1–0.2, 0.5–0.6, and 0.8–1.0, all the r values have the same amount of the best value total. The last set contains the remaining benchmark functions that obtained the worst results. Therefore, CSBA has the best performance when r is equal or close to 0.4. Based on the results, r is set to 0.4.

4.2 Comparisons with other methods

CSBA is initially compared with the global optimization problems of five optimization algorithms, namely KH, HS, GA, BA, and CSA. In our simulations, similar parameters for CSA, BA, and CSBA (as shown above) are set with population size n = 20, discovery rate  = 0.2, loudness A = 0.7, and pulse rate r = 0.4. The parameters used for KH, HS, and GA are the same as those used for each original algorithm. The other parameters, i.e., frequency minimum, frequency maximum, function dimension, and maximum generation, are set to 0, 2, 20, and 100,000, respectively. A total of 100 implementations are performed for each algorithm on each benchmark function to decrease the influence of randomness. Tables 9 and 10 show the different scales used to normalize the values for illustrating the differences of the six methods.

Table 9 Mean normalized optimization results
Table 10 Best normalized optimization results

Table 9 presents the average of the results. CSBA is the most effective in determining the minimum objective function on 10 of the 13 benchmarks, namely F1F2, F5F7, and F9F13. CSA ranks second and performs best on F3, F8, F10, and F12. CSA is followed by GA, which performs best on F3 and F4. HS performs best on F3. Table 10 shows that CSBA performs best on 11 of the 13 benchmarks, namely F1F3, F5, and F7F13. CSA and GA are the second most effective; they perform best on the benchmarks F10, F13, and F4, F6, respectively. Notably, the results of CSBA that did not achieve the optimal solutions (i.e., F3, F4, and F9 in Table 9; F4 and F6 in Table 10) are under the multimodal functions, which focus on global and local optima. Furthermore, multimodal functions have complex equations. However, all the results of CSBA in the aforementioned functions are very close to the optimal solution.

The most representative convergent curves are illustrated in Figs. 310. The values in the figures are the mean function optima, which are the true values.

Fig. 3
figure 3

Performance comparison for F1 Ackley function

Figure 3 shows that CSBA is capable of finding better solutions compared with all the other methods. As shown in the figure, HS converges sharply during the initial search stage; however, as soon as HS is trapped in local minima, the global minimum slightly decreases. Furthermore, BA is close to CSBA during the initial stage, but their difference increases during the second stage. BA, CSA, GA, and KH initially move toward the best solutions, whereas GA converges toward the minimum later than the others. CSBA is the best among all the methods.

Figure 4 shows that CSBA is the fastest method for finding the best solution in the first part, with GA ranking second. By contrast, CSA and KH are the best performers in the second part. As shown in the figure, all the algorithms begin optimization at nearly the same point, whereas CSBA has a more stable convergent speed than the others. Several difficulties are encountered in finding the best results in the original CSA compared with those in the other methods. In this case, CSBA is the most efficient and fastest method for finding the best global function values among the six methods.

Fig. 4
figure 4

Performance comparison for F3 Penalty 1 function

Figure 5 shows that the results are nearly similar to the results presented in Fig. 4. Therefore, the original CSA experiences more problems in determining the best global solution compared with the other methods. The results of the initial stage indicate that KH achieves better results than CSBA. However, the final results illustrate that CSBA obtains the best results, whereas KH obtains the worst. HS also has faster convergent speed than the other methods. Moreover, it achieves the closest results to CSBA.

Fig. 5
figure 5

Performance comparison for F4 Penalty 2 function

Figure 6 shows that CSBA performs equally with all the other methods. Moreover, BA achieves the best results at the 11th generation. However, CSBA converges in a more stable state for this case compared with the other methods. The combination of CSA and BA demonstrates good performance.

Fig. 6
figure 6

Performance comparison for F6 Rastrigin function

Figure 7 shows that CSBA achieves the best performance among the six methods, followed by CSA. GA exhibits the third best performance with a relatively slow and stable convergence rate. Similarly, the results of all the methods are close to one another, with CSBA gaining a slight advantage, as shown in Fig. 8.

Fig. 7
figure 7

Performance comparison for F7 Rosenbrock function

Fig. 8
figure 8

Performance comparison for F9 Schwefel 1.2 function

Figure 9 illustrates that CSBA performs better than the other methods in the unimodal case, particularly in the second part. In the beginning, GA outperforms CSBA until the 15th generation and then CSA until the end. Figure 10 indicates that CSBA achieves the best performance among the six methods in the optimization process, followed by GA, CSA, and KH.

Fig. 9
figure 9

Performance comparison for F10 Schwefel 2.22 function

Fig. 10
figure 10

Performance comparison for F12 Sphere function

An analysis of Figs. 3 to 10 determines that our proposed metaheuristic CSBA considerably outperforms the other methods.

5 Conclusion

In this work, CSA is improved by combining it with BA. The hybrid method, CSBA, is then evaluated on various benchmarks. In CSBA, the first population is optimized by CSA during iteration, and the best solution is randomly embedded into the second population evolved by BA. Thereafter, the result obtained by BA is rechecked through the discovery rate in CSA. CSBA, as a combination of CSA and BA, is capable of exploiting the good features of the two basic algorithms and preventing all individuals from getting trapped in inferior local optimal regions. Furthermore, CSBA is investigated on 13 benchmark functions. The results show that CSBA exhibits improved efficiency and effectively compared with other search methods, such as the CSA, BA, GA, HS, and KH. CSBA can be applied to other benchmark functions, such as real-world optimization problems, for further examination.

Finally, future work should focus on local search algorithms, such as hill climbing, SA, and TS. Furthermore, different algorithms should be applied to compare them with one another. The performance of the proposed algorithm on other benchmarks and on real-life problems should also be investigated.