#### Abstract

The balance between exploitation and exploration essentially determines the performance of a population-based optimization algorithm, which is also a big challenge in algorithm design. Particle swarm optimization (PSO) has strong ability in exploitation, but is relatively weak in exploration, while crow search algorithm (CSA) is characterized by simplicity and more randomness. This study proposes a new crow swarm optimization algorithm coupling PSO and CSA, which provides the individuals the possibility of exploring the unknown regions under the guidance of another random individual. The proposed CSO algorithm is tested on several benchmark functions, including both unimodal and multimodal problems with different variable dimensions. The performance of the proposed CSO is evaluated by the optimization efficiency, the global search ability, and the robustness to parameter settings, all of which are improved to a great extent compared with either PSO and CSA, as the proposed CSO combines the advantages of PSO in exploitation and that of CSA in exploration, especially for complex high-dimensional problems.

#### 1. Introduction

Bio-inspired optimization algorithms have become increasingly popular over the past decade due to their simplicity of implementation, robustness, and ability of parallel computation [1]. Although the specific principles and procedures of bio-inspired optimization algorithms are various, it is a consensus that an effective search technique must strike a balance between exploring new regions in the search space and exploiting known promising regions [2, 3].

Particle swarm optimization (PSO), developed by Kennedy [4] in 1995, is one of the most popular bio-inspired algorithms with wide applications in industrial design [5], energy distribution [6], economic dispatch [7], and so on. PSO is inspired by the social behavior of bird flocking or fish schooling. A swarm of particles moves inside a bounded search space and cooperates to identify the best solution under the guidance of social attraction and cognitive attraction, which are used with the aim of exploiting and controlling the cooperation within the swarm. Meanwhile, the exploration of the search space is considered by an inertia factor weighing the movement of particles and the magnitude of their velocities. Nevertheless, similar to other bio-inspired algorithms, PSO also suffers from the bane of premature convergence and entrapment in local optima when solving complex multimodal problems [8, 9], i.e., the algorithm has difficulty exploring all regions, and some of the peaks are easily missed. Various improvements to PSO have been made to balance exploration and exploitation search.

Crow search algorithm (CSA), proposed by Askarzadeh [10] in 2016, is a newly developed algorithm inspired by the strategic behavior of crows while searching food, thievery, and chasing behavior. CSA is characterized by easy implementation, less parameter setting, and relatively strong development capacity in the searching process [11]. However, CSA also suffers from low search precision, high possibility of getting into the local optimum, and premature convergence, especially for multidimensional optimization problems [11], which may result from two important features in the basic CSA [12, 13]: (1) there is no criterion for choosing the destination and the selection is done randomly between all crows; (2) the amount of flight length is a constant value which may cause inappropriate searching by the crows in the solution space that results in trapping in the local optimum. In the past few years, most of the recent research studies focused on the application of the algorithm in different scientific fields with suitable modification. In case of feature selection, Sayed et al. [3] combined chaos with CSA to enhance the performance and convergence speed, while Chaudhuri and Sahu [14] proposed time varying flight length to obtain better results. As for energy optimization, Makhdoom and Askarzadeh [15] incorporated adaptive chaotic awareness probability into CSA to optimize operation of photovoltaic/diesel hybrid energy system. To overcome unbalanced exploration and exploitation phases, Shekhawat and Saxena [13] improved the algorithm by a cosine function and opposition-based learning concept. CSA variants have been categorized into modified versions [16–18] and hybrid versions [19–21].

