# A Learning Sparrow Search Algorithm

Authors: Chengtian Ouyang; Donglin Zhu; Fengqi Wang
Journal: Computational Intelligence and Neuroscience
 (2021)

---

## Abstract

This paper solves the drawbacks of traditional intelligent optimization algorithms relying on 0 and has good results on CEC 2017 and benchmark functions, which effectively improve the problem of algorithms falling into local optimality. The sparrow search algorithm (SSA) has significant optimization performance, but still has the problem of large randomness and is easy to fall into the local optimum. For this reason, this paper proposes a learning sparrow search algorithm, which introduces the lens reverse learning strategy in the discoverer stage. The random reverse learning strategy increases the diversity of the population and makes the search method more flexible. In the follower stage, an improved sine and cosine guidance mechanism is introduced to make the search method of the discoverer more detailed. Finally, a differential-based local search is proposed. The strategy is used to update the optimal solution obtained each time to prevent the omission of high-quality solutions in the search process. LSSA is compared with CSSA, ISSA, SSA, BSO, GWO, and PSO in 12 benchmark functions to verify the feasibility of the algorithm. Furthermore, to further verify the effectiveness and practicability of the algorithm, LSSA is compared with MSSCS, CSsin, and FA-CL in CEC 2017 test function. The simulation results show that LSSA has good universality. Finally, the practicability of LSSA is verified by robot path planning, and LSSA has good stability and safety in path planning.


---

## Body

## 1. Introduction

In recent decades, the swarm intelligence optimization algorithm has been favored by many scholars due to its simple structure and high solving efficiency. Plenty of intelligent optimization algorithms have appeared continuously, such as monarch butterfly optimization (MBO) [1], smooth mount algorithm (SMA) [2], mother search algorithm (MSA) [3], hunter games search (HGS) [4], naked mole-rat algorithm (NMRA) [5], and Harris hawks optimization (HHO) [6]. Xue and Shen [7] proposed a sparrow search algorithm (SSA) that simulates the nature of sparrows foraging for food with the advantages of simple principle, fewer adjustment parameters, less programming difficulty, etc. Compared with grey wolf optimizer (GWO) [8], particle swarm optimization (PSO) [9], and genetic algorithm (GA) [10] in function optimization, it has better search results. Although excellent ability has been strongly confirmed, however, the SSA algorithm also has its own shortcomings. SSA is highly dependent on a certain role in the group and lacks learning ability. It is still easy to fall into the local optimum on high-dimensional complex problems.At present, lots of scholars have carried out a series of studies so as to minify the shortcomings of the SSA itself. Scholars have studied and improved it separately, for the sake of further improving the optimization ability of the SSA. For example, Lu et al. [11] proposed a chaotic sparrow search algorithm (CSSA). The algorithm first used the tent mapping based on random variables to generate a better individual sparrow sequence and introduced tent perturbation as well as Gaussian mutation in the optimization process to carry out the solution found by the sparrow. The update prevents the algorithm from appearing premature; furthermore, the effectiveness of the algorithm is verified in the test function and image segmentation issues. At the same time, they stated an improved sparrow search algorithm (ISSA) to apply to the multithreshold image segmentation problem [12] and achieved meaningful results. In the process of algorithm optimization, the idea of a bird swarm algorithm is applied. The benchmark function and multithreshold image segmentation based on the variance between classes and Kapur entropy verify that the improved algorithm has strong search and development capabilities. Mao and Zhang [13] illustrated an improved sparrow search algorithm that combines Cauchy mutation and opposition-based learning. At first, a sin chaotic mechanism with an unlimited number of folds was used to initialize the population, and the previous generation global optimal solution was employed into the position update formula. For the aim of generating a new solution of higher quality, the information exchange of the algorithm was sped up, and the adaptive weight strategy was introduced to coordinate the local and global search capabilities, and the fusion Cauchy mutation and reverse learning strategy were utilized to perform disturbance mutation at the optimal position, which improved the ability of the algorithm to jump out of the local optimum. Eight test functions verify that the algorithm has been greatly improved in global optimization. Liu et al. [14], in order to better apply the SSA in 3D path planning, also adopted chaos strategies to enhance the diversity of the population and used adaptive inertial weights to balance the convergence speed and exploration capabilities of the algorithm. Finally, they adopted the Cauchy–Gaussian mutation strategy to get rid of the ability of the later algorithm stagnation, through the effect of planning the route, so that the improved SSA with a strong search ability is able to plan the route which is safer. Wang et al. [15] proposed a chaotic map sparrow search algorithm, which uses a dynamic adaptive weight mechanism to control the search range of the sparrow and finally uses reverse learning and Gaussian mutation to prevent the algorithm from falling into local optimality and balance the development of the algorithm and searchability as well. The 12 test functions proved that the improved algorithm has strong optimization capabilities. Zhang and Ding [16] also proposed a chaotic sparrow search algorithm, which strengthens the global search ability of the algorithm by introducing logistic mapping, adaptive hyperparameter, and mutation operation. The effectiveness of the algorithm is verified by the test function, and then, it is applied to the random configuration network. The results show that the proposed model has good regression accuracy.The abovementioned authors have carried out a lot of experiments to verify the advantages of the proposed algorithm, but still there are some shortcomings:(1)
Most papers put forward chaos theory. Chaos theory itself has uncertainty and cannot change the randomness of the algorithm. Therefore, a flexible search mechanism is needed to improve the situation.(2)
The existing literature does not fundamentally change the optimization mechanism of the algorithm itself and lacks learning ability, so there is still a probability of falling into the local optimum when encountering high-dimensional complex problems.(3)
At present, the improved algorithms are only tested on the function of the optimal value dimension 0, which lacks rationality and cannot fully explain the effectiveness of the algorithm.(4)
Researchers only consider the update of the best location, but ignore the update of the worst location of SSA. The search method of SSA is closely related to the worst position.Based on the above shortcomings, this paper proposes a learning sparrow search algorithm, with the help of lens reverse learning and random reverse learning to improve the learning ability of the algorithm and adapt to various complex models. The improved sine and cosine algorithm is used to guide the followers to update the position and improve the search precision. As a result, the local search based on the difference is used to update the optimal solution to improve the quality of the solution. LSSA is compared with CSSA, ISSA, SSA, beetle swarm optimization (BSO) [17], GWO, and PSO in 12 benchmark functions to verify the feasibility of the algorithm. In order to further verify its effectiveness and practicability, LSSA is compared with multistrategy serial cuckoo search algorithm (MSSCS) [18], CSsin [19], and firefly algorithm with courtship learning (FA-CL) [20] in CEC 2017 test function. All the three algorithms are verified in the CEC test function; finally, the results show that the LSSA algorithm has strong universality. The contributions of this paper are as follows:(i)
The fusion of two opposition-based learning strategies is proposed to improve the algorithm’s global search capability(ii)
An improved sine and cosine algorithm is proposed to improve the flexibility of the algorithm(iii)
A local search based on the difference is proposed to improve the quality of the solution each time(iv)
It has a good effect on the benchmark function and the CEC 2017 function and, at the same time, minifies the defect of the algorithm close to the origin(v)
LSSA is applied to robot path planning, and good results are achievedThis reminder of this paper is organized as follows. Section2 introduces the basic sparrow search algorithm and analyzes it. Section 3 describes the process and validation of LSSA. Section 4 shows the experiment and analysis of each algorithm on benchmark function and CEC 2017 test function. Section 5 provides discussion and future research directions.


## 2. Sparrow Search Algorithm

The SSA is divided into three phases: discoverer, follower, and investigator. As the name implies, the discoverer discovers food, searches for food, and provides direction for other individuals in the population. Therefore, the discoverer searches for a wide range of food, which accounts for 20% of the population. The location update formula for the discoverer is(1)Xi,jt+1=Xi,jt⋅exp−hα⋅M,ifR2<ST,Xi,jt+Q⋅L,ifR2≥ST.In formula (1), h represents the current number of iterations, M is the maximum number of iterations, Xi,j denotes the current position of the ith sparrow in the jth dimension, αε0,1 is a random number,R2 and ST represent warning and safety values, respectively, and when R2<0,1, ST<0.5,1, Q is a normal distribution of random numbers, and L means 1 with all the elements of 1 × D. When R2<ST, this indicates that the community environment is safe at this time, no predators are found around them, and the discoverer can perform a wide search mechanism. When R2≥ST, this indicates that the individual within the group has discovered the predator and issued an alert, that all individuals in the group will make antipredatory actions, and that the discoverer will lead the follower to a safe location.Followers perform food searches after the discoverer and neighborhood searches around the discoverer’s location. Followers’ location updates the formula as follows:(2)Xi,jt+1=Q⋅expXworstt−Xi,jti2,ifi>n2,XPt+1+Xi,jt−XPt+1⋅A+⋅L,otherwise.In formula (2), Xp is the optimal position currently occupied by the discoverer, Xworst represents the worst position currently, and A is a matrix of 1 × d, where the value of each element is 1 or −1, and A+=ATAAT−1. When i>n/2, at this point, the sparrow population will counterattack when it senses danger.Investigators are randomly selected individuals within the population. When predators invade, they will send out signals to make sparrows escape to a safe position. The behavior formula of investigators is as follows:(3)Xi,jt+1=Xbestt+β⋅Xi,jt−Xbestt,iffi≠fg,Xi,jt+K⋅Xi,jt−Xworsttfi−fw+ε,iffi=fg.In formula (3), Xbest is the current global optimal location, β is the control step parameter, which is a random number with the normal distribution of mean value 0 and variance 1, K∈−1,1 is a random number, fi is the fitness value of the sparrow, fg and fw are the best and worst fitness values in the current search range, respectively, and ε is the smallest real number to prevent the denominator from 0. When fi≠fg, it means that the sparrow is at the boundary of the population and vulnerable to predators, so it needs to adjust its position. When fi=fg, this indicates that the sparrow individuals in the population are aware of the danger and need to be close to other sparrows in order to avoid the danger. K represents the direction of the sparrow movement and can also control the movement step.


### 2.1. Performance Analysis

SSA can be divided into three stages: discoverer, follower, and scout. From the three formulas, it can be seen that sparrow individuals depend on the search of the discoverer stage. The idea of adaptive weight is introduced in formula (1), but the adaptive weight still has defects in the face of high-dimensional complex functions and cannot open up a global vision. Therefore, it is necessary to make use of lens reverse learning and random reverse learning to dig out more hidden positions, but also increase the diversity of the population and make full preparation for the optimization in the later stage. Formula (2) has the defect of near-zero points; hence, nonlinear sine-cosine guidance is used to balance the local and global search. From the overall formula, the update distance between the front and back position of SSA is far, so the blind area between them becomes more. The local search based on the difference can improve the search precision and reduce the scope of the blind areas.


## 2.1. Performance Analysis

SSA can be divided into three stages: discoverer, follower, and scout. From the three formulas, it can be seen that sparrow individuals depend on the search of the discoverer stage. The idea of adaptive weight is introduced in formula (1), but the adaptive weight still has defects in the face of high-dimensional complex functions and cannot open up a global vision. Therefore, it is necessary to make use of lens reverse learning and random reverse learning to dig out more hidden positions, but also increase the diversity of the population and make full preparation for the optimization in the later stage. Formula (2) has the defect of near-zero points; hence, nonlinear sine-cosine guidance is used to balance the local and global search. From the overall formula, the update distance between the front and back position of SSA is far, so the blind area between them becomes more. The local search based on the difference can improve the search precision and reduce the scope of the blind areas.


## 3. Learning Sparrow Search Algorithm

### 3.1. Opposition-Based Learning Strategy Based on Lens Principle

The discoverer leads other individuals to search for food, and the search method directly affects the overall search performance, so the discoverer must have a wide range and flexible search mechanism. To solve these problems, researchers have proposed the corresponding learning mechanism [21–23]. The general opposition-based learning strategy only solves the problem in a certain space [24–26], which still has monotonicity and risk of local optimization. As for this phenomenon, this paper provides two fusion opposition-based learning strategies to jointly improve the searchability of the discoverer. The opposition-based learning strategy based on the lens principle [27] is used to effectively update the location of the discoverer. The schematic diagram is shown in Figure 1. It is the opposition-based learning solution of the lens principle that is flexible and diverse, which is conducive to mining new solutions in the unknown area and increasing the diversity of the population. The principle is as follows:Figure 1
Lens schematic diagram.In a certain space, suppose an individualP of height h, and individual Xp is the projection of individual P onto the X-axis. A lens of focal length f is placed on the base point position O, O is the midpoint of aj,bj, and aj and bj represent the upper and lower limits of the jth dimension of the current solution. An image P′ of height H′ is obtained by the lens imaging process, and its projection on the coordinate axis is XP′ (reverse point). At this point, XP′ is the new individual generated by Xp through the opposition-based learning strategy based on the principle of lens imaging. The schematic diagram is shown in Figure 1.As shown in Figure1, the corresponding reverse point XP′ of individual Xp is obtained by taking O as the base point, which can be obtained by the lens imaging principle:(4)a+b/2−xpxp′−a+b/2=hh′.Leth/h′=k, and k is the scaling factor. After transformation, the reverse point can be obtained as(5)xp′=a+b2+a+b2k−xpk.Thus, whenk = 1,(6)xp′=a+b−xp.Formula (6) is called a general opposition-based learning strategy. From the above formulas, it is known that the general learning strategy is only a specific case of lens imaging opposition-based learning strategy, and the new individuals obtained by the general opposition-based learning strategy are fixed each time. In high-dimensional complex functions, new individuals with the fixed range also have the possibility of falling into the local optimum, and they are monotonic. By adjusting the parameter K, the new individuals based on the lens imaging learning strategy are dynamic, which improves the diversity of the population.In this paper, we generalize the formula to thed-dimensional space:(7)xp'j=aj+bj2+aj+bj2k−xpjk.In formula (7), xpj and xp′j are the j-dimensional components of xp and xp′, respectively, and aj and bj represent the j-dimensional components of the upper and lower bounds of decision variables, respectively.


### 3.2. Opposition-Based Learning of the Worst Position

After the discoverer has searched, the worst position they get is not necessarily reliable. From formulas (2) and (3), it is known that the worst solution will affect the later stage of optimization, and the minimum value will give followers a better search range. This means that updating at the worst location is extremely important, which is also a point that scholars tend to ignore, only pursuing the optimal location and ignoring the integrity of the algorithm. This paper uses the random opposition-based mechanism to update the worst position; the specific formula is as follows:(8)xworst′t=aj+rand⋅bj−xworst.


### 3.3. Guidance Strategy Based on Improved Sine-Cosine Algorithm

In the follower location update formula of SSA, the follower searches the location of the follower immediately after the discoverer, and there are few dynamic parameters, so it is easy to limit the search range of sparrow population and blindness, which limits the searchability of the algorithm. To solve these problems, the strategy of sine-cosine guidance [28–30] is used in the follower stage to dynamically update the sparrow’s individual position and expand the search scope by using the sine-cosine characteristics. The formula for updating follower positions with sine-cosine strategy is(9)Xit+1=Xit+r1⋅sinr2⋅r3⋅XPt−Xit,r4≤0.5,Xit+r1⋅cosr2⋅r3⋅XPt−Xit,r4>0.5,(10)r1=a−t⋅aM.In the above formula,r1 is a parameter, determined by the number of iterations, and it is the key to determine the individual search range. As the number of iterations increases, r1 gets smaller and smaller, and the sparrow search range is also smaller and smaller. a is a constant, and the value of a in this paper is 2. r2 is a random number in the range [0, 2π], which determines the individual movement distance; r3 and r4 are random numbers in [0, 2] and [0, 1], respectively.It can be seen from the formula thatr1 uses linear decline to balance the search scope, but this approach is easily trapped into local optimal [31, 32] when facing high-dimensional complexity functions. Therefore, this paper adopts nonlinear decline to set r1 to balance local and global search [33]. The specific formula is as follows:(11)r1=c+bexp4×t/M4+1.Among them,b is the fixed value of 0.1 and c is the regulating factor. After many experiments, when c = 0.9, the best effect is achieved. The introduction of an improved sine-cosine guidance strategy reduces the blindness of sparrow searches, accelerates information exchange between individuals in the population and those in the best and worst positions, and makes followers more purposeful in their searches. According to the characteristics of the above formulas, it is clear that the nonlinear decreasing parameters make the search more detailed and improve the convergence accuracy of the algorithm.