Both PSO and CSA are population-based techniques. For optimization problems, the most critical part is to find as many local optimal solutions as possible and gradually move to the global best. Therefore, the most important thing is to give the solutions some degree of freedom during iteration while making the optimization process efficient, i.e., to balance between exploration and exploitation. It can be inferred from the previous studies that PSO is more capable in controlling exploitation by social and cognitive factors, but its ability of exploration in the unknown region is highly influenced by the current best solutions in spite of the existence of random numbers affecting the acceleration coefficients. In contrast, the individual in CSA moves completely randomly when it is aware of being tracked to get rid of the stalker. Hence, CSA performs better in exploring new regions in the search space. A few studies have proposed hybrid models combining PSO and CSA. Babu et al. [22] have proposed a model that connects the update procedure of CSA with that of PSO, i.e., every particle updates its position twice for each iteration. Crow Search Algorithm Auto-Drive PSO [23] uses CSA as the outer algorithm to optimize the sizing of renewable distributed generations; then, PSO is applied for the optimal power flow of the power distribution system as inner optimization. Both algorithms execute the position updating procedure using formulas from PSO and CSA during each iteration. In [22], it is used to address the same problem, while Farh et al. [23] divide a problem into two parts which are optimized by CSA and PSO, respectively. However, their algorithms are applied on specific situations without detailed evaluation on further performance. To take advantage of the ability of CSA in exploration and the ability of PSO in exploitation, this paper proposed a new Crow Swarm Optimization algorithm (CSO). Besides, moving towards the (current) best particle in the swarm and the best position is autonomously found so far, and each individual also has a probability to stalk the best ever solution of another individual. The proposed CSO essentially adds the information sharing mechanism in CSA and explores the unknown region between the two individuals using PSO. Numerical benchmark problems are tested using the proposed algorithm, and the results prove that it performs better in balancing exploitation and exploration with a few parameters.

The rest of the paper is organized as follows. Section 2 introduces the proposed CSO algorithm as well as traditional PSO and CSA. Section 3 is the performance evaluation on several benchmark functions with an example of application in real-world problem. Section 4 draws the conclusions.

#### 2. Crow Swarm Optimization Algorithm (CSO)

##### 2.1. Standard PSO

PSO imitates the foraging behavior of bird flocks and consists of a collection of agents, so-called particles. The position of each particle represents a solution, and each particle retains the information of its current position, velocity, and its personal best found position within the search space. The particles move to new positions with a velocity vector, which is iteratively updated based on its attraction towards the best position found by the particle and the best position found by any particle within the search space, i.e., the position of particle *i* at the *t*th iteration is determined by the position vector and the velocity vector . The updating formulas for particle velocity and position are shown in Equations (1) and (2):where is the number of the particles in population, is the inertia weight coefficient, and are called acceleration coefficients, indicating the cognition degree of the particle to the individual and the society, respectively, are random numbers in [0, 1], represents the current optimal position of particle, represents the best position of the current population, and are the lower and upper limit of particle update velocity, respectively; in this paper, . and are the minimum and maximum positions of particles, respectively.

The key idea of PSO is that, under the dominant action of better particles, each particle is close to the global optimal position. Although there exist random numbers and to avoid that the movements of the particles are completely decided by its current optimal position and the best position of the current population, it can be inferred that these two factors have great impact on the movement of particles. Thus, the initial position of the particles affects the search process greatly, and a large part of unknown regions can be hardly paid attention to. Such characteristic provides a strong capacity of exploiting the known information, while it is weaker in the exploration of new regions, which lead to premature convergence, i.e., the optimization easily converges to a local optimum.

##### 2.2. Standard CSA

CSA is a new search algorithm inspired by the behavior of crows hiding and stealing food. It is nongreedy and can increase the variety of generated solutions. The principles of CSA are listed as follows: (1) crows live in the form of flock, (2) each crow can memorize the position of their hiding places and steal food from other crows, and (3) with a certain probability, the crow can be aware of being stalked and then protect its food from being stolen by flying randomly. The position of each crow represents a solution . During the iteration, crow tracks a random crow . If crow is not aware of being tracked (i.e., ), crow approaches the hiding place () of crow ; while if crow knows that crow is chasing it, crow fools crow by going to a random location in the search space to protect its hiding place from detection. The mathematical expression iswhere and are random numbers with uniform distribution between 0 and 1, is the length of a crow’s flight, is the perceptual probability of crow , and is the location where the current crow stores food, which is equivalent to the historical optimal solution the current crow has found.

CSA is a population-based optimization algorithm that is fairly simple with only two adjustable parameters (flight length and perceived probability ), which in turn makes it very attractive for different engineering applications. In CSA, the parameters of perceived probability are directly used to control the diversity of the algorithm. Compared with genetic algorithm (GA), PSO, and harmony search algorithm (HS), CSA has fewer parameters to adjust and is easier to implement. Moreover, the individual in CSA has the possibility of reaching a total random position, and thus, it has stronger ability of exploring newly unknown regions. However, CSA has lack of the criterion for choosing the destination and the selection is done randomly between crows; besides, the flight length is a constant value. Such characteristics of CSA lead to a weaker ability of exploitation of current information compared with PSO, resulting in low search precision, high possibility of getting into the local optimum, and premature convergence, especially for multidimensional optimization problems.

##### 2.3. Proposed CSO

To take advantage of both the PSO in exploitation and CSA in exploration, this study proposes a new crow swarm optimization algorithm (CSO). The movement of particles in CSO is influenced by the best position found so far by the particle itself and the best position identified so far by the whole swarm, as in PSO. Meanwhile, the particle keeps an eye on each other, i.e., there exists a possibility that its movement is determined by the best position identified by the whole swarm and the best solution found so far by another particle; in CSA, it tracks the position where another crow hides the food. The formula updating the flying velocity of crows in CSO iswhere represents the degree of the influence of individual *j* on individual *i* and is a random number within [0, 1]. The updating velocity in equation (4) is also limited by and .

When , the individual *i* decided to track individual *j*, and the velocity of individual is affected by inertia velocity, global optimal solution, and current optimal solution of individual . Otherwise, the velocity of individual is composed of inertia velocity, global optimal solution, and local optimal solution of individual . When the velocity of individual is obtained, the position of individual in the next iteration is calculated by equation (2).

Figure 1 shows the flowchart of the proposed CSO. It can be seen from Figure 1 that the difference between proposed CSO with other two algorithms mainly comes from the method of updating the particle speed and position. PSO pays more attention to the optimization efficiency and aims to be closer to the current optimal solution in the iterative process, thus resulting in a strong ability of exploiting the current known information, while CSA gives greater freedom to the algorithm to ensure the diversity of solutions, which produces greater ability of exploring unknown regions. The proposed CSO combines the advantages of both the PSO and the CSA to reach a better balance between increasing randomness and improving efficiency, i.e., between exploration and exploitation.

##### 2.4. Individual Movement

Individual movement directly affects the performance of the swarm intelligence algorithm. Figure 2 shows the schematics of how an individual updates its position in (a) PSO, (b) CSA, and (c) CSO. The movement of the individuals in PSO is rather fixed and determined by its inertia, its current best position, and the best position identified by the whole swarm. Both CSA and CSO provide alternatives with a certain probability to better maintain the diversity of solutions. However, it can be seen that CSA is less efficient compared to CSO due to the divergence of the way the solutions update. CSO preserves the optimization efficiency of PSO with a possibility of exploring larger regions. In CSO, the larger the value of the probability parameter is, the stronger directional characteristic it has. When = 1, CSO degenerates into standard PSO; while when = 0, the individuals in CSO always randomly select the historical optimal solution of an individual in the population to track with less exploitation of other known information. It should be illustrated that when is equal to 0, CSO does not degenerate into CSA, but it retains the characteristics of rich diversity of CSA.

**(a)**

**(b)**

**(c)**

#### 3. Experiments and Discussion

##### 3.1. Standard Benchmark Functions

Extensive experiments are conducted on a set of well-known benchmark functions to ascertain the performance of the proposed CSO, including the global optimization problems shown in Table 1. The experimental settings are as follows: the maximum iteration number is 1000, and the swarm size is set to be 100; the parameters in equations (1) to (4) are set to be *c*_{1} = *c*_{2} = *c*_{3} = 2, , = 0.2, = 2, and = [2]^{D}.

In Table 1, *D* indicates the dimension of the problem and represents the value of the decision vector in dimension *i*.

These test functions have included both unimodal functions (such as Sphere, Schwefel’s problem 1.2, Step, and Rosenbrock) and multimodal functions (such as Ackely and Griewank). Unimodal functions with one global optimum and no local optima are used to investigate the exploitation level and the convergence rate of the algorithms, while multimodal benchmark functions with multiple local optima are used to test the ability of algorithms to avoid entrapment in local optima and explore new unknown regions.

In addition, a parameter representing the improvement efficiency is introduced to evaluate the progress of CSO compared with standard PSO or CSA:

##### 3.2. Optimization Efficiency