### 3.4. Local Search Based on Difference

Sparrows do not always get reliable optimal solutions for each search. Precocious phenomena occur when local extremes are encountered, which paralyzes the algorithm. In order to overcome this limitation, a differential local search is proposed to get rid of the attraction of local extremes and improve the quality of the solution.P1 and P2 are the historic optimal solution and the historic suboptimal solution of the population, respectively, in the process of SSA optimization. In this paper, the difference between the two solutions is used to guide P1 to search for a reliable optimal solution in the neighborhood. Differential guidance is accurate. This strategy enables sparrows to search between solutions to avoid missing high-quality solutions and blind searches. The implementation is as follows:(12)P1′=P1+r⋅Ct⋅P1−P2,where P1′ is the updated historical optimal solution, r is the uniform random number between −1,1, and Ct is the local scaling factor. In the early stage of the algorithm, P1 is far away from the optimal solution, so a larger search range is needed to speed up the search speed. In the later stage, the distance is relatively short, and a smaller search range is needed to achieve higher mining accuracy. Therefore, the idea of inertia weight is introduced here, and the linear decline strategy is adopted. The range gradually shrinks as the number of iterations increases:(13)Ct+1=Ct⋅1−iM.The greedy strategy is adopted to preserve the solutionP1′ obtained by local search as follows:(14)P1=P1′,fitP1′>fitP1,P1,otherwise,where fitx is the fitness value of x.


### 3.5. Learning Sparrow Search Algorithm

Compared with other algorithms, the SSA has better performance, but it has more random parameters, which leads to increased randomness and the probability of falling into the local extreme value. Therefore, a learning sparrow search algorithm is proposed in this paper. Two learning mechanisms are introduced in the finder stage, and the opposition-based learning based on the lens principle is adopted to enlarge the finder search range, improve the diversity of the population, and make the search method more flexible. In the follower stage, an improved sine and cosine strategy is introduced to adjust the sine and cosine by adopting a nonlinear decreasing method to reduce the blind search in the follower stage and make its search method more detailed. In the end, a local search based on difference is expounded to update the optimal solution and promote the quality of the solution during the iteration. The algorithm flow chart is shown in Figure2. The specific pseudocode is shown in Algorithm 1.Algorithm 1: The framework of the LSSA.
InputM: Maximum number of iterationsPD: DiscovererSD: Individuals who are aware of the dangerR2: Alert valueN: Population sparrowsOutput:Xbest, fgInitialize populationt = 1;While (t < M)Find the position of the best and worst sparrow individuals according to fitness values.R2 = rand(1)Fori = 1 : PDUpdate the location of the discoverers according to formulas (1) and (7);End forUpdate the worst location found by the discoverer according to formula (8);Fori = (PD + 1) : NUpdate the location of the followers according to formulas (2) and (9);End forForl = 1 : SDGet the individual position of a sparrow that is aware of danger according to formula (3);End forGet the Location of the New Optimal Individual;Update the individual location according to formulas (12)–(14);t = t + 1End whileReturn:Xbest, fgFigure 2
Algorithm flowchart.


### 3.6. Algorithm Validity Test

For making it obvious that LSSA improves the optimization mechanism of SSA and verify the scientificity and effectiveness of the LSSA algorithm, this paper takes the Schwefel function as an example and gives the individual distribution map of the two algorithms in the optimization process. Let the maximum number of iterations be 20 and the population number be 50. The function model diagram is shown in Figure3. The individual distribution diagram of the two algorithms is shown in Figures 4 and 5.Figure 3
Schematic diagram of the Schwefel function.Figure 4
Individual distribution of SSA. (a) SSA individual initialization map. (b) Individual distribution of SSA in 100 generations.
(a)(b)Figure 5
Individual distribution of LSSA. (a) LSSA individual initialization map. (b) Individual distribution of LSSA in 100 generations.
(a)(b)From Figures4 and 5, the LSSA algorithm converges fast, and most individuals are close to the optimal value, from the initial individual to the final individual distribution, while the SSA algorithm is still in a decentralized state, and the convergence speed is slow. Therefore, the LSSA algorithm’s search mechanism is broad and detailed, and it can quickly find the best in the optimization process.


### 3.7. Time Complexity Analysis

Time complexity is an important index to judge an algorithm and determine the rationality of the algorithm. Let the population size of the algorithm in this paper beP, the maximum number of iterations be M, the dimension be D, and the ratio coefficients of discoverers and followers are R1 and R2, respectively. The time complexity of this paper is analyzed as follows:From a macropoint of view, the time of the intelligent optimization algorithm isOP×M×D, so is the sparrow search algorithm. The improved sparrow search algorithm not only does not change the structure of the algorithm but also increases the number of cycles; in this way, its time complexity is OP×M×D, the same as the basic sparrow search algorithm.From a microscopic point of view, the improved sparrow search algorithm increases a certain amount of computational complexity, and the opposition-based learning of the lens and the opposition-based learning of the worst position, respectively, increase the complexity ofOR1×P×M×D and OM. The computational complexity of introducing the sine and cosine guiding mechanism is OR2×P×M×D, and the time complexity of introducing the local search based on the difference is OM. It can be seen that the introduction of each strategy does not improve the order of magnitude of the sparrow search algorithm, and the time complexity is still OP×M×D.


## 3.1. Opposition-Based Learning Strategy Based on Lens Principle

The discoverer leads other individuals to search for food, and the search method directly affects the overall search performance, so the discoverer must have a wide range and flexible search mechanism. To solve these problems, researchers have proposed the corresponding learning mechanism [21–23]. The general opposition-based learning strategy only solves the problem in a certain space [24–26], which still has monotonicity and risk of local optimization. As for this phenomenon, this paper provides two fusion opposition-based learning strategies to jointly improve the searchability of the discoverer. The opposition-based learning strategy based on the lens principle [27] is used to effectively update the location of the discoverer. The schematic diagram is shown in Figure 1. It is the opposition-based learning solution of the lens principle that is flexible and diverse, which is conducive to mining new solutions in the unknown area and increasing the diversity of the population. The principle is as follows:Figure 1
Lens schematic diagram.In a certain space, suppose an individualP of height h, and individual Xp is the projection of individual P onto the X-axis. A lens of focal length f is placed on the base point position O, O is the midpoint of aj,bj, and aj and bj represent the upper and lower limits of the jth dimension of the current solution. An image P′ of height H′ is obtained by the lens imaging process, and its projection on the coordinate axis is XP′ (reverse point). At this point, XP′ is the new individual generated by Xp through the opposition-based learning strategy based on the principle of lens imaging. The schematic diagram is shown in Figure 1.As shown in Figure1, the corresponding reverse point XP′ of individual Xp is obtained by taking O as the base point, which can be obtained by the lens imaging principle:(4)a+b/2−xpxp′−a+b/2=hh′.Leth/h′=k, and k is the scaling factor. After transformation, the reverse point can be obtained as(5)xp′=a+b2+a+b2k−xpk.Thus, whenk = 1,(6)xp′=a+b−xp.Formula (6) is called a general opposition-based learning strategy. From the above formulas, it is known that the general learning strategy is only a specific case of lens imaging opposition-based learning strategy, and the new individuals obtained by the general opposition-based learning strategy are fixed each time. In high-dimensional complex functions, new individuals with the fixed range also have the possibility of falling into the local optimum, and they are monotonic. By adjusting the parameter K, the new individuals based on the lens imaging learning strategy are dynamic, which improves the diversity of the population.In this paper, we generalize the formula to thed-dimensional space:(7)xp'j=aj+bj2+aj+bj2k−xpjk.In formula (7), xpj and xp′j are the j-dimensional components of xp and xp′, respectively, and aj and bj represent the j-dimensional components of the upper and lower bounds of decision variables, respectively.


## 3.2. Opposition-Based Learning of the Worst Position

After the discoverer has searched, the worst position they get is not necessarily reliable. From formulas (2) and (3), it is known that the worst solution will affect the later stage of optimization, and the minimum value will give followers a better search range. This means that updating at the worst location is extremely important, which is also a point that scholars tend to ignore, only pursuing the optimal location and ignoring the integrity of the algorithm. This paper uses the random opposition-based mechanism to update the worst position; the specific formula is as follows:(8)xworst′t=aj+rand⋅bj−xworst.


## 3.3. Guidance Strategy Based on Improved Sine-Cosine Algorithm

In the follower location update formula of SSA, the follower searches the location of the follower immediately after the discoverer, and there are few dynamic parameters, so it is easy to limit the search range of sparrow population and blindness, which limits the searchability of the algorithm. To solve these problems, the strategy of sine-cosine guidance [28–30] is used in the follower stage to dynamically update the sparrow’s individual position and expand the search scope by using the sine-cosine characteristics. The formula for updating follower positions with sine-cosine strategy is(9)Xit+1=Xit+r1⋅sinr2⋅r3⋅XPt−Xit,r4≤0.5,Xit+r1⋅cosr2⋅r3⋅XPt−Xit,r4>0.5,(10)r1=a−t⋅aM.In the above formula,r1 is a parameter, determined by the number of iterations, and it is the key to determine the individual search range. As the number of iterations increases, r1 gets smaller and smaller, and the sparrow search range is also smaller and smaller. a is a constant, and the value of a in this paper is 2. r2 is a random number in the range [0, 2π], which determines the individual movement distance; r3 and r4 are random numbers in [0, 2] and [0, 1], respectively.It can be seen from the formula thatr1 uses linear decline to balance the search scope, but this approach is easily trapped into local optimal [31, 32] when facing high-dimensional complexity functions. Therefore, this paper adopts nonlinear decline to set r1 to balance local and global search [33]. The specific formula is as follows:(11)r1=c+bexp4×t/M4+1.Among them,b is the fixed value of 0.1 and c is the regulating factor. After many experiments, when c = 0.9, the best effect is achieved. The introduction of an improved sine-cosine guidance strategy reduces the blindness of sparrow searches, accelerates information exchange between individuals in the population and those in the best and worst positions, and makes followers more purposeful in their searches. According to the characteristics of the above formulas, it is clear that the nonlinear decreasing parameters make the search more detailed and improve the convergence accuracy of the algorithm.


## 3.4. Local Search Based on Difference

Sparrows do not always get reliable optimal solutions for each search. Precocious phenomena occur when local extremes are encountered, which paralyzes the algorithm. In order to overcome this limitation, a differential local search is proposed to get rid of the attraction of local extremes and improve the quality of the solution.P1 and P2 are the historic optimal solution and the historic suboptimal solution of the population, respectively, in the process of SSA optimization. In this paper, the difference between the two solutions is used to guide P1 to search for a reliable optimal solution in the neighborhood. Differential guidance is accurate. This strategy enables sparrows to search between solutions to avoid missing high-quality solutions and blind searches. The implementation is as follows:(12)P1′=P1+r⋅Ct⋅P1−P2,where P1′ is the updated historical optimal solution, r is the uniform random number between −1,1, and Ct is the local scaling factor. In the early stage of the algorithm, P1 is far away from the optimal solution, so a larger search range is needed to speed up the search speed. In the later stage, the distance is relatively short, and a smaller search range is needed to achieve higher mining accuracy. Therefore, the idea of inertia weight is introduced here, and the linear decline strategy is adopted. The range gradually shrinks as the number of iterations increases:(13)Ct+1=Ct⋅1−iM.The greedy strategy is adopted to preserve the solutionP1′ obtained by local search as follows:(14)P1=P1′,fitP1′>fitP1,P1,otherwise,where fitx is the fitness value of x.


## 3.5. Learning Sparrow Search Algorithm

Compared with other algorithms, the SSA has better performance, but it has more random parameters, which leads to increased randomness and the probability of falling into the local extreme value. Therefore, a learning sparrow search algorithm is proposed in this paper. Two learning mechanisms are introduced in the finder stage, and the opposition-based learning based on the lens principle is adopted to enlarge the finder search range, improve the diversity of the population, and make the search method more flexible. In the follower stage, an improved sine and cosine strategy is introduced to adjust the sine and cosine by adopting a nonlinear decreasing method to reduce the blind search in the follower stage and make its search method more detailed. In the end, a local search based on difference is expounded to update the optimal solution and promote the quality of the solution during the iteration. The algorithm flow chart is shown in Figure2. The specific pseudocode is shown in Algorithm 1.Algorithm 1: The framework of the LSSA.
InputM: Maximum number of iterationsPD: DiscovererSD: Individuals who are aware of the dangerR2: Alert valueN: Population sparrowsOutput:Xbest, fgInitialize populationt = 1;While (t < M)Find the position of the best and worst sparrow individuals according to fitness values.R2 = rand(1)Fori = 1 : PDUpdate the location of the discoverers according to formulas (1) and (7);End forUpdate the worst location found by the discoverer according to formula (8);Fori = (PD + 1) : NUpdate the location of the followers according to formulas (2) and (9);End forForl = 1 : SDGet the individual position of a sparrow that is aware of danger according to formula (3);End forGet the Location of the New Optimal Individual;Update the individual location according to formulas (12)–(14);t = t + 1End whileReturn:Xbest, fgFigure 2
Algorithm flowchart.


## 3.6. Algorithm Validity Test

For making it obvious that LSSA improves the optimization mechanism of SSA and verify the scientificity and effectiveness of the LSSA algorithm, this paper takes the Schwefel function as an example and gives the individual distribution map of the two algorithms in the optimization process. Let the maximum number of iterations be 20 and the population number be 50. The function model diagram is shown in Figure3. The individual distribution diagram of the two algorithms is shown in Figures 4 and 5.Figure 3
Schematic diagram of the Schwefel function.Figure 4
Individual distribution of SSA. (a) SSA individual initialization map. (b) Individual distribution of SSA in 100 generations.
(a)(b)Figure 5
Individual distribution of LSSA. (a) LSSA individual initialization map. (b) Individual distribution of LSSA in 100 generations.
(a)(b)From Figures4 and 5, the LSSA algorithm converges fast, and most individuals are close to the optimal value, from the initial individual to the final individual distribution, while the SSA algorithm is still in a decentralized state, and the convergence speed is slow. Therefore, the LSSA algorithm’s search mechanism is broad and detailed, and it can quickly find the best in the optimization process.


## 3.7. Time Complexity Analysis