Table 2 shows the optimization results of the three algorithms for different target functions, respectively. In addition to the above-described three methods, recently, well-accepted bio-inspired optimization algorithms MBO and MS are also examined to better illustrate the performance of CSO. Each test conducts 25 trials to eliminate the influence of the initial population and enhance the reliability of the optimization results. Ten out of thirteen test functions show that CSO finds the best optimum values among compared to other algorithms. However, the performance of CSO on Rastrigin’s function, Michalewicz function, and Griewank function is inferior to that of MS or MBO. For Rosenbrock function and CEC 2011 problem of parameter estimation for frequency-modulated (FM) sound waves, CSO has its best performance extremely close to 0, which is never reached by neither MS nor MBO. However, how to maintain this potential in each run still needs further research. It can be seen from the data that, in most cases, CSO performs better than both PSO and CSA, with not only a smaller value of the optimum but also less standard deviation. The results indicate that CSO has stronger optimization ability with higher stability. For some benchmark problems, the minimum value obtained by CSO is even different in magnitude from both PSO and CSA, indicating that the optimization performance of CSO has been greatly improved. CSA performs better in specific problems where the feasible region is relatively small, such as CEC2011 problem2. However, when the feasible range is in the hundreds of orders of magnitude, CSO’s performance can degrade dramatically. Although we tried to change the parameters of the algorithm, it was time-consuming and often difficult to obtain the desired results.

Figure 3 shows the variation of the optimums with the increase of the variables dimensions for (a) the unimodal problem of sphere function and (b) step function, as well as (c) the multimodal problem of Rastrigin’s function and (d) Ackley function under other fixed conditions. It can be found from Figure 3 that CSO is able to maintain a relative high exploitation level for unimodal function with high dimensions. To improve the quality of the solution for high-dimensional problems, the size of the population is usually enlarged, which leads to a great increase of the calculation cost. Figure 3(a) indicates that, for a 10D problem, the optimum resulting from CSO still remains in the order of 10^{−23}, while those from CSA and PSO rise to 10^{2} and 10^{−3}, respectively. Moreover, CSO also has the shortest error bars, which represent the stability of the algorithm. Figure 3 demonstrates that CSO performs superiorly for high-dimensional unimodal problems.

**(a)**

**(b)**

**(c)**

**(d)**

The improvement made by CSO on the multimodal problems varies with different problems. For Ackley function, Table 1 shows that the optimization efficiency of CSO is still significantly better than that of CSA and PSO. The three algorithms perform the worst when solving Rastrigin’s problem, in which case, CSO is still the best among them. Table 1 also indicates that the improvement efficiency of CSO is as high as 0.96 and 0.26 compared with CSA and PSO, respectively. Figure 3(c) shows the optimization results of Rastrigin’s function with different dimensions. It is clear that the optimization results degrade significantly as the dimension increases. Nevertheless, CSO has the weakest degradation among the three algorithms. The same trend could also be observed in Figure 3(d).

##### 3.3. Global Search Abilities

Figure 4 shows the evolution of the global optimum in the optimization process of the three algorithms. As suggested in Figure 4(a), PSO converges earliest in the iteration, and there is almost no improvement after 100 iterations. However, for CSA and CSO, improvements can still be observed even at the end of the iteration. Such phenomenon indicates that PSO is prone to premature convergence, while CSA and CSO still preserve the diversity of solutions to a certain extent during the optimization process, i.e., have a stronger ability of exploring new regions in the search space. It can be seen from Figure 4(a) that although CSA can avoid being trapped in local optima, and its ability to find a better solution is weak. In the later iteration, the solution obtained by CSO is smaller compared to CSA. To better investigate the optimization process, a concept of turning point is proposed here. When the optimum of a certain generation is better than that of the previous generation with a certain amplitude (in this study, it refers to the fourth decimal point or above of the objective value being improved), the current generation is defined as a turning point. Table 3 shows the statistics of turning points for the three algorithms in 25 trials. For Rastrigin’s function, the average number of the turning points of PSO is much higher than that of CSA and CSO, but most of them are centralized in the first 100 iterations and the change for each turn is small. As for CSA and CSO, the last turning point is over 800, verifying that both CSA and CSO have a better ability to jump out of the local optimal solution, i.e., the ability of exploration. Since CSA gives too much freedom to the algorithm, the amount of turning point is least, indicating its low efficiency. CSO possesses a moderate number of turn with relative high change, which makes it a more balanced algorithm.