Time complexity is an important index to judge an algorithm and determine the rationality of the algorithm. Let the population size of the algorithm in this paper beP, the maximum number of iterations be M, the dimension be D, and the ratio coefficients of discoverers and followers are R1 and R2, respectively. The time complexity of this paper is analyzed as follows:From a macropoint of view, the time of the intelligent optimization algorithm isOP×M×D, so is the sparrow search algorithm. The improved sparrow search algorithm not only does not change the structure of the algorithm but also increases the number of cycles; in this way, its time complexity is OP×M×D, the same as the basic sparrow search algorithm.From a microscopic point of view, the improved sparrow search algorithm increases a certain amount of computational complexity, and the opposition-based learning of the lens and the opposition-based learning of the worst position, respectively, increase the complexity ofOR1×P×M×D and OM. The computational complexity of introducing the sine and cosine guiding mechanism is OR2×P×M×D, and the time complexity of introducing the local search based on the difference is OM. It can be seen that the introduction of each strategy does not improve the order of magnitude of the sparrow search algorithm, and the time complexity is still OP×M×D.


## 4. Benchmark Function Test

In order to better verify the optimization ability of the LSSA algorithm, this paper first selects 10 standard test functions for verification and compares them with the six algorithms of PSO, GWO, SSA, ISSA, CSSA, and BSO. BSO is a new and hot research fusion algorithm in recent years. The specific parameters are shown in the literature. The test function information table is shown in Table1. F1–F6 are complex unimodal functions, and F7–F9 are high-dimensional complex functions; the rest is a fixed-dimensional function, where F1–F9 are tested in 30 and 100 dimensions. The population size and maximum iteration number of each algorithm are 100 and 500, respectively. The two learning factors in the particle swarm algorithm are c1 = c2 = 1.429 and weight w = 0.729, and each algorithm runs 30 times independently and calculates the best value (best), average (Ave), and standard deviation (std) of the running results. Three indicators comprehensively evaluate the optimization ability of each algorithm in function. For performance evaluation, simulations are performed on Windows 10 having Matlab 2019a, Intel(R) Core (TM) i5-10200H CPU @ 2.40 GHz with 16 GB RAM.Table 1
Test function.
FunctionDimensionsIntervalMinF1x=∑i=1nxi230/100[−100, 100]0F2x=∑i=1n∑j=1ixj230/100[−100, 100]0F3x=maxixi,1≤i≤n30/100[−100, 100]0F4x=∑i=1n−1100xi+1−xi22+xi−1230/100[−30, 30]0F5x=∑i=1nxi+0.5230/100[−100, 100]0F6x=∑i=1nixi4+random0，130/100[−1.28, 1.28]0F7x=∑i=1n−xisinxi30/100[−500, 500]−418.9829nF8=πn10sinπy1+∑i=1n−1yi−121+10sin2πyi+1+yn−12+yi=1+xi+1/430/100−50,500uxi,a,k,m=kxi−am,xi>a0,−a<xi<ak−xi−am,xi<−aF9=418.9829n−∑i=1nxisinxi30/100[−500, 500]0F10x=1.5−x1+x1x22+2.25−x1+x1x222+2.625−x1+x1x2322−4.5,4.50F11x=100x12−x22+x1−12+x3−12+90x32−x42+10.1x2−12+x4−12+19.8x2−1x4−14−10,100F12x=0.002+∑i=1251/i+x1−a1i6+x2−a2i6−1wherea=−32−1601632−32…01632−32−32−32−32−32−16…3232322[−65.536, 65.536]0.998From Tables2 and 3, the LSSA algorithm exhibits good optimization effects in both 30 and 100 dimensions. In the unimodal function, both LSSA and basic SSA algorithm can find the optimal value, indicating that the LSSA algorithm does not reduce the optimization ability of the algorithm itself, which shows the rationality of the LSSA algorithm. In the multimodal function, LSSA can show a strong optimization ability and has better convergence accuracy than other algorithms, and it does not significantly weaken the optimization ability of the LSSA algorithm in the 100 dimensions. In the fixed dimension function F10–F12, the LSSA algorithm has good stability and can find the same value almost every time, which is close to the theoretical optimal value.Table 2
Comparison table of optimization effect of each algorithm (30 dimensions and fixed dimensions).
FunctionAlgorithmBestAveStdF1(x)LSSA000BSO1.83379.23518.0567CSSA000ISSA000SSA000GWO2.9726E − 429.9797E − 412.3113E − 40PSO1.562E − 127.3034E − 111.5384E − 10F2(X)LSSA000BSO9.4317E − 105.843819.6417CSSA000ISSA000SSA07.0603E − 923.8713E − 91GWO1.2722E − 151.6521E − 115.6379E − 11PSO2.45976.87644.6663F3(X)LSSA000BSO0.04171.55461.2080CSSA000ISSA03.7672E − 1582.0634E − 157SSA000GWO1.0249E − 111.3528E − 101.3629E − 10PSO0.060080.17560.08657F4(X)LSSA1.3707E − 108.2877E − 061.5080E − 05BSO233.8862971.7400841.0884CSSA3.47E − 097.3760E − 051.0942E − 04ISSA1.0562E − 071.2681E − 042.7208E − 04SSA7.6415E − 093.1722E − 055.9606E − 05GWO45.186146.67200.7848PSO10.0094102.212151.6541F5(X)LSSA08.3405E − 321.7901E − 31BSO03.6491E − 211.9700E − 20CSSA2.4651E − 326.1469E − 291.7338E − 28ISSA4.6878E − 291.3501E − 253.1929E − 25SSA3.0814E − 322.7691E − 297.1572E − 29GWO3.3762E − 071.0734E − 063.7183E − 07PSO8.9363E − 321.9760E − 305.1909E − 30F6(X)LSSA7.5495E − 063.6715E − 043.4039E − 04BSO1.8821E − 038.0499E − 034.1052E − 03CSSA1.5867E − 051.7275E − 041.2860E − 04ISSA1.0528E − 052.2030E − 041.7169E − 04SSA8.2819E − 061.6418E − 041.7567E − 04GWO1.8171E − 045.6482E − 043.1679E − 04PSO7.1929E − 031.8162E − 027.2361E − 03F7(X)LSSA−12569.4866−12151.0951724.9186BSO−12569.4866−11205.66261020.4548ISSA−10141.2347−9080.1757568.2124CSSA−10022.9333−9045.4556574.4343SSA−10258.1903−8724.1633718.2918GWO−8262.1714−6362.1144709.0298PSO−8324.1386−6844.9716752.6817F8(X)LSSA3.5924E − 191.5863E − 153.8647E − 15BSO0.13230.94480.6457CSSA8.7326E − 152.3930E − 124.4060E − 12ISSA1.9914E − 142.6662E − 125.2284E − 12SSA3.4524E − 151.4887E − 113.5684E − 11GWO1.4151E − 060.014689.2774E − 03PSO6.4837E − 140.086430.2527F9(X)LSSA4.9797E − 04719.9689812.9308BSO3.8182E − 041272.5502983.9231CSSA−9082.3593−8132.3934763.6265ISSA2191.28703460.1076584.0178SSA2587.73994017.9491668.5352GWO4518.49446050.6684801.1268PSO4601.85026257.0871952.5740F10(X)LSSA000BSO00.35560.3866CSSA01.8488E − 337.0361E − 33ISSA000SSA08.2173E − 334.5008E − 32GWO3.2417E − 104.6721E − 083.9041E − 08PSO000F11(X)LSSA7.1484E − 171.0144E − 093.9939E − 09BSO00.47041.7733CSSA8.9576E − 131.1160E − 082.0300E − 08ISSA2.8781E − 121.1195E − 072.9258E − 07SSA2.6178E − 132.3804E − 071.0194E − 06GWO3.5322E − 060.19660.4975PSO6.6552E − 078.9930E − 048.7012E − 03F12(X)LSSA0.9980.9980BSO0.9981.88861.4519CSSA0.9981.06410.3622ISSA0.9982.36623.3602SSA0.9982.49843.3421GWO0.9981.72550.9724PSO0.9981.13050.3436Table 3
Comparison table of optimization effect of each algorithm (100 dimensions).
FunctionAlgorithmBestAveStdF1(x)LSSA000BSO195.6467757.4745391.4064CSSA000ISSA000SSA000GWO5.0820E − 182.6308E − 172.1089E − 17PSO1.066812.458630.0289F2(X)LSSA000BSO0.0680154.2623315.1105CSSA01.9637E − 2060ISSA000SSA01.0517E − 2120GWO0.439911.813913.5850PSO6831.98884185.51727632.0184F3(X)LSSA000BSO0.042671.79351.3896CSSA01.1926E − 1840ISSA01.3563E − 1447.4285E − 144SSA01.9421E − 1650GWO2.0983E − 030.052090.0865PSO7.37829.57531.2667F4(X)LSSA2.9056E − 092.6894E − 052.4742E − 05BSO1077.03681.3748E + 041.3239E + 04CSSA4.2237E − 082.5499E − 043.4620E − 04ISSA2.1761E − 072.6971E − 046.66094E − 04SSA9.1735E − 097.9045E − 051.3805E − 04GWO95.678796.97340.9208PSO651.08843221.68466748.9024F5(X)LSSA2.5013E − 119.1120E − 081.8203E − 07BSO244.9986777.9455539.4453CSSA4.0102E − 102.6523E − 073.6092E − 07ISSA4.5456E − 111.9716E − 073.2439E − 07SSA2.2699E − 109.0256E − 081.3690E − 07GWO5.31386.72720.6593PSO1.06754.41945.3378F6(X)LSSA2.4150E − 061.2529E − 048.5801E − 05BSO0.029030.11360.06599CSSA3.137E − 053.1911E − 043.8926E − 04ISSA1.1119E − 052.3439E − 041.9717E − 04SSA2.4052E − 062.3133E − 041.8927E − 04GWO9.4823E − 042.6521E − 031.1372E − 03PSO0.49981.12190.3632F7(X)LSSA−41082.3952−36443.64284817.9562BSO−40261.0069−33461.96743925.7756ISSA−26395.4326−24633.4955981.1676CSSA−26934.0704−24515.66361327.8950SSA−27320.1874−24637.49841078.1888GWO−22404.2115−16606.77112437.1531PSO−23435.5935−20056.71712277.0807F8(X)LSSA1.1891E − 151.9561E − 123.1614E − 12BSO0.11780.93270.6212CSSA2.6323E − 151.1686E − 112.9995E − 11ISSA2.4668E − 102.1636E − 071.1233E − 06SSA2.1460E − 157.6085E − 122.1375E − 11GWO2.1287E − 060.015939.1126E − 03PSO2.3296E − 130.082980.1774F9(X)LSSA0.40634843.19394063.8163BSO1803.12997726.76404238.1062CSSA1.4004E + 041.7119E + 041070.6257ISSA2191.28703460.1076584.0178SSA1.4549E + 041.7425 + 041198.2007GWO2.0063E + 042.4918E + 42683.4939PSO1.6965E + 042.2306E + 044297.4782In order to better describe the optimization process and convergence speed of each algorithm, the 30-dimensional convergence graph of each algorithm on each function is given, as shown in Figure6.Figure 6
Convergence diagram of each algorithm. (a)F1. (b) F2. (c) F3. (d) F4. (e) F5. (f) F6. (g) F7. (h) F8. (i) F9. (j) F10. (k) F11. (l) F12.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)As shown in Figure6, LSSA has great advantages in the optimization speed and convergence accuracy of each function. It converges quickly on the unimodal function and has better antilocal attraction ability on the multimodal function. It can be seen that the LSSA algorithm gets rid of the constraints of the original algorithm’s search mechanism and develops a better search space.


## 5. CEC 2017 Function Test

### 5.1. Algorithm Complexity

According to the requirements of CEC 2017 test standard, the complexity of the proposed algorithm needs to be calculated. Therefore, the following code is used to calculate the running timeT0 of LSSA:fori = 1 : 1,000,000x = 0.55 + double(i); x = x + x; x = x/2; x = x ∗ x; x = sqrt(x); x = log(x); x = exp(x); x = x/(x + 2);endT1 is the calculation time of the F18 function under 200,000 evaluation times, and T2 is the average calculation time of the F18 function for 5 times under the same condition. The specific algorithm complexity is shown in Table 4.Table 4
Complexity of the LSSA algorithm.
DimT0T1T2|T2 − T1|/T0300.08384.94123.968411.6085509.14985.300654.1031


### 5.2. Function Test