**(a)**

**(b)**

Figure 4(b) shows the optimization process of the three algorithms for Ackely function. For PSO, there are several times when the optimum is trapped around 2. The optimization process of CSA looks like a staircase and improved every several iterations. It can be inferred that a certain number of iterations is still in need to get to 0. The best results are obtained from CSO, for which the optimums of all trails are quite close to 0. The calculated turning point in Table 3 shows that, after about 365 iterations, CSO almost reaches the global optimum value. The purple line (CSO) first sandwiched between the yellow line (PSO) and the blue line (CSA), and then, it passes these two lines coming to the bottom of the diagram in both Figures 4(a) and 4(b). CSA introduces an antitrack mechanism so that more randomness is given to the algorithm, which greatly reduces the possibility of entrapment in a local optimum at the expense of efficiency [13]. PSO employs local and global optimal solutions to direct the optimization process, so it has higher optimization efficiency but also higher probability of getting stuck. Based on the above results, it can be concluded that CSO absorbs the advantages of PSO and CSA while overcoming the shortcomings of both, so it is able to approach the global optimal solution quickly while maintaining a certain diversity of solutions.

##### 3.4. Robustness to Parameter Settings

Table 4 is the optimization results of two unimodal functions, indicating the impact of the setting of parameter on the algorithm performance with other parameters unchanged. Given that ∈ [0, 1], when takes the values of the two endpoints, the optimization result is always the worst. For = 1, the result of CSO is close to that of PSO. For unimodal problems such as sphere functions, the performance of CSA deteriorates with the increase of , while for Schwefel’s problem 1.2, the results of CSA is unstable and do not have obvious rule; thus, the tunning of AP is a big challenge.

Figure 5 shows the impact of on solving more complex multimodal problems. It can be seen that the performance of CSO is not stable when is close to endpoints. For the case = 1, CSO degenerates into PSO. For CSA algorithm, when = 2, the optimal value of is concentrated between 0 and 0.2 [10]. If is too large, the optimization ability of CSA becomes quite weak. When the gets closer to 1, CSO gradually approaches PSO, and the algorithm can be easily trapped in a local optimum. Both Table 4 and Figure 5 indicate that the value of should be far from the two endpoints for CSO.

**(a)**

**(b)**

The impact of on the performance of CSO and CSA is discussed above given that = 2. *fl* is another important parameter for CSA algorithm. The combination of these two parameters together determines the optimization capability of CSA. Askarzadeh [10] has mentioned that the parameters of and played an essential role in the CSA search process as the solution obtained by the right parameter was far superior to the one using the improper value. For different optimization problems, it is necessary to choose among different parameters to get the reasonable optimal solution.

Figure 6 compares the results obtained from CSA and CSO under different parameter combinations. In the previous discussion, it has been realized that a large would greatly undermine the optimization ability of CSA. Therefore, the upper bound of is set to 0.5. Askarzadeh [10] also mentioned that the best choice of parameter may be around 2. Thus, the range of is set as [1.25, 2.75]. Figure 6(a) shows the optimization result of sphere function with dimension of 6, and Figure 6(b) is that of Rastrigin’s function with dimension of 4. The upper surface of the figures represents the running result of CSA algorithm, while the lower surface is the optimized result of CSO. As parameters and play the similar role in the optimization process as they both restrict the updating velocity of the solution, the parameter (assuming has the same value in each dimension, so is treated as a scalar) in CSO is taken as . As can be explored from Figure 6, the upper surface is always steeper than the lower surface, indicating that the performance of CSA greatly depends on the setting of parameters. For the sphere function, of all parameter combinations applied in this study, the worst result (1.61) is 10 times worse than the best result (0.15). However, for CSO, all parameter combinations reach extremely close to 0, making almost a flat surface, i.e., CSO has stronger robustness to parameter settings compared with CSA. For multipeak Rastrigin’s function, the standard deviations for CSA and CSO are 1.02 and 0.25, respectively, which also proves that CSO greatly reduces the dependency on parameters.

**(a)**

**(b)**