Experiments on benchmark functions alone cannot show the universality and effectiveness of the algorithm. To better illustrate the effectiveness of the LSSA algorithm and avoid the situation that the LSSA algorithm depends on the optimal value of 0, the algorithm is tested on CEC 2017 test function [34], and the number of evaluations is 10,000 ∗ dim, the dimension is 50 or 30, and the population number is 50. The test results of LSSA and SSA, CSSA, MSSCS, CSsin, and FA-CL are compared, and the specific parameters of each algorithm are shown in Table 5. Each algorithm runs 30 times independently and calculates five indexes of the results of each algorithm running on the function, namely, the best, the worst, the median, the mean, and the standard deviation. Each index can clearly reflect the optimization ability of each algorithm. The best value in each indicator is treated in bold font. At the same time, the Wilcoxon rank test is used to show whether there is a significant difference in each algorithm, and the experiment is carried out at the significance level of 5%. “ + ” means that the LSSA algorithm is better than other algorithms in the optimization effect, “−” means the opposite, and “ = ” means the same performance. Finally, the comparison of each algorithm is counted. The test results are shown in Tables 6 and 7.Table 5
Parameters of each algorithm.
AlgorithmSSACSSAMSSCSCSsinFA-CLLSSAParameterDiscoverers = 0.2 ×NInvestigators = 0.6 × NDiscoverers = 0.2 ×NInvestigators = 0.6 × Nα = 0.01β = 1.5Pa = 0.25C = 0.2PAmax = 0.35PAmin = 0.25Pmax = 0.75Pmax = 0.25Freq = 0.5α = 0.01βmin = 0.2β = 1γ = 1Discoverers = 0.2 ×NInvestigators = 0.6 × NTable 6
Test results of each algorithm in CEC 2017(dim = 30).
FIndexSSACSSAMSSCSCSsinFA-CLLSSAF1(x)Best1.01E + 021.03E + 021.00E + 101.00E + 108.21E + 051.10E + 02Worst2.03E + 041.98E + 041.00E + 101.00E + 101.85E + 061.86E + 04Median2.12E + 034.55E + 031.00E + 101.00E + 101.20E + 061.84E + 03Mean4.80E + 036.27E + 031.00E + 101.00E + 101.28E + 064.47E + 03Std5.74E + 035.94E + 030.00E + 000.00E + 002.96E + 055.61E + 03P0.8073(=)0.0484(+)1.21E − 12(+)1.21E − 12(+)3.02E − 11(+)F3(x)Best3.52E + 023.00E + 023.08E + 023.14E + 028.98E + 023.00E + 02Worst2.48E + 033.00E + 021.07E + 038.75E + 025.10E + 033.00E + 02Median7.72E + 023.00E + 024.21E + 024.15E + 021.91E + 033.00E + 02Mean9.05E + 023.00E + 024.82E + 024.55E + 022.25E + 033.00E + 02Std2.93E + 011.77E − 031.64E + 011.27E + 022.17E + 018.17E − 04P3.02E − 11(+)0.0292(+)3.02E − 11(+)3.02E − 11(+)3.02E − 11(+)F4(X)Best4.00E + 024.28E + 024.00E + 024.00E + 024.68E + 024.00E + 02Worst5.21E + 025.17E + 024.89E + 024.67E + 025.32E + 024.64E + 02Median4.74E + 024.90E + 024.84E + 024.04E + 025.15E + 024.01E + 02Mean4.72E + 024.94E + 024.65E + 024.18E + 025.06E + 024.09E + 02Std2.93E + 012.12E + 013.30E + 012.41E + 012.17E + 011.64E + 01P1.41E − 09(+)4.08E − 11(+)1.10E − 08(+)0.1241(=)3.02E − 11(+)F5(X)Best5.69E + 026.14E + 025.36E + 025.26E + 026.36E + 025.54E + 02Worst8.27E + 028.01E + 025.73E + 025.69E + 027.33E + 025.96E + 02Median7.56E + 027.03E + 025.58E + 025.53E + 026.91E + 025.79E + 02Mean7.53E + 027.01E + 025.57E + 025.52E + 026.84E + 025.77E + 02Std5.71E + 014.74E + 019.13E + 009.40E + 002.59E + 011.08E + 01P2.87E − 10(+)3.02E − 11(+)4.31E − 08(−)1.17E − 09(−)3.02E − 11(+)F6(X)Best6.13E + 026.09E + 026.00E + 026.00E + 026.28E + 026.00E + 02Worst6.59E + 026.37E + 026.00E + 026.00E + 026.57E + 026.00E + 02Median6.40E + 026.21E + 026.00E + 026.00E + 026.46E + 026.00E + 02Mean6.40E + 026.21E + 026.00E + 026.00E + 026.45E + 026.00E + 02Std1.12E + 026.40E + 001.08E + 016.79E − 039.34E + 011.06E − 03P3.02E − 11(+)3.02E − 11(+)4.34E − 05(+)0.002156(+)3.02E − 11(+)F7(X)Best1.02E + 038.66E + 027.82E + 027.69E + 028.86E + 027.60E + 02Worst1.37E + 031.26E + 038.27E + 028.07E + 021.26E + 038.04E + 02Median1.27E + 039.66E + 028.07E + 027.92E + 021.07E + 037.87E + 02Mean1.23E + 031.00E + 038.08E + 027.90E + 021.07E + 037.86E + 02Std1.12E + 021.08E + 021.03E + 018.80E + 009.34E + 011.08E + 01P3.02E − 11(+)3.02E − 11(+)8.48E − 09(+)0.20620(=)3.02E − 11(+)F8(X)Best9.22E + 028.64E + 028.42E + 028.40E + 028.74E + 028.39E + 02Worst1.03E + 031.01E + 039.03E + 028.75E + 029.80E + 028.77E + 02Median9.79E + 029.45E + 028.81E + 028.61E + 029.26E + 028.60E + 02Mean9.75E + 029.42E + 028.78E + 028.59E + 029.23E + 028.58E + 02Std2.41E + 012.93E + 011.51E + 011.00E + 012.42E + 019.56E + 00P3.02E − 11(+)7.39E − 11(+)2.32E − 06(+)0.6414(=)3.34E − 11(+)F9(X)Best4.50E + 031.95E + 039.00E + 029.00E + 022.27E + 039.00E + 02Worst5.47E + 035.86E + 039.49E + 029.26E + 026.12E + 039.93E + 02Median5.39E + 035.15E + 039.05E + 029.05E + 024.53E + 039.04E + 02Mean5.30E + 034.74E + 039.07E + 029.07E + 024.31E + 039.11E + 02Std5.53E + 029.76E + 023.25E + 027.14E + 006.15E + 021.79E + 01P3.02E − 11(+)3.02E − 11(+)0.66272(=)0.9823(=)3.02E − 11(+)F10(X)Best4.01E + 034.06E + 033.24E + 032.31E + 033.61E + 032.76E + 03Worst6.07E + 035.93E + 034.81E + 033.95E + 036.19E + 033.92E + 03Median5.07E + 034.71E + 034.10E + 033.38E + 035.19E + 033.36E + 03Mean5.16E + 034.83E + 034.03E + 033.35E + 035.03E + 033.36E + 03Std5.53E + 025.42E + 023.25E + 023.97E + 026.15E + 023.25E + 02P3.02E − 11(+)3.02E − 11(+)1.01E − 08(+)0.91170(=)8.99E − 11(+)F11(X)Best1.18E + 031.14E + 031.10E + 031.11E + 031.16E + 031.11E + 03Worst1.42E + 031.48E + 031.14E + 031.14E + 031.32E + 031.15E + 03Median1.29E + 031.30E + 031.12E + 031.12E + 031.22E + 031.12E + 03Mean1.30E + 031.30E + 031.12E + 031.12E + 031.23E + 031.12E + 03Std6.50E + 017.29E + 018.27E + 007.78E + 004.49E + 017.72E + 00P3.02E − 11(+)3.34E − 11(+)0.2707(=)0.2588(=)3.02E − 11(+)F12(X)Best4.55E + 041.32E + 041.75E + 048.77E + 031.29E + 062.07E + 04Worst3.89E + 051.35E + 051.00E + 101.00E + 109.36E + 061.05E + 05Median1.42E + 054.27E + 041.00E + 101.00E + 103.59E + 065.48E + 04Mean1.64E + 054.83E + 045.67E + 095.34E + 094.18E + 065.37E + 04Std1.04E + 042.58E + 046.46E + 095.07E + 093.20E + 042.18E + 04P6.01E − 08(+)1.83E − 05(+)0.000386(+)0.01727(+)3.02E − 11(+)F13(X)Best1.45E + 032.79E + 031.67E + 031.35E + 035.41E + 041.35E + 03Worst5.02E + 046.67E + 047.40E + 031.00E + 102.11E + 051.57E + 03Median6.67E + 038.49E + 032.52E + 031.42E + 031.19E + 051.41E + 03Mean1.05E + 041.44E + 042.89E + 036.67E + 081.13E + 051.43E + 03Std1.04E + 041.84E + 041.18E + 032.54E + 093.20E + 046.46E + 01P1.46E − 10(+)3.02E − 11(+)3.02E − 11(+)0.1857(=)3.02E − 11(+)F14(X)Best2.70E + 031.59E + 031.45E + 031.43E + 033.41E + 031.43E + 03Worst4.36E + 041.74E + 041.49E + 031.46E + 035.26E + 041.46E + 03Median9.44E + 034.69E + 031.47E + 031.44E + 032.86E + 041.44E + 03Mean1.12E + 045.25E + 031.47E + 031.44E + 032.54E + 041.44E + 03Std8.21E + 033.19E + 038.17E + 008.03E + 001.32E + 048.04E + 00P3.02E − 11(+)3.02E − 11(+)6.70E − 11(+)0.1580(=)3.02E − 11(+)F15(X)Best2.01E + 031.79E + 031.57E + 031.51E + 031.94E + 041.51E + 03Worst4.62E + 044.34E + 041.62E + 031.53E + 036.21E + 041.54E + 03Median1.01E + 044.19E + 031.59E + 031.52E + 034.36E + 041.52E + 03Mean1.62E + 049.43E + 031.59E + 031.52E + 034.08E + 041.52E + 03Std3.42E + 021.06E + 041.26E + 015.28E + 003.21E + 022.08E + 02P3.02E − 11(+)3.02E − 11(+)3.02E − 11(+)0.1536(=)3.02E − 11(+)F16(X)Best2.25E + 032.20E + 031.71E + 031.76E + 032.49E + 031.82E + 03Worst3.62E + 033.39E + 032.45E + 032.42E + 033.68E + 032.35E + 03Median2.96E + 032.77E + 032.02E + 032.05E + 033.07E + 032.03E + 03Mean2.93E + 032.74E + 032.05E + 032.07E + 033.09E + 032.07E + 03Std3.42E + 023.21E + 022.08E + 021.69E + 023.21E + 021.53E + 02P6.70E − 11(+)2.61E − 10(+)0.5011(=)0.6734(=)3.02E − 11(+)F17(X)Best1.98E + 031.79E + 031.76E + 031.73E + 031.79E + 031.73E + 03Worst2.88E + 032.71E + 031.89E + 031.99E + 032.54E + 031.96E + 03Median2.47E + 032.23E + 031.79E + 031.80E + 032.08E + 031.77E + 03Mean2.47E + 032.26E + 031.80E + 031.82E + 032.13E + 031.79E + 03Std2.33E + 022.21E + 022.87E + 016.63E + 012.40E + 025.62E + 01P3.02E − 11(+)1.78E − 10(+)0.005828(+)0.07978(=)9.76E − 10(+)F18(X)Best2.71E + 048.67E + 031.15E + 041.87E + 035.21E + 041.89E + 03Worst5.02E + 052.96E + 057.70E + 042.81E + 036.73E + 052.51E + 03Median1.15E + 051.07E + 053.44E + 041.98E + 032.36E + 051.98E + 03Mean1.56E + 051.12E + 053.59E + 042.07E + 032.47E + 052.01E + 03Std1.60E + 047.56E + 041.24E + 042.33E + 025.79E + 052.63E + 00P3.02E − 11(+)3.02E − 11(+)3.02E − 11(+)0.7844(=)3.02E − 11(+)F19(X)Best2.06E + 032.27E + 031.94E + 031.91E + 032.16E + 051.91E + 03Worst5.35E + 045.54E + 041.97E + 031.92E + 032.39E + 061.92E + 03Median6.25E + 037.81E + 031.95E + 031.91E + 031.39E + 061.91E + 03Mean1.37E + 041.49E + 041.95E + 031.91E + 031.32E + 061.91E + 03Std1.60E + 041.56E + 047.42E + 002.22E + 005.79E + 052.63E + 00P3.02E − 11(+)3.02E − 11(+)3.02E − 11(+)0.7505(=)3.02E − 11(+)F20(X)Best2.26E + 032.25E + 032.02E + 032.02E + 032.26E + 032.04E + 03Worst3.05E + 032.82E + 032.34E + 032.29E + 032.69E + 032.31E + 03Median2.58E + 032.40E + 032.16E + 032.15E + 032.31E + 032.08E + 03Mean2.62E + 032.44E + 032.14E + 032.13E + 032.37E + 032.12E + 03Std2.11E + 021.49E + 028.20E + 018.12E + 011.20E + 026.43E + 01P4.50E − 11(+)6.07E − 11(+)5.01E − 01(=)0.9351(=)1.33E − 10(+)F21(X)Best2.42E + 032.39E + 032.20E + 032.20E + 032.37E + 032.20E + 03Worst2.59E + 032.57E + 032.40E + 032.38E + 032.60E + 032.39E +03Median2.50E + 032.47E + 032.38E + 032.36E + 032.45E + 032.35E + 03Mean2.50E + 032.47E + 032.36E + 032.35E + 032.45E + 032.34E + 03Std1.95E + 034.42E + 016.33E + 014.11E + 019.25E − 011.19E + 03P3.02E − 11(+)3.02E − 11(+)2.13E − 05(+)0.5691(=)3.69E − 11(+)F22(X)Best2.30E + 032.30E + 032.30E + 032.30E + 032.31E + 032.30E + 03Worst7.73E + 038.05E + 035.48E + 035.34E + 032.31E + 035.83E + 03Median6.52E + 035.69E + 032.30E + 032.30E + 032.31E + 032.30E + 03Mean5.96E + 034.81E + 033.00E + 033.10E + 032.31E + 032.53E + 03Std1.95E + 032.19E + 031.19E + 031.19E + 039.25E − 018.77E + 02P1.49E − 06(+)3.91E − 02(+)6.55E − 04(+)8.89E − 02(+)8.48E − 09(−)F23(X)Best2.77E + 032.71E + 032.66E + 032.67E + 032.82E + 032.40E + 03Worst3.00E + 033.00E + 032.73E + 032.73E + 033.01E + 032.76E + 03Median2.91E + 032.83E + 032.71E + 032.71E + 032.93E + 032.72E + 03Mean2.90E + 032.84E + 032.71E + 032.71E + 032.92E + 032.70E + 03Std5.30E + 016.12E + 011.40E + 011.49E + 015.79E + 016.38E + 01P3.02E − 11(+)1.96E − 10(+)9.93E − 02(=)1.22E − 01(=)3.02E − 11(+)F24(X)Best2.95E + 032.92E + 032.86E + 032.86E + 032.94E + 032.60E + 03Worst3.33E + 033.15E + 032.94E + 032.91E + 033.23E + 032.91E + 03Median3.08E + 032.98E + 032.90E + 032.89E + 033.07E + 032.88E + 03Mean3.10E + 033.00E + 032.90E + 032.89E + 033.07E + 032.87E + 03Std1.52E + 015.59E + 011.75E + 001.30E + 012.19E + 017.35E + 01P3.02E − 11(+)3.02E − 11(+)6.38E − 03(+)9.63E − 02(=)3.02E − 11(+)F25(X)Best2.88E + 032.88E + 032.88E + 032.88E + 032.89E + 032.88E + 03Worst2.94E + 032.94E + 032.89E + 032.89E + 032.96E + 032.89E + 03Median2.89E + 032.89E + 032.89E + 032.89E + 032.94E + 032.89E + 03Mean2.90E + 032.89E + 032.89E + 032.89E + 032.93E + 032.89E + 03Std1.52E + 011.32E + 011.75E + 001.61E + 002.19E + 016.12E − 01P6.74E − 06(+)6.38E − 03(+)8.77E − 02(=)8.77E − 01(=)5.07E − 10(+)F26(X)Best3.67E + 032.90E + 032.80E + 032.80E + 032.83E + 032.80E + 03Worst7.70E + 037.46E + 034.58E + 034.54E + 037.86E + 034.28E + 03Median6.38E + 035.99E + 032.90E + 033.46E + 034.81E + 032.90E + 03Mean6.33E + 035.64E + 033.33E + 033.60E + 034.77E + 032.94E + 03Std8.67E + 021.37E + 036.98E + 027.26E + 021.87E + 032.55E + 02P3.34E − 11(+)3.32E − 06(+)5.28E − 02(=)6.19E − 01(=)6.57E − 02(=)F27(X)Best3.22E + 033.20E + 033.18E + 033.17E + 033.36E + 033.17E + 03Worst3.39E + 033.32E + 033.21E + 033.22E + 033.67E + 033.21E + 03Median3.27E + 033.24E + 033.20E + 033.20E + 033.47E + 033.20E + 03Mean3.27E + 033.25E + 033.20E + 033.20E + 033.48E + 033.20E + 03Std4.95E + 012.64E + 013.67E + 011.08E + 019.39E + 009.01E + 00P3.02E − 11(+)1.21E − 10(+)9.05E − 02(=)5.94E − 02(=)3.02E − 11(+)F28(X)Best3.10E + 033.10E + 033.10E + 033.10E + 033.18E + 033.10E + 03Worst3.25E + 033.26E + 033.21E + 033.20E + 033.21E + 033.26E + 03Median3.11E + 033.10E + 033.10E + 033.10E + 033.20E + 033.10E + 03Mean3.14E + 033.14E + 033.11E + 033.12E + 033.20E + 033.14E + 03Std4.95E + 016.30E + 013.67E + 013.92E + 019.39E + 005.94E + 01P1.33E − 02(+)8.07E − 01(=)5.27E − 06(−)6.29E − 05(−)1.00E − 03(+)F29(X)Best3.80E + 033.60E + 033.32E + 033.29E + 033.88E + 033.28E + 03Worst4.69E + 034.43E + 033.63E + 033.56E + 034.84E + 033.63E + 03Median4.09E + 033.98E + 033.47E + 033.44E + 034.34E + 033.41E + 03Mean4.16E + 034.00E + 033.46E + 033.44E + 034.33E + 033.43E + 03Std2.40E + 022.05E + 028.23E + 017.44E + 012.72E + 027.74E + 01P3.02E − 11(+)3.69E − 11(+)1.05E − 01(=)5.49E − 01(=)3.02E − 11(+)F30(X)Best5.80E + 035.30E + 037.68E + 035.27E + 031.15E + 065.33E + 03Worst2.42E + 042.13E + 041.17E + 046.27E + 034.46E + 066.93E + 03Median9.94E + 037.31E + 039.56E + 035.74E + 032.21E + 065.67E + 03Mean1.10E + 049.26E + 039.70E + 035.74E + 032.52E + 065.80E + 03Std4.95E + 014.15E + 031.08E + 032.81E + 028.37E + 053.67E + 01P2.37E − 10(+)2.88E − 06(+)3.02E − 11(+)0.9117(=)3.02E − 11(+)+/ = /−28/1/028/1/018/9/25/22/227/1/1Table 7
Test results of each algorithm in CEC 2017(dim = 50).
FIndexSSACSSAMSSCSCSsinFA-CLLSSAF1(x)Best1.06E + 021.02E + 021.00E + 101.00E + 103.48E + 061.01E + 02Worst2.08E + 042.29E + 041.00E + 101.00E + 106.99E + 069.93E + 03Median2.31E + 031.15E + 031.00E + 101.00E + 105.22E + 061.19E + 03Mean3.05E + 032.98E + 031.00E + 101.00E + 105.16E + 062.39E + 03Std4.04E + 034.48E + 030.00E + 000.00E + 007.96E + 052.74E + 03P0.3870(=)0.7171(=)1.21E − 12(+)1.21E − 12(+)3.02E − 11(+)F3(x)Best1.18E + 033.01E + 021.47E + 041.25E + 042.25E + 043.00E + 02Worst1.02E + 043.09E + 024.03E + 043.89E + 047.91E + 043.01E + 02Median5.66E + 033.03E + 022.51E + 041.99E + 044.52E + 043.00E + 02Mean5.60E + 033.03E + 022.63E + 042.22E + 044.48E + 043.00E + 02Std2.82E + 031.55E + 006.32E + 037.45E + 034.63E + 011.09E − 01P3.02E − 11(+)3.02E − 11(+)3.02E − 11(+)3.02E − 11(+)3.02E − 11(+)F4(X)Best4.01E + 024.08E + 024.00E + 024.09E + 024.75E + 024.00E + 02Worst6.17E + 027.30E + 026.61E + 025.39E + 026.86E + 025.40E + 02Median4.72E + 025.33E + 025.46E + 024.29E + 026.03E + 024.73E + 02Mean4.88E + 025.35E + 025.27E + 024.47E + 025.87E + 024.60E + 02Std6.85E + 016.81E + 017.76E + 013.46E + 014.63E + 013.38E + 01P2.52E − 01(=)3.16E − 05(+)1.77E − 03(+)3.15E − 02(−)9.92E − 11(+)F5(X)Best8.19E + 028.19E + 026.21E + 025.84E + 027.43E + 025.75E + 02Worst9.22E + 029.11E + 026.89E + 026.74E + 029.00E + 026.90E + 02Median8.77E + 028.64E + 026.55E + 026.36E + 027.94E + 026.34E + 02Mean8.69E + 028.66E + 026.54E + 026.34E + 027.97E + 026.35E + 02Std2.72E + 012.24E + 011.94E + 012.25E + 013.72E + 011.99E + 01P3.02E − 11(+)3.02E − 11(+)1.06E − 03(+)9.23E − 01(=)3.02E − 11(+)F6(X)Best6.38E + 026.33E + 026.00E + 026.00E + 026.43E + 026.00E + 02Worst6.65E + 026.63E + 026.00E + 026.00E + 026.67E + 026.00E + 02Median6.53E + 026.50E + 026.00E + 026.00E + 026.60E + 026.00E + 02Mean6.53E + 026.49E + 026.00E + 026.00E + 026.59E + 026.00E + 02Std7.26E + 009.15E + 002.81E − 029.62E − 031.36E + 022.70E − 02P3.02E − 11(+)3.02E − 11(+)3.03E − 02(+)2.39E − 04(−)3.02E − 11(+)F7(X)Best1.30E + 031.17E + 038.65E + 028.35E + 021.27E + 038.59E + 02Worst1.82E + 031.82E + 039.60E + 029.36E + 021.99E + 039.26E + 02Median1.75E + 031.56E + 039.14E + 029.02E + 021.70E + 038.95E + 02Mean1.68E + 031.52E + 039.16E + 028.98E + 021.67E + 038.96E + 02Std1.37E + 021.94E + 022.30E + 012.08E + 011.36E + 021.44E + 01P3.02E − 11(+)3.02E − 11(+)1.58E − 04(+)3.63E − 01(=)3.02E − 11(+)F8(X)Best1.10E + 031.08E + 038.83E + 028.79E + 021.03E + 039.20E + 02Worst1.25E + 031.26E + 039.76E + 029.65E + 021.20E + 031.00E + 03Median1.19E + 031.19E + 039.30E + 029.29E + 021.10E + 039.63E + 02Mean1.18E + 031.19E + 039.32E + 029.30E + 021.10E + 039.61E + 02Std4.05E + 014.04E + 011.80E + 012.23E + 013.66E + 011.79E + 01P3.02E − 11(+)3.02E − 11(+)4.11E − 07(−)1.61E − 06(−)3.02E − 11(+)F9(X)Best1.08E + 041.03E + 049.38E + 029.22E + 021.07E + 049.01E + 02Worst1.46E + 041.38E + 041.77E + 031.18E + 032.04E + 041.66E + 03Median1.31E + 041.30E + 041.12E + 031.01E + 031.52E + 041.06E + 03Mean1.29E + 041.27E + 041.16E + 031.03E + 031.54E + 041.10E + 03Std8.52E + 028.73E + 021.86E + 026.47E + 018.38E + 021.83E + 02P3.02E − 11(+)3.02E − 11(+)1.45E − 01(=)3.18E − 01(=)3.02E − 11(+)F10(X)Best6.33E + 036.32E + 035.62E + 034.96E + 036.23E + 034.67E + 03Worst9.53E + 031.00E + 047.60E + 036.57E + 039.50E + 036.86E + 03Median8.14E + 037.73E + 036.47E + 035.81E + 038.16E + 035.70E + 03Mean8.12E + 037.82E + 036.52E + 035.77E + 038.02E + 035.75E + 03Std6.74E + 028.10E + 024.72E + 024.02E + 028.38E + 026.04E + 02P1.07E − 09(+)3.08E − 08(+)5.46E − 06(+)2.57E − 07(+)3.35E − 08(+)F11(X)Best1.20E + 031.21E + 031.14E + 031.18E + 031.25E + 031.14E + 03Worst1.58E + 031.41E + 031.18E + 031.40E + 031.42E + 031.17E + 03Median1.36E + 031.29E + 031.16E + 031.29E + 031.33E + 031.15E + 03Mean1.37E + 031.30E + 031.16E + 031.30E + 031.34E + 031.15E + 03Std8.19E + 014.72E + 019.46E + 005.71E + 013.85E + 018.10E + 00P3.02E − 11(+)3.02E − 11(+)3.34E − 03(+)8.19E − 01(=)3.02E − 11(+)F12(X)Best4.63E + 051.22E + 051.00E + 101.00E + 101.04E + 071.68E + 05Worst3.71E + 063.83E + 061.00E + 101.00E + 105.74E + 072.25E + 06Median1.30E + 069.68E + 051.00E + 101.00E + 102.55E + 079.61E + 05Mean1.64E + 061.35E + 061.00E + 101.00E + 102.57E + 071.09E + 06Std9.69E + 059.69E + 050.00E + 000.00E + 001.06E + 055.84E + 05P4.68E − 02(+)4.64E − 01(=)1.21E − 12(+)1.21E − 12(+)3.02E − 11(+)F13(X)Best4.81E + 033.09E + 031.00E + 101.00E + 102.31E + 054.40E + 03Worst5.11E + 044.77E + 041.00E + 101.00E + 106.39E + 054.81E + 04Median1.90E + 041.15E + 041.00E + 101.00E + 104.16E + 051.03E + 04Mean2.35E + 041.66E + 041.00E + 101.00E + 104.02E + 051.55E + 04Std1.54E + 041.36E + 040.00E + 000.00E + 001.06E + 051.16E + 04P4.84E − 02(+)9.82E − 01(=)1.21E − 12(+)1.21E − 12(+)3.02E − 11(+)F14(X)Best2.89E + 034.47E + 031.64E + 031.50E + 032.95E + 041.46E + 03Worst2.11E + 051.68E + 051.93E + 031.59E + 034.22E + 051.55E + 03Median2.70E + 044.00E + 041.78E + 031.54E + 031.14E + 051.50E + 03Mean4.95E + 044.51E + 041.77E + 031.54E + 031.35E + 051.50E + 03Std4.91E + 044.08E + 046.03E + 011.73E + 018.34E + 042.07E + 01P3.02E − 11(+)3.02E − 11(+)3.02E − 11(+)4.69E − 08(+)3.02E − 11(+)F15(X)Best2.05E + 032.48E + 031.77E + 031.61E + 037.52E + 041.56E + 03Worst3.68E + 043.60E + 043.15E + 032.00E + 032.26E + 053.01E + 03Median1.48E + 041.89E + 041.92E + 031.68E + 031.48E + 051.69E + 03Mean1.65E + 041.66E + 041.99E + 031.72E + 031.50E + 051.77E + 03Std1.05E + 049.16E + 032.56E + 021.03E + 024.96E + 022.66E + 02P3.69E − 11(+)4.08E − 11(+)9.53E − 07(+)8.19E − 01(=)3.02E − 11(+)F16(X)Best2.94E + 032.87E + 032.08E + 032.14E + 033.04E + 032.30E + 03Worst4.63E + 034.17E + 033.21E + 033.35E + 034.71E + 033.18E + 03Median3.68E + 033.53E + 032.70E + 032.62E + 034.12E + 032.79E + 03Mean3.77E + 033.59E + 032.67E + 032.62E + 033.96E + 032.78E + 03Std4.72E + 023.67E + 022.93E + 023.02E + 024.96E + 022.24E + 02P1.78E − 10(+)2.37E − 10(+)1.91E − 01(=)1.56E − 02(−)5.49E − 11(+)F17(X)Best2.35E + 032.72E + 032.11E + 032.01E + 033.00E + 032.01E + 03Worst4.02E + 034.18E + 032.71E + 032.70E + 034.31E + 032.78E + 03Median3.42E + 033.43E + 032.47E + 032.31E + 033.57E + 032.43E + 03Mean3.37E + 033.39E + 032.43E + 032.32E + 033.56E + 032.40E + 03Std4.05E + 023.57E + 021.74E + 021.62E + 023.02E + 021.92E + 02P2.87E − 10(+)4.08E − 11(+)6.10E − 01(=)7.01E − 02(=)3.02E − 11(+)F18(X)Best9.41E + 047.26E + 042.51E + 046.30E + 043.20E + 054.45E + 04Worst9.83E + 054.50E + 053.71E + 052.02E + 052.59E + 062.64E + 05Median2.48E + 051.63E + 051.17E + 051.16E + 051.23E + 068.99E + 04Mean2.78E + 051.75E + 051.39E + 051.27E + 051.23E + 061.01E + 05Std1.61E + 058.15E + 048.07E + 043.92E + 041.18E + 064.43E + 04P8.89E − 10(+)1.75E − 05(+)3.92E − 02(+)3.85E − 03(+)3.02E − 11(+)F19(X)Best2.98E + 032.38E + 032.06E + 031.96E + 031.03E + 051.93E + 03Worst4.46E + 044.43E + 042.73E + 032.03E + 033.66E + 062.00E + 03Median2.05E + 041.69E + 042.29E + 031.99E + 031.39E + 061.95E + 03Mean2.28E + 042.13E + 042.32E + 031.99E + 031.61E + 061.95E + 03Std1.63E + 041.32E + 041.37E + 021.57E + 011.18E + 061.60E + 01P3.02E − 11(+)3.02E − 11(+)3.02E − 11(+)3.20E − 09(+)3.02E − 11(+)F20(X)Best2.72E + 032.61E + 032.25E + 032.30E + 032.50E + 032.15E + 03Worst3.87E + 033.80E + 032.84E + 032.86E + 033.82E + 032.72E + 03Median3.23E + 033.19E + 032.62E + 032.56E + 033.20E + 032.44E + 03Mean3.28E + 033.20E + 032.60E + 032.56E + 033.21E + 032.46E + 03Std3.19E + 023.65E + 021.38E + 021.39E + 023.14E + 021.50E + 02P3.34E − 11(+)1.33E − 10(+)6.20E − 04(+)9.07E − 03(+)1.21E − 10(+)F21(X)Best2.50E + 032.55E + 032.41E + 032.40E + 032.44E + 032.41E + 03Worst2.85E + 032.86E + 032.50E + 032.47E + 032.78E + 032.46E + 03Median2.68E + 032.68E + 032.47E + 032.43E + 032.63E + 032.43E + 03Mean2.69E + 032.68E + 032.46E + 032.43E + 032.61E + 032.43E + 03Std9.83E + 017.97E + 012.11E + 011.87E + 012.24E + 031.44E + 01P3.02E − 11(+)3.02E − 11(+)1.47E − 07(+)8.30E − 01(=)6.07E − 11(+)F22(X)Best8.06E + 038.10E + 032.30E + 032.30E + 032.32E + 032.30E + 03Worst1.21E + 041.11E + 048.54E + 038.35E + 031.20E + 049.50E + 03Median9.61E + 039.92E + 037.47E + 037.55E + 031.03E + 048.38E + 03Mean9.79E + 039.66E + 036.95E + 036.90E + 039.82E + 037.88E + 03Std1.08E + 038.33E + 021.65E + 031.91E + 032.24E + 031.60E + 03P3.96E − 08(+)1.10E − 08(+)2.28E − 05(−)4.08E − 05(−)3.96E − 08(+)F23(X)Best3.02E + 033.09E + 032.82E + 032.73E + 033.06E + 032.74E + 03Worst3.48E + 033.44E + 032.94E + 032.91E + 033.59E + 032.94E + 03Median3.18E + 033.27E + 032.87E + 032.87E + 033.31E + 032.89E + 03Mean3.22E + 033.26E + 032.87E + 032.87E + 033.31E + 032.89E + 03Std1.18E + 027.68E + 012.76E + 013.47E + 011.28E + 023.69E + 01P3.02E − 11(+)3.02E − 11(+)2.16E − 03(−)2.38E − 03(−)3.02E − 11(+)F24(X)Best3.22E + 033.17E + 032.99E + 033.00E + 033.32E + 033.00E + 03Worst3.71E + 033.58E + 033.15E + 033.14E + 033.78E + 033.14E + 03Median3.36E + 033.40E + 033.07E + 033.06E + 033.54E + 033.05E + 03Mean3.38E + 033.39E + 033.08E + 033.06E + 033.53E + 033.05E + 03Std1.19E + 029.85E + 013.43E + 013.68E + 013.30E + 013.59E + 01P3.02E − 11(+)3.02E − 11(+)5.57E − 03(+)5.30E − 01(=)3.02E − 11(+)F25(X)Best2.96E + 032.98E + 032.96E + 032.96E + 033.01E + 032.96E + 03Worst3.11E + 033.12E + 033.08E + 033.06E + 033.14E + 033.03E + 03Median3.07E + 033.08E + 033.03E + 032.98E + 033.12E + 033.02E + 03Mean3.05E + 033.07E + 033.03E + 032.99E + 033.11E + 033.00E + 03Std3.83E + 012.94E + 013.74E + 012.99E + 013.30E + 012.53E + 01P7.60E − 07(+)2.87E − 10(+)1.32E − 04(+)8.19E − 01(=)1.29E − 09(+)F26(X)Best2.90E + 032.90E + 032.90E + 032.90E + 031.03E + 042.90E + 03Worst1.13E + 041.13E + 045.58E + 035.52E + 031.40E + 045.80E + 03Median2.90E + 036.53E + 035.13E + 034.87E + 031.19E + 042.90E + 03Mean5.81E + 036.49E + 035.02E + 034.18E + 031.19E + 043.95E + 03Std3.69E + 033.61E + 036.09E + 021.15E + 039.27E + 021.24E + 03P1.86E − 01(=)8.07E − 01(=)2.61E − 02(+)2.12E − 01(=)3.02E − 11(+)F27(X)Best3.35E + 033.43E + 033.24E + 033.20E + 033.80E + 033.17E + 03Worst4.07E + 033.84E + 033.38E + 033.34E + 035.08E + 033.33E + 03Median3.57E + 033.57E + 033.30E + 033.27E + 034.44E + 033.26E + 03Mean3.57E + 033.62E + 033.31E + 033.26E + 034.47E + 033.26E + 03Std1.45E + 021.16E + 024.11E + 013.49E + 014.30E + 013.81E + 01P3.02E − 11(+)3.02E − 11(+)3.18E − 04(+)8.88E − 01(=)3.02E − 11(+)F28(X)Best3.26E + 033.26E + 033.26E + 033.26E + 033.29E + 033.26E + 03Worst3.32E + 033.43E + 033.31E + 033.30E + 033.51E + 033.31E + 03Median3.30E + 033.31E + 033.26E + 033.26E + 033.37E + 033.26E + 03Mean3.30E + 033.31E + 033.27E + 033.26E + 033.37E + 033.26E + 03Std1.69E + 013.82E + 011.89E + 018.18E + 004.30E + 011.49E + 01P1.73E − 06(+)8.35E − 08(+)3.18E − 03(+)9.06E − 08(−)7.39E − 11(+)F29(X)Best4.07E + 033.90E + 033.35E + 033.36E + 034.99E + 033.34E + 03Worst5.69E + 035.59E + 034.01E + 033.93E + 036.57E + 033.99E + 03Median4.75E + 034.75E + 033.77E + 033.68E + 035.78E + 033.70E + 03Mean4.84E + 034.80E + 033.74E + 033.65E + 035.80E + 033.69E + 03Std3.75E + 024.58E + 021.60E + 021.66E + 024.30E + 021.50E + 02P3.02E − 11(+)3.69E − 11(+)1.76E − 01(=)3.79E − 01(=)3.02E − 11(+)F30(X)Best6.92E + 056.25E + 056.18E + 056.05E + 052.64E + 075.88E + 05Worst2.24E + 062.30E + 067.72E + 058.91E + 057.04E + 077.79E + 05Median1.27E + 061.11E + 066.94E + 056.32E + 053.43E + 076.13E + 05Mean1.31E + 061.17E + 066.92E + 056.44E + 053.67E + 076.31E + 05Std4.24E + 053.82E + 054.34E + 045.26E + 044.30E + 015.23E + 04P5.49E − 11(+)1.61E − 10(+)5.46E − 06(+)2.42E − 02(+)3.02E − 11(+)+/ = /−26/3/025/4/022/4/310/12/729/0/0From Tables6 and 7, it is apparent that LSSA has a better optimization effect in both 30 and 50 dimensions, and each function is close to the theoretical optimal value, but the effect on the F4 function is poor. Although MSSCS and CSsin have better optimization effects, they show the very poor effects on F1, F3, and F12-13 in 50 dimensions. It can be seen that these two algorithms have limitations in this kind of problem. Other algorithms perform poorly and rarely approach the theoretical optimal value. From the statistical test, the LSSA algorithm is significantly different from other algorithms, showing better advantages, and some functions are similar to MSSCS and CSsin. Generally speaking, the LSSA algorithm has high universality and is more suitable for some complex optimization problems than other algorithms.


## 5.1. Algorithm Complexity

According to the requirements of CEC 2017 test standard, the complexity of the proposed algorithm needs to be calculated. Therefore, the following code is used to calculate the running timeT0 of LSSA:fori = 1 : 1,000,000x = 0.55 + double(i); x = x + x; x = x/2; x = x ∗ x; x = sqrt(x); x = log(x); x = exp(x); x = x/(x + 2);endT1 is the calculation time of the F18 function under 200,000 evaluation times, and T2 is the average calculation time of the F18 function for 5 times under the same condition. The specific algorithm complexity is shown in Table 4.Table 4
Complexity of the LSSA algorithm.
DimT0T1T2|T2 − T1|/T0300.08384.94123.968411.6085509.14985.300654.1031


## 5.2. Function Test

Experiments on benchmark functions alone cannot show the universality and effectiveness of the algorithm. To better illustrate the effectiveness of the LSSA algorithm and avoid the situation that the LSSA algorithm depends on the optimal value of 0, the algorithm is tested on CEC 2017 test function [34], and the number of evaluations is 10,000 ∗ dim, the dimension is 50 or 30, and the population number is 50. The test results of LSSA and SSA, CSSA, MSSCS, CSsin, and FA-CL are compared, and the specific parameters of each algorithm are shown in Table 5. Each algorithm runs 30 times independently and calculates five indexes of the results of each algorithm running on the function, namely, the best, the worst, the median, the mean, and the standard deviation. Each index can clearly reflect the optimization ability of each algorithm. The best value in each indicator is treated in bold font. At the same time, the Wilcoxon rank test is used to show whether there is a significant difference in each algorithm, and the experiment is carried out at the significance level of 5%. “ + ” means that the LSSA algorithm is better than other algorithms in the optimization effect, “−” means the opposite, and “ = ” means the same performance. Finally, the comparison of each algorithm is counted. The test results are shown in Tables 6 and 7.Table 5
Parameters of each algorithm.
AlgorithmSSACSSAMSSCSCSsinFA-CLLSSAParameterDiscoverers = 0.2 ×NInvestigators = 0.6 × NDiscoverers = 0.2 ×NInvestigators = 0.6 × Nα = 0.01β = 1.5Pa = 0.25C = 0.2PAmax = 0.35PAmin = 0.25Pmax = 0.75Pmax = 0.25Freq = 0.5α = 0.01βmin = 0.2β = 1γ = 1Discoverers = 0.2 ×NInvestigators = 0.6 × NTable 6
Test results of each algorithm in CEC 2017(dim = 30).
FIndexSSACSSAMSSCSCSsinFA-CLLSSAF1(x)Best1.01E + 021.03E + 021.00E + 101.00E + 108.21E + 051.10E + 02Worst2.03E + 041.98E + 041.00E + 101.00E + 101.85E + 061.86E + 04Median2.12E + 034.55E + 031.00E + 101.00E + 101.20E + 061.84E + 03Mean4.80E + 036.27E + 031.00E + 101.00E + 101.28E + 064.47E + 03Std5.74E + 035.94E + 030.00E + 000.00E + 002.96E + 055.61E + 03P0.8073(=)0.0484(+)1.21E − 12(+)1.21E − 12(+)3.02E − 11(+)F3(x)Best3.52E + 023.00E + 023.08E + 023.14E + 028.98E + 023.00E + 02Worst2.48E + 033.00E + 021.07E + 038.75E + 025.10E + 033.00E + 02Median7.72E + 023.00E + 024.21E + 024.15E + 021.91E + 033.00E + 02Mean9.05E + 023.00E + 024.82E + 024.55E + 022.25E + 033.00E + 02Std2.93E + 011.77E − 031.64E + 011.27E + 022.17E + 018.17E − 04P3.02E − 11(+)0.0292(+)3.02E − 11(+)3.02E − 11(+)3.02E − 11(+)F4(X)Best4.00E + 024.28E + 024.00E + 024.00E + 024.68E + 024.00E + 02Worst5.21E + 025.17E + 024.89E + 024.67E + 025.32E + 024.64E + 02Median4.74E + 024.90E + 024.84E + 024.04E + 025.15E + 024.01E + 02Mean4.72E + 024.94E + 024.65E + 024.18E + 025.06E + 024.09E + 02Std2.93E + 012.12E + 013.30E + 012.41E + 012.17E + 011.64E + 01P1.41E − 09(+)4.08E − 11(+)1.10E − 08(+)0.1241(=)3.02E − 11(+)F5(X)Best5.69E + 026.14E + 025.36E + 025.26E + 026.36E + 025.54E + 02Worst8.27E + 028.01E + 025.73E + 025.69E + 027.33E + 025.96E + 02Median7.56E + 027.03E + 025.58E + 025.53E + 026.91E + 025.79E + 02Mean7.53E + 027.01E + 025.57E + 025.52E + 026.84E + 025.77E + 02Std5.71E + 014.74E + 019.13E + 009.40E + 002.59E + 011.08E + 01P2.87E − 10(+)3.02E − 11(+)4.31E − 08(−)1.17E − 09(−)3.02E − 11(+)F6(X)Best6.13E + 026.09E + 026.00E + 026.00E + 026.28E + 026.00E + 02Worst6.59E + 026.37E + 026.00E + 026.00E + 026.57E + 026.00E + 02Median6.40E + 026.21E + 026.00E + 026.00E + 026.46E + 026.00E + 02Mean6.40E + 026.21E + 026.00E + 026.00E + 026.45E + 026.00E + 02Std1.12E + 026.40E + 001.08E + 016.79E − 039.34E + 011.06E − 03P3.02E − 11(+)3.02E − 11(+)4.34E − 05(+)0.002156(+)3.02E − 11(+)F7(X)Best1.02E + 038.66E + 027.82E + 027.69E + 028.86E + 027.60E + 02Worst1.37E + 031.26E + 038.27E + 028.07E + 021.26E + 038.04E + 02Median1.27E + 039.66E + 028.07E + 027.92E + 021.07E + 037.87E + 02Mean1.23E + 031.00E + 038.08E + 027.90E + 021.07E + 037.86E + 02Std1.12E + 021.08E + 021.03E + 018.80E + 009.34E + 011.08E + 01P3.02E − 11(+)3.02E − 11(+)8.48E − 09(+)0.20620(=)3.02E − 11(+)F8(X)Best9.22E + 028.64E + 028.42E + 028.40E + 028.74E + 028.39E + 02Worst1.03E + 031.01E + 039.03E + 028.75E + 029.80E + 028.77E + 02Median9.79E + 029.45E + 028.81E + 028.61E + 029.26E + 028.60E + 02Mean9.75E + 029.42E + 028.78E + 028.59E + 029.23E + 028.58E + 02Std2.41E + 012.93E + 011.51E + 011.00E + 012.42E + 019.56E + 00P3.02E − 11(+)7.39E − 11(+)2.32E − 06(+)0.6414(=)3.34E − 11(+)F9(X)Best4.50E + 031.95E + 039.00E + 029.00E + 022.27E + 039.00E + 02Worst5.47E + 035.86E + 039.49E + 029.26E + 026.12E + 039.93E + 02Median5.39E + 035.15E + 039.05E + 029.05E + 024.53E + 039.04E + 02Mean5.30E + 034.74E + 039.07E + 029.07E + 024.31E + 039.11E + 02Std5.53E + 029.76E + 023.25E + 027.14E + 006.15E + 021.79E + 01P3.02E − 11(+)3.02E − 11(+)0.66272(=)0.9823(=)3.02E − 11(+)F10(X)Best4.01E + 034.06E + 033.24E + 032.31E + 033.61E + 032.76E + 03Worst6.07E + 035.93E + 034.81E + 033.95E + 036.19E + 033.92E + 03Median5.07E + 034.71E + 034.10E + 033.38E + 035.19E + 033.36E + 03Mean5.16E + 034.83E + 034.03E + 033.35E + 035.03E + 033.36E + 03Std5.53E + 025.42E + 023.25E + 023.97E + 026.15E + 023.25E + 02P3.02E − 11(+)3.02E − 11(+)1.01E − 08(+)0.91170(=)8.99E − 11(+)F11(X)Best1.18E + 031.14E + 031.10E + 031.11E + 031.16E + 031.11E + 03Worst1.42E + 031.48E + 031.14E + 031.14E + 031.32E + 031.15E + 03Median1.29E + 031.30E + 031.12E + 031.12E + 031.22E + 031.12E + 03Mean1.30E + 031.30E + 031.12E + 031.12E + 031.23E + 031.12E + 03Std6.50E + 017.29E + 018.27E + 007.78E + 004.49E + 017.72E + 00P3.02E − 11(+)3.34E − 11(+)0.2707(=)0.2588(=)3.02E − 11(+)F12(X)Best4.55E + 041.32E + 041.75E + 048.77E + 031.29E + 062.07E + 04Worst3.89E + 051.35E + 051.00E + 101.00E + 109.36E + 061.05E + 05Median1.42E + 054.27E + 041.00E + 101.00E + 103.59E + 065.48E + 04Mean1.64E + 054.83E + 045.67E + 095.34E + 094.18E + 065.37E + 04Std1.04E + 042.58E + 046.46E + 095.07E + 093.20E + 042.18E + 04P6.01E − 08(+)1.83E − 05(+)0.000386(+)0.01727(+)3.02E − 11(+)F13(X)Best1.45E + 032.79E + 031.67E + 031.35E + 035.41E + 041.35E + 03Worst5.02E + 046.67E + 047.40E + 031.00E + 102.11E + 051.57E + 03Median6.67E + 038.49E + 032.52E + 031.42E + 031.19E + 051.41E + 03Mean1.05E + 041.44E + 042.89E + 036.67E + 081.13E + 051.43E + 03Std1.04E + 041.84E + 041.18E + 032.54E + 093.20E + 046.46E + 01P1.46E − 10(+)3.02E − 11(+)3.02E − 11(+)0.1857(=)3.02E − 11(+)F14(X)Best2.70E + 031.59E + 031.45E + 031.43E + 033.41E + 031.43E + 03Worst4.36E + 041.74E + 041.49E + 031.46E + 035.26E + 041.46E + 03Median9.44E + 034.69E + 031.47E + 031.44E + 032.86E + 041.44E + 03Mean1.12E + 045.25E + 031.47E + 031.44E + 032.54E + 041.44E + 03Std8.21E + 033.19E + 038.17E + 008.03E + 001.32E + 048.04E + 00P3.02E − 11(+)3.02E − 11(+)6.70E − 11(+)0.1580(=)3.02E − 11(+)F15(X)Best2.01E + 031.79E + 031.57E + 031.51E + 031.94E + 041.51E + 03Worst4.62E + 044.34E + 041.62E + 031.53E + 036.21E + 041.54E + 03Median1.01E + 044.19E + 031.59E + 031.52E + 034.36E + 041.52E + 03Mean1.62E + 049.43E + 031.59E + 031.52E + 034.08E + 041.52E + 03Std3.42E + 021.06E + 041.26E + 015.28E + 003.21E + 022.08E + 02P3.02E − 11(+)3.02E − 11(+)3.02E − 11(+)0.1536(=)3.02E − 11(+)F16(X)Best2.25E + 032.20E + 031.71E + 031.76E + 032.49E + 031.82E + 03Worst3.62E + 033.39E + 032.45E + 032.42E + 033.68E + 032.35E + 03Median2.96E + 032.77E + 032.02E + 032.05E + 033.07E + 032.03E + 03Mean2.93E + 032.74E + 032.05E + 032.07E + 033.09E + 032.07E + 03Std3.42E + 023.21E + 022.08E + 021.69E + 023.21E + 021.53E + 02P6.70E − 11(+)2.61E − 10(+)0.5011(=)0.6734(=)3.02E − 11(+)F17(X)Best1.98E + 031.79E + 031.76E + 031.73E + 031.79E + 031.73E + 03Worst2.88E + 032.71E + 031.89E + 031.99E + 032.54E + 031.96E + 03Median2.47E + 032.23E + 031.79E + 031.80E + 032.08E + 031.77E + 03Mean2.47E + 032.26E + 031.80E + 031.82E + 032.13E + 031.79E + 03Std2.33E + 022.21E + 022.87E + 016.63E + 012.40E + 025.62E + 01P3.02E − 11(+)1.78E − 10(+)0.005828(+)0.07978(=)9.76E − 10(+)F18(X)Best2.71E + 048.67E + 031.15E + 041.87E + 035.21E + 041.89E + 03Worst5.02E + 052.96E + 057.70E + 042.81E + 036.73E + 052.51E + 03Median1.15E + 051.07E + 053.44E + 041.98E + 032.36E + 051.98E + 03Mean1.56E + 051.12E + 053.59E + 042.07E + 032.47E + 052.01E + 03Std1.60E + 047.56E + 041.24E + 042.33E + 025.79E + 052.63E + 00P3.02E − 11(+)3.02E − 11(+)3.02E − 11(+)0.7844(=)3.02E − 11(+)F19(X)Best2.06E + 032.27E + 031.94E + 031.91E + 032.16E + 051.91E + 03Worst5.35E + 045.54E + 041.97E + 031.92E + 032.39E + 061.92E + 03Median6.25E + 037.81E + 031.95E + 031.91E + 031.39E + 061.91E + 03Mean1.37E + 041.49E + 041.95E + 031.91E + 031.32E + 061.91E + 03Std1.60E + 041.56E + 047.42E + 002.22E + 005.79E + 052.63E + 00P3.02E − 11(+)3.02E − 11(+)3.02E − 11(+)0.7505(=)3.02E − 11(+)F20(X)Best2.26E + 032.25E + 032.02E + 032.02E + 032.26E + 032.04E + 03Worst3.05E + 032.82E + 032.34E + 032.29E + 032.69E + 032.31E + 03Median2.58E + 032.40E + 032.16E + 032.15E + 032.31E + 032.08E + 03Mean2.62E + 032.44E + 032.14E + 032.13E + 032.37E + 032.12E + 03Std2.11E + 021.49E + 028.20E + 018.12E + 011.20E + 026.43E + 01P4.50E − 11(+)6.07E − 11(+)5.01E − 01(=)0.9351(=)1.33E − 10(+)F21(X)Best2.42E + 032.39E + 032.20E + 032.20E + 032.37E + 032.20E + 03Worst2.59E + 032.57E + 032.40E + 032.38E + 032.60E + 032.39E +03Median2.50E + 032.47E + 032.38E + 032.36E + 032.45E + 032.35E + 03Mean2.50E + 032.47E + 032.36E + 032.35E + 032.45E + 032.34E + 03Std1.95E + 034.42E + 016.33E + 014.11E + 019.25E − 011.19E + 03P3.02E − 11(+)3.02E − 11(+)2.13E − 05(+)0.5691(=)3.69E − 11(+)F22(X)Best2.30E + 032.30E + 032.30E + 032.30E + 032.31E + 032.30E + 03Worst7.73E + 038.05E + 035.48E + 035.34E + 032.31E + 035.83E + 03Median6.52E + 035.69E + 032.30E + 032.30E + 032.31E + 032.30E + 03Mean5.96E + 034.81E + 033.00E + 033.10E + 032.31E + 032.53E + 03Std1.95E + 032.19E + 031.19E + 031.19E + 039.25E − 018.77E + 02P1.49E − 06(+)3.91E − 02(+)6.55E − 04(+)8.89E − 02(+)8.48E − 09(−)F23(X)Best2.77E + 032.71E + 032.66E + 032.67E + 032.82E + 032.40E + 03Worst3.00E + 033.00E + 032.73E + 032.73E + 033.01E + 032.76E + 03Median2.91E + 032.83E + 032.71E + 032.71E + 032.93E + 032.72E + 03Mean2.90E + 032.84E + 032.71E + 032.71E + 032.92E + 032.70E + 03Std5.30E + 016.12E + 011.40E + 011.49E + 015.79E + 016.38E + 01P3.02E − 11(+)1.96E − 10(+)9.93E − 02(=)1.22E − 01(=)3.02E − 11(+)F24(X)Best2.95E + 032.92E + 032.86E + 032.86E + 032.94E + 032.60E + 03Worst3.33E + 033.15E + 032.94E + 032.91E + 033.23E + 032.91E + 03Median3.08E + 032.98E + 032.90E + 032.89E + 033.07E + 032.88E + 03Mean3.10E + 033.00E + 032.90E + 032.89E + 033.07E + 032.87E + 03Std1.52E + 015.59E + 011.75E + 001.30E + 012.19E + 017.35E + 01P3.02E − 11(+)3.02E − 11(+)6.38E − 03(+)9.63E − 02(=)3.02E − 11(+)F25(X)Best2.88E + 032.88E + 032.88E + 032.88E + 032.89E + 032.88E + 03Worst2.94E + 032.94E + 032.89E + 032.89E + 032.96E + 032.89E + 03Median2.89E + 032.89E + 032.89E + 032.89E + 032.94E + 032.89E + 03Mean2.90E + 032.89E + 032.89E + 032.89E + 032.93E + 032.89E + 03Std1.52E + 011.32E + 011.75E + 001.61E + 002.19E + 016.12E − 01P6.74E − 06(+)6.38E − 03(+)8.77E − 02(=)8.77E − 01(=)5.07E − 10(+)F26(X)Best3.67E + 032.90E + 032.80E + 032.80E + 032.83E + 032.80E + 03Worst7.70E + 037.46E + 034.58E + 034.54E + 037.86E + 034.28E + 03Median6.38E + 035.99E + 032.90E + 033.46E + 034.81E + 032.90E + 03Mean6.33E + 035.64E + 033.33E + 033.60E + 034.77E + 032.94E + 03Std8.67E + 021.37E + 036.98E + 027.26E + 021.87E + 032.55E + 02P3.34E − 11(+)3.32E − 06(+)5.28E − 02(=)6.19E − 01(=)6.57E − 02(=)F27(X)Best3.22E + 033.20E + 033.18E + 033.17E + 033.36E + 033.17E + 03Worst3.39E + 033.32E + 033.21E + 033.22E + 033.67E + 033.21E + 03Median3.27E + 033.24E + 033.20E + 033.20E + 033.47E + 033.20E + 03Mean3.27E + 033.25E + 033.20E + 033.20E + 033.48E + 033.20E + 03Std4.95E + 012.64E + 013.67E + 011.08E + 019.39E + 009.01E + 00P3.02E − 11(+)1.21E − 10(+)9.05E − 02(=)5.94E − 02(=)3.02E − 11(+)F28(X)Best3.10E + 033.10E + 033.10E + 033.10E + 033.18E + 033.10E + 03Worst3.25E + 033.26E + 033.21E + 033.20E + 033.21E + 033.26E + 03Median3.11E + 033.10E + 033.10E + 033.10E + 033.20E + 033.10E + 03Mean3.14E + 033.14E + 033.11E + 033.12E + 033.20E + 033.14E + 03Std4.95E + 016.30E + 013.67E + 013.92E + 019.39E + 005.94E + 01P1.33E − 02(+)8.07E − 01(=)5.27E − 06(−)6.29E − 05(−)1.00E − 03(+)F29(X)Best3.80E + 033.60E + 033.32E + 033.29E + 033.88E + 033.28E + 03Worst4.69E + 034.43E + 033.63E + 033.56E + 034.84E + 033.63E + 03Median4.09E + 033.98E + 033.47E + 033.44E + 034.34E + 033.41E + 03Mean4.16E + 034.00E + 033.46E + 033.44E + 034.33E + 033.43E + 03Std2.40E + 022.05E + 028.23E + 017.44E + 012.72E + 027.74E + 01P3.02E − 11(+)3.69E − 11(+)1.05E − 01(=)5.49E − 01(=)3.02E − 11(+)F30(X)Best5.80E + 035.30E + 037.68E + 035.27E + 031.15E + 065.33E + 03Worst2.42E + 042.13E + 041.17E + 046.27E + 034.46E + 066.93E + 03Median9.94E + 037.31E + 039.56E + 035.74E + 032.21E + 065.67E + 03Mean1.10E + 049.26E + 039.70E + 035.74E + 032.52E + 065.80E + 03Std4.95E + 014.15E + 031.08E + 032.81E + 028.37E + 053.67E + 01P2.37E − 10(+)2.88E − 06(+)3.02E − 11(+)0.9117(=)3.02E − 11(+)+/ = /−28/1/028/1/018/9/25/22/227/1/1Table 7
Test results of each algorithm in CEC 2017(dim = 50).
FIndexSSACSSAMSSCSCSsinFA-CLLSSAF1(x)Best1.06E + 021.02E + 021.00E + 101.00E + 103.48E + 061.01E + 02Worst2.08E + 042.29E + 041.00E + 101.00E + 106.99E + 069.93E + 03Median2.31E + 031.15E + 031.00E + 101.00E + 105.22E + 061.19E + 03Mean3.05E + 032.98E + 031.00E + 101.00E + 105.16E + 062.39E + 03Std4.04E + 034.48E + 030.00E + 000.00E + 007.96E + 052.74E + 03P0.3870(=)0.7171(=)1.21E − 12(+)1.21E − 12(+)3.02E − 11(+)F3(x)Best1.18E + 033.01E + 021.47E + 041.25E + 042.25E + 043.00E + 02Worst1.02E + 043.09E + 024.03E + 043.89E + 047.91E + 043.01E + 02Median5.66E + 033.03E + 022.51E + 041.99E + 044.52E + 043.00E + 02Mean5.60E + 033.03E + 022.63E + 042.22E + 044.48E + 043.00E + 02Std2.82E + 031.55E + 006.32E + 037.45E + 034.63E + 011.09E − 01P3.02E − 11(+)3.02E − 11(+)3.02E − 11(+)3.02E − 11(+)3.02E − 11(+)F4(X)Best4.01E + 024.08E + 024.00E + 024.09E + 024.75E + 024.00E + 02Worst6.17E + 027.30E + 026.61E + 025.39E + 026.86E + 025.40E + 02Median4.72E + 025.33E + 025.46E + 024.29E + 026.03E + 024.73E + 02Mean4.88E + 025.35E + 025.27E + 024.47E + 025.87E + 024.60E + 02Std6.85E + 016.81E + 017.76E + 013.46E + 014.63E + 013.38E + 01P2.52E − 01(=)3.16E − 05(+)1.77E − 03(+)3.15E − 02(−)9.92E − 11(+)F5(X)Best8.19E + 028.19E + 026.21E + 025.84E + 027.43E + 025.75E + 02Worst9.22E + 029.11E + 026.89E + 026.74E + 029.00E + 026.90E + 02Median8.77E + 028.64E + 026.55E + 026.36E + 027.94E + 026.34E + 02Mean8.69E + 028.66E + 026.54E + 026.34E + 027.97E + 026.35E + 02Std2.72E + 012.24E + 011.94E + 012.25E + 013.72E + 011.99E + 01P3.02E − 11(+)3.02E − 11(+)1.06E − 03(+)9.23E − 01(=)3.02E − 11(+)F6(X)Best6.38E + 026.33E + 026.00E + 026.00E + 026.43E + 026.00E + 02Worst6.65E + 026.63E + 026.00E + 026.00E + 026.67E + 026.00E + 02Median6.53E + 026.50E + 026.00E + 026.00E + 026.60E + 026.00E + 02Mean6.53E + 026.49E + 026.00E + 026.00E + 026.59E + 026.00E + 02Std7.26E + 009.15E + 002.81E − 029.62E − 031.36E + 022.70E − 02P3.02E − 11(+)3.02E − 11(+)3.03E − 02(+)2.39E − 04(−)3.02E − 11(+)F7(X)Best1.30E + 031.17E + 038.65E + 028.35E + 021.27E + 038.59E + 02Worst1.82E + 031.82E + 039.60E + 029.36E + 021.99E + 039.26E + 02Median1.75E + 031.56E + 039.14E + 029.02E + 021.70E + 038.95E + 02Mean1.68E + 031.52E + 039.16E + 028.98E + 021.67E + 038.96E + 02Std1.37E + 021.94E + 022.30E + 012.08E + 011.36E + 021.44E + 01P3.02E − 11(+)3.02E − 11(+)1.58E − 04(+)3.63E − 01(=)3.02E − 11(+)F8(X)Best1.10E + 031.08E + 038.83E + 028.79E + 021.03E + 039.20E + 02Worst1.25E + 031.26E + 039.76E + 029.65E + 021.20E + 031.00E + 03Median1.19E + 031.19E + 039.30E + 029.29E + 021.10E + 039.63E + 02Mean1.18E + 031.19E + 039.32E + 029.30E + 021.10E + 039.61E + 02Std4.05E + 014.04E + 011.80E + 012.23E + 013.66E + 011.79E + 01P3.02E − 11(+)3.02E − 11(+)4.11E − 07(−)1.61E − 06(−)3.02E − 11(+)F9(X)Best1.08E + 041.03E + 049.38E + 029.22E + 021.07E + 049.01E + 02Worst1.46E + 041.38E + 041.77E + 031.18E + 032.04E + 041.66E + 03Median1.31E + 041.30E + 041.12E + 031.01E + 031.52E + 041.06E + 03Mean1.29E + 041.27E + 041.16E + 031.03E + 031.54E + 041.10E + 03Std8.52E + 028.73E + 021.86E + 026.47E + 018.38E + 021.83E + 02P3.02E − 11(+)3.02E − 11(+)1.45E − 01(=)3.18E − 01(=)3.02E − 11(+)F10(X)Best6.33E + 036.32E + 035.62E + 034.96E + 036.23E + 034.67E + 03Worst9.53E + 031.00E + 047.60E + 036.57E + 039.50E + 036.86E + 03Median8.14E + 037.73E + 036.47E + 035.81E + 038.16E + 035.70E + 03Mean8.12E + 037.82E + 036.52E + 035.77E + 038.02E + 035.75E + 03Std6.74E + 028.10E + 024.72E + 024.02E + 028.38E + 026.04E + 02P1.07E − 09(+)3.08E − 08(+)5.46E − 06(+)2.57E − 07(+)3.35E − 08(+)F11(X)Best1.20E + 031.21E + 031.14E + 031.18E + 031.25E + 031.14E + 03Worst1.58E + 031.41E + 031.18E + 031.40E + 031.42E + 031.17E + 03Median1.36E + 031.29E + 031.16E + 031.29E + 031.33E + 031.15E + 03Mean1.37E + 031.30E + 031.16E + 031.30E + 031.34E + 031.15E + 03Std8.19E + 014.72E + 019.46E + 005.71E + 013.85E + 018.10E + 00P3.02E − 11(+)3.02E − 11(+)3.34E − 03(+)8.19E − 01(=)3.02E − 11(+)F12(X)Best4.63E + 051.22E + 051.00E + 101.00E + 101.04E + 071.68E + 05Worst3.71E + 063.83E + 061.00E + 101.00E + 105.74E + 072.25E + 06Median1.30E + 069.68E + 051.00E + 101.00E + 102.55E + 079.61E + 05Mean1.64E + 061.35E + 061.00E + 101.00E + 102.57E + 071.09E + 06Std9.69E + 059.69E + 050.00E + 000.00E + 001.06E + 055.84E + 05P4.68E − 02(+)4.64E − 01(=)1.21E − 12(+)1.21E − 12(+)3.02E − 11(+)F13(X)Best4.81E + 033.09E + 031.00E + 101.00E + 102.31E + 054.40E + 03Worst5.11E + 044.77E + 041.00E + 101.00E + 106.39E + 054.81E + 04Median1.90E + 041.15E + 041.00E + 101.00E + 104.16E + 051.03E + 04Mean2.35E + 041.66E + 041.00E + 101.00E + 104.02E + 051.55E + 04Std1.54E + 041.36E + 040.00E + 000.00E + 001.06E + 051.16E + 04P4.84E − 02(+)9.82E − 01(=)1.21E − 12(+)1.21E − 12(+)3.02E − 11(+)F14(X)Best2.89E + 034.47E + 031.64E + 031.50E + 032.95E + 041.46E + 03Worst2.11E + 051.68E + 051.93E + 031.59E + 034.22E + 051.55E + 03Median2.70E + 044.00E + 041.78E + 031.54E + 031.14E + 051.50E + 03Mean4.95E + 044.51E + 041.77E + 031.54E + 031.35E + 051.50E + 03Std4.91E + 044.08E + 046.03E + 011.73E + 018.34E + 042.07E + 01P3.02E − 11(+)3.02E − 11(+)3.02E − 11(+)4.69E − 08(+)3.02E − 11(+)F15(X)Best2.05E + 032.48E + 031.77E + 031.61E + 037.52E + 041.56E + 03Worst3.68E + 043.60E + 043.15E + 032.00E + 032.26E + 053.01E + 03Median1.48E + 041.89E + 041.92E + 031.68E + 031.48E + 051.69E + 03Mean1.65E + 041.66E + 041.99E + 031.72E + 031.50E + 051.77E + 03Std1.05E + 049.16E + 032.56E + 021.03E + 024.96E + 022.66E + 02P3.69E − 11(+)4.08E − 11(+)9.53E − 07(+)8.19E − 01(=)3.02E − 11(+)F16(X)Best2.94E + 032.87E + 032.08E + 032.14E + 033.04E + 032.30E + 03Worst4.63E + 034.17E + 033.21E + 033.35E + 034.71E + 033.18E + 03Median3.68E + 033.53E + 032.70E + 032.62E + 034.12E + 032.79E + 03Mean3.77E + 033.59E + 032.67E + 032.62E + 033.96E + 032.78E + 03Std4.72E + 023.67E + 022.93E + 023.02E + 024.96E + 022.24E + 02P1.78E − 10(+)2.37E − 10(+)1.91E − 01(=)1.56E − 02(−)5.49E − 11(+)F17(X)Best2.35E + 032.72E + 032.11E + 032.01E + 033.00E + 032.01E + 03Worst4.02E + 034.18E + 032.71E + 032.70E + 034.31E + 032.78E + 03Median3.42E + 033.43E + 032.47E + 032.31E + 033.57E + 032.43E + 03Mean3.37E + 033.39E + 032.43E + 032.32E + 033.56E + 032.40E + 03Std4.05E + 023.57E + 021.74E + 021.62E + 023.02E + 021.92E + 02P2.87E − 10(+)4.08E − 11(+)6.10E − 01(=)7.01E − 02(=)3.02E − 11(+)F18(X)Best9.41E + 047.26E + 042.51E + 046.30E + 043.20E + 054.45E + 04Worst9.83E + 054.50E + 053.71E + 052.02E + 052.59E + 062.64E + 05Median2.48E + 051.63E + 051.17E + 051.16E + 051.23E + 068.99E + 04Mean2.78E + 051.75E + 051.39E + 051.27E + 051.23E + 061.01E + 05Std1.61E + 058.15E + 048.07E + 043.92E + 041.18E + 064.43E + 04P8.89E − 10(+)1.75E − 05(+)3.92E − 02(+)3.85E − 03(+)3.02E − 11(+)F19(X)Best2.98E + 032.38E + 032.06E + 031.96E + 031.03E + 051.93E + 03Worst4.46E + 044.43E + 042.73E + 032.03E + 033.66E + 062.00E + 03Median2.05E + 041.69E + 042.29E + 031.99E + 031.39E + 061.95E + 03Mean2.28E + 042.13E + 042.32E + 031.99E + 031.61E + 061.95E + 03Std1.63E + 041.32E + 041.37E + 021.57E + 011.18E + 061.60E + 01P3.02E − 11(+)3.02E − 11(+)3.02E − 11(+)3.20E − 09(+)3.02E − 11(+)F20(X)Best2.72E + 032.61E + 032.25E + 032.30E + 032.50E + 032.15E + 03Worst3.87E + 033.80E + 032.84E + 032.86E + 033.82E + 032.72E + 03Median3.23E + 033.19E + 032.62E + 032.56E + 033.20E + 032.44E + 03Mean3.28E + 033.20E + 032.60E + 032.56E + 033.21E + 032.46E + 03Std3.19E + 023.65E + 021.38E + 021.39E + 023.14E + 021.50E + 02P3.34E − 11(+)1.33E − 10(+)6.20E − 04(+)9.07E − 03(+)1.21E − 10(+)F21(X)Best2.50E + 032.55E + 032.41E + 032.40E + 032.44E + 032.41E + 03Worst2.85E + 032.86E + 032.50E + 032.47E + 032.78E + 032.46E + 03Median2.68E + 032.68E + 032.47E + 032.43E + 032.63E + 032.43E + 03Mean2.69E + 032.68E + 032.46E + 032.43E + 032.61E + 032.43E + 03Std9.83E + 017.97E + 012.11E + 011.87E + 012.24E + 031.44E + 01P3.02E − 11(+)3.02E − 11(+)1.47E − 07(+)8.30E − 01(=)6.07E − 11(+)F22(X)Best8.06E + 038.10E + 032.30E + 032.30E + 032.32E + 032.30E + 03Worst1.21E + 041.11E + 048.54E + 038.35E + 031.20E + 049.50E + 03Median9.61E + 039.92E + 037.47E + 037.55E + 031.03E + 048.38E + 03Mean9.79E + 039.66E + 036.95E + 036.90E + 039.82E + 037.88E + 03Std1.08E + 038.33E + 021.65E + 031.91E + 032.24E + 031.60E + 03P3.96E − 08(+)1.10E − 08(+)2.28E − 05(−)4.08E − 05(−)3.96E − 08(+)F23(X)Best3.02E + 033.09E + 032.82E + 032.73E + 033.06E + 032.74E + 03Worst3.48E + 033.44E + 032.94E + 032.91E + 033.59E + 032.94E + 03Median3.18E + 033.27E + 032.87E + 032.87E + 033.31E + 032.89E + 03Mean3.22E + 033.26E + 032.87E + 032.87E + 033.31E + 032.89E + 03Std1.18E + 027.68E + 012.76E + 013.47E + 011.28E + 023.69E + 01P3.02E − 11(+)3.02E − 11(+)2.16E − 03(−)2.38E − 03(−)3.02E − 11(+)F24(X)Best3.22E + 033.17E + 032.99E + 033.00E + 033.32E + 033.00E + 03Worst3.71E + 033.58E + 033.15E + 033.14E + 033.78E + 033.14E + 03Median3.36E + 033.40E + 033.07E + 033.06E + 033.54E + 033.05E + 03Mean3.38E + 033.39E + 033.08E + 033.06E + 033.53E + 033.05E + 03Std1.19E + 029.85E + 013.43E + 013.68E + 013.30E + 013.59E + 01P3.02E − 11(+)3.02E − 11(+)5.57E − 03(+)5.30E − 01(=)3.02E − 11(+)F25(X)Best2.96E + 032.98E + 032.96E + 032.96E + 033.01E + 032.96E + 03Worst3.11E + 033.12E + 033.08E + 033.06E + 033.14E + 033.03E + 03Median3.07E + 033.08E + 033.03E + 032.98E + 033.12E + 033.02E + 03Mean3.05E + 033.07E + 033.03E + 032.99E + 033.11E + 033.00E + 03Std3.83E + 012.94E + 013.74E + 012.99E + 013.30E + 012.53E + 01P7.60E − 07(+)2.87E − 10(+)1.32E − 04(+)8.19E − 01(=)1.29E − 09(+)F26(X)Best2.90E + 032.90E + 032.90E + 032.90E + 031.03E + 042.90E + 03Worst1.13E + 041.13E + 045.58E + 035.52E + 031.40E + 045.80E + 03Median2.90E + 036.53E + 035.13E + 034.87E + 031.19E + 042.90E + 03Mean5.81E + 036.49E + 035.02E + 034.18E + 031.19E + 043.95E + 03Std3.69E + 033.61E + 036.09E + 021.15E + 039.27E + 021.24E + 03P1.86E − 01(=)8.07E − 01(=)2.61E − 02(+)2.12E − 01(=)3.02E − 11(+)F27(X)Best3.35E + 033.43E + 033.24E + 033.20E + 033.80E + 033.17E + 03Worst4.07E + 033.84E + 033.38E + 033.34E + 035.08E + 033.33E + 03Median3.57E + 033.57E + 033.30E + 033.27E + 034.44E + 033.26E + 03Mean3.57E + 033.62E + 033.31E + 033.26E + 034.47E + 033.26E + 03Std1.45E + 021.16E + 024.11E + 013.49E + 014.30E + 013.81E + 01P3.02E − 11(+)3.02E − 11(+)3.18E − 04(+)8.88E − 01(=)3.02E − 11(+)F28(X)Best3.26E + 033.26E + 033.26E + 033.26E + 033.29E + 033.26E + 03Worst3.32E + 033.43E + 033.31E + 033.30E + 033.51E + 033.31E + 03Median3.30E + 033.31E + 033.26E + 033.26E + 033.37E + 033.26E + 03Mean3.30E + 033.31E + 033.27E + 033.26E + 033.37E + 033.26E + 03Std1.69E + 013.82E + 011.89E + 018.18E + 004.30E + 011.49E + 01P1.73E − 06(+)8.35E − 08(+)3.18E − 03(+)9.06E − 08(−)7.39E − 11(+)F29(X)Best4.07E + 033.90E + 033.35E + 033.36E + 034.99E + 033.34E + 03Worst5.69E + 035.59E + 034.01E + 033.93E + 036.57E + 033.99E + 03Median4.75E + 034.75E + 033.77E + 033.68E + 035.78E + 033.70E + 03Mean4.84E + 034.80E + 033.74E + 033.65E + 035.80E + 033.69E + 03Std3.75E + 024.58E + 021.60E + 021.66E + 024.30E + 021.50E + 02P3.02E − 11(+)3.69E − 11(+)1.76E − 01(=)3.79E − 01(=)3.02E − 11(+)F30(X)Best6.92E + 056.25E + 056.18E + 056.05E + 052.64E + 075.88E + 05Worst2.24E + 062.30E + 067.72E + 058.91E + 057.04E + 077.79E + 05Median1.27E + 061.11E + 066.94E + 056.32E + 053.43E + 076.13E + 05Mean1.31E + 061.17E + 066.92E + 056.44E + 053.67E + 076.31E + 05Std4.24E + 053.82E + 054.34E + 045.26E + 044.30E + 015.23E + 04P5.49E − 11(+)1.61E − 10(+)5.46E − 06(+)2.42E − 02(+)3.02E − 11(+)+/ = /−26/3/025/4/022/4/310/12/729/0/0From Tables6 and 7, it is apparent that LSSA has a better optimization effect in both 30 and 50 dimensions, and each function is close to the theoretical optimal value, but the effect on the F4 function is poor. Although MSSCS and CSsin have better optimization effects, they show the very poor effects on F1, F3, and F12-13 in 50 dimensions. It can be seen that these two algorithms have limitations in this kind of problem. Other algorithms perform poorly and rarely approach the theoretical optimal value. From the statistical test, the LSSA algorithm is significantly different from other algorithms, showing better advantages, and some functions are similar to MSSCS and CSsin. Generally speaking, the LSSA algorithm has high universality and is more suitable for some complex optimization problems than other algorithms.