##### 3.5. Application in Real-World Problem

Optimization algorithm is often used in the optimal operation of reservoir. This section describes the ability of the CSO algorithm to solve real-world problem. It is a short-term scheduling of a hydrothermal power system described in CEC 2011 competition. The optimal goal is to meet the load demand and reduce the cost in accordance with the various constraints put on the hydraulic systems and the power system networks. Hourly discharge management for four hydro units requires 96 variables, i.e., = 96.

The objective function for this problem is to minimize the cost of thermal power plant. The operation is subjected to several limitations, including demand constraints, thermal generator constraints, hydro generator constraints, storage capacity constraints, and reservoir limit constraints. These constraints are added in the fitness function as penalty term. The detailed description and data could be found in [24].

Each algorithm was run for 25 times, and the average value of the optimal solution for each run was calculated to get the results, as shown in Figure 7. From the figure, we can see PSO performs badly since several penalties being relatively large, leading to the worst total objective value. MBO occupies the second largest circle, indicating that its performance is slightly better than that of PSO. As for CSA, the total objective value is small compared to PSO, while it violates the requirements of the discharge to a large extent. The best result comes from MS, which takes up the smallest area. CSO also meets almost every requirement with slight penalty. Table 5 shows the optimal and average values of 25 runs. The best total objective value comes from CSO and MS, which reduced by 57.6%, 70.9%, and 85.5% compared to CSA, PSO, and MBO, respectively. Optimized total cost does not make huge differences, and the penalty term is deterministic factor that influence the optimization results. Both CSO and MS could make every penalty equal or close to 0. Thus, it is believed that CSO has the same strength when tackling this problem, but sometimes it is trapped in local optima, which needs further improvements. As a conclusion, the operation scheme obtained by CSO could be a powerful alternative. Combined with above analysis, CSO may also be strong in real-world problems since it is explorative and efficient.

#### 4. Conclusion

The balance between exploitation and exploration essentially determines the performance of a population-based optimization algorithm, which is also a big challenge in algorithm design. PSO is a popular bio-inspired optimization algorithm with strong ability in exploiting the existing information, i.e., every movement of the particles is under a certain guidance resulting from the previous knowledge, which leads to the weakening of the ability of exploring. CSA is a recent proposed algorithm with characteristics of simplicity, less parameters, and more randomness. The probability of flying totally randomly makes CSA has stronger ability of exploring new regions in the search space, while also results in a large computational cost and low search precision. This study proposes a new crow swarm optimization algorithm coupling PSO and CSA, which provides the individuals the possibility of exploring the unknown regions under the guidance of another random individual. The proposed CSO algorithm is tested on several benchmark functions, including both unimodal and multimodal problems with different variable dimensions. An example of its application in hydrothermal scheduling problem is also presented. The performance of the proposed CSO, the standard PSO, and CSA is evaluated by the optimization efficiency, the global search abilities, and the robustness to parameter settings. The results verify that the proposed CSO has better optimization ability compared with PSO and CSA, and it is less likely to fall into the local optimal solution than PSO algorithm and more efficient than CSA algorithm, i.e., CSO is good at approaching the global optimum quickly while maintaining a certain diversity of solutions during iteration. It can be concluded that the proposed PSO combines the advantages of PSO in exploitation and that of CSA in exploration. In addition, CSO has stronger robustness to the parameter and than CSA, which was regarded a major drawback of CSA previously. Although the proposed algorithm performs better than traditional PSO and CSO, it does sometimes become inferior to other algorithms. CSO, in this paper, is based on original PSO, but it could be applied in other modified version of PSO instead of traditional ones for possible further improvements. It is impossible for this algorithm to beat all the other algorithms, but it can be improved further, such as setting adaptive parameters, including subswarms. In addition to above algorithms, many other representative computational intelligence algorithms can be used to solve the problems, such as Harris hawks optimization (HHO) [25], which are not fully discussed in this paper. The source code of the proposed CSO algorithm is provided in this study, and more application and tests of CSO is welcome.

#### Data Availability

The data used to support the findings of the study are available from the corresponding author upon request.

#### Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

#### Acknowledgments

This research was supported by National Natural Science Foundation of China (Grant nos. 91847302, 51879137, and 51979276).