## 6. Robot Path Planning

This paper takes the classic robot path planning case to explore it. In path planning, each sparrow is a feasible path. Suppose that there aren feasible paths, and dimension D is determined by the number of lines from the starting point to the target point. The grid method is used for environment modeling, and the grid method is to use 1 × 1. According to the grid value, the obstacles in the equivalent position are calculated. Grid number 0 is defined as the feasible area, and 1 is the obstacle area. Then, the robot can plan the path on the grid assigned to 0, and dimension D is the column number of the grid map. The cost function of the path length of the ith sparrow is shown in the following equation:(15)fx=∑j=1D−1xj+1+xj2+yj+1−yj2.In equation (12), j is the jth dimension of a sparrow.In order to better verify the practicability of the improved algorithm, LSSA is applied to robot path planning and SSA is used for comparative experiments. The number of populations is 50, and the number of iterations is 20. Other environmental parameters are consistent with the above CEC 2017 test. Each algorithm works in a 15 × 15 model, and the optimal route is shown in Figure7. In order to eliminate the chance, each algorithm is tested 10 times, and the optimal route, average route, and worst route of each algorithm are counted. Three indicators are used to measure the stability and feasibility of each algorithm in this experiment. The optimization statistics of each algorithm are shown in Table 8.Figure 7
Minimum path planning. (a) LSSA. (b) SSA.
(a)(b)Table 8
Statistics table of the optimization route by the algorithm.
Map sizePerformance indexLSSASSA15 ∗ 15Shortest19.799025.4558Average21.684632.9983Worst25.455839.5980It can be seen from Table8 and Figure 7 that the minimum cost of LSSA planning is 19.7990, while the minimum cost of SSA is 25.4558. It can be seen that the route planning ability of LSSA is strong, and through the average value and the worst value, it can be seen that the route planned by LSSA has good stability. Therefore, LSSA has a good effect on robot path planning and can plan a more stable and safe route.


## 7. Conclusions

A learning sparrow search algorithm is proposed in this paper, overcoming the shortcomings of the SSA. The lens reverse learning and random reverse learning are introduced in the discoverer’s position and the worst position, respectively, which make the discoverer’s search method more flexible. Then, the improved sine-cosine guidance makes the follower search more detailed. Finally, the local search based on the difference is used to update the optimal solution, which improves the quality of each solution.Through 12 standard test functions, LSSA is proved to be better than SSA, BSO, CSSA, ISSA, GWO, and PSO. At the same time, in order to avoid LSSA only depending on the zero point, this paper compares LSSA with MSSCS, CSsin, and FA-CL which have been verified by CEC function in recent years. The results show that the LSSA algorithm has good universality, while other algorithms have limitations in some functions. Finally, the practicability of LSSA is verified by robot path planning. The LSSA test effect is satisfying, but there are some shortcomings; for instance, during the function optimization process, the time consumption is large and cannot show the best effect on some functions of CEC 2017, showing an unstable effect. Of course, the increase of time is inevitable because we add workload. In the future, we need to do three aspects of work, the first is how to balance the time and optimization ability of the algorithm, the second is how to improve the stability of the algorithm on the basis of the previous, and the third is how to get a better application in practical complex engineering. On the contrary, we will also try to analyze and optimize in MBO, SMA, MSA, HGS, and HHO and better apply to practical problems.



---

*Source: 3946958-2021-08-09.xml*