An Improved Chaos Sparrow Search Optimization Algorithm Using Adaptive Weight Modification and Hybrid Strategies

Sparrow Search Algorithm (SSA) is a kind of novel swarm intelligence algorithm, which has been applied in-to various domains because of its unique characteristics, such as strong global search capability, few adjustable parameters, and a clear structure. However, the SSA still has some inherent weaknesses that hinder its further development, such as poor population diversity, weak local searchability, and falling into local optima easily. This manuscript proposes an improved chaos sparrow search optimization algorithm (ICSSOA) to overcome the mentioned shortcomings of the standard SSA. Firstly, the Cubic chaos mapping is introduced to increase the population diversity in the initialization stage. Then, an adaptive weight is employed to automatically adjust the search step for balancing the global search performance and the local search capability in different phases. Finally, a hybrid strategy of Levy flight and reverse learning is presented to perturb the position of individuals in the population according to the random strategy, and a greedy strategy is utilized to select individuals with higher fitness values to decrease the possibility of falling into the local optimum. The experiments are divided into two modules. The former investigates the performance of the proposed approach through 20 benchmark functions optimization using the ICSSOA, standard SSA, and other four SSA variants. In the latter experiment, the selected 20 functions are also optimized by the ICSSOA and other classic swarm intelligence algorithms, namely ACO, PSO, GWO, and WOA. Experimental results and corresponding statistical analysis revealed that only one function optimization test using the ICSSOA was slightly lower than the CSSOA and the WOA among the 20-function optimization. In most cases, the values for both accuracy and convergence speed are higher than other algorithms. The results also indicate that the ICSSOA has an outstanding ability to jump out of the local optimum.

(1) The convergence speed is still relatively slow. 89 (2) They do not consider how to balance the exploration 90 capability in the early iterations and the exploitation capabil-91 ity in the late iterations.

92
(3) They only consider how to reduce the risk of avoiding 93 falling into a local optimum but do not propose a feasible 94 solution to how the algorithm can escape from the local 95 optimum after falling into a local optimum. 96 Based on the above findings, an improved chaos sparrow 97 search optimization algorithm (ICSSOA) is presented to bal-98 ance the exploration capability in the early iterations and 99 the exploitation capability in the late iterations. The main 100 improvements of the ICSSOA algorithm could be separated 101 into the following points: 102 Firstly, the initial sparrow population is enriched with 103 diversity by using the Cubic function for chaos initialization 104 during population initialization. 105 Secondly, the introduction of adaptive weights balances the 106 searchability in the early stage and the development ability in 107 the later stage.  [32]). In short, a systematical analysis of the 126 ten algorithms is carried out by testing 11 unimodal and 127 9 multimodal test functions, thus verifying the superiority 128 of ICSSOA in terms of merit-seeking capability, solution 129 accuracy and convergence speed. 130 The rest sections of this paper are organized as follows. 131 Section two recalls the related notions. Section three dis-132 cusses the proposed ICSSOA in detail. Section four reveals 133 the performance of the proposed algorithm throughout func-134 tion optimization tasks and corresponding statistical analysis. 135 Section five concludes the entire paper. 137 The SSA refers to the process of predation and anti-predation 138 behavior of sparrows for location updates, based on the fol-139 lowing principles.

140
The sparrows in the population are divided into two 141 categories, producers and followers. The two identities of 142 the sparrow can be interchanged, and each sparrow has a 143 danger awareness mechanism. To be specific, each sparrow 144 is aware of approaching danger or natural enemies and will 145 immediately engage in anti-predatory behavior to ensure its The standard SSA formula associated with part A is referred 154 according to the reference [5]. 155 Assuming N sparrows in D-dimensional space, the popu-156 lation matrix is shown in Eq. (1).
158 where x i,D represents the position of the i th sparrow in dimen-159 sion D.

160
Producers are typically 10% to 20% of the population size 161 and the location is updated using the Eq. (2).
where, t represents the current number of iterations. natural predators and is in a relatively safe location and the 172 producers enters a wide-area search mode. Otherwise, R 2 ≥ 173 ST means that the producer is aware of the presence of a 174 natural predator, then the producer should go to another area 175 to forage.

176
The follower position is updated due to the Eq. (3).
where, x t worst represents the current position of the least 179 adapted sparrow. x p represents the position of the sparrow 180 with the best current producer adaptation. A represents a 181 matrix of 1 × d, and each element of the matrix is assigned 182 a random value of 1 or -1. A + = A T AA T −1 . Moreover, 183 i > n 2 means that the i th sparrow with the worse adaptation is 184 likely to be hungry and so needs to travel to another location 185 to forage.

187
Some sparrows perceive the threat of predators when foraging 188 and will abandon their current position and fly to another 189 position. Sparrows that perceive danger generally make up 190 10%-20% of the population. The position of the sparrows that 191 perceive danger is updated as shown in Eq. (4). When f i > f g , indicating that the individual sparrow is at  Step 2:Sort the sparrow population for fitness values to 213 find the best individual and the current worst individual.

218
Step 5: Some sparrows are randomly selected to perceive The Chaos is a nonlinear phenomenon that exists in nature 245 and has been applied to optimize algorithms. It enriches the 246 diversity of populations and facilitates the algorithm to jump 247 out of the local optimum because of its stochastic and ergodic 248 nature. Cubic mapping is a typical chaotic mapping, and its 249 standard form is shown in the Eq. (5) [33].
where b and c are chaotic impact factors.

252
When c ∈ (2.3, 3), the sequence generated by Cubic map-253 ping is the chaos sequence. Feng et al. analyzed the maximum 254 Lyapunov exponent for 16 common chaotic mappings such as 255 Cubic mapping and corrected the Cubic mapping expression 256 [34]. The experimental results demonstrated that the chaos 257 of Cubic mapping is similar to that of worm mouth mapping 258 and tent mapping, and it is better than the one-dimensional 259 mappings such as Sine mapping and Circle mapping. The 260 ICSSOA uses the corrected Cubic mapping initialized pop-261 ulation specific expression as shown in Eq. (6) [35].

265
The producer performs global exploration as drastically as 266 possible in the early iterations to quickly find the global opti-267 mal solution, so a larger inertia weight is needed in the early 268 iterations to lengthen the global search range of the discov-269 erer. At the same time, a smaller inertia weight is needed in 270 the late iterations to improve the local exploitation capability 271 of the discoverer for accelerating the convergence speed and 272 avoiding falling into the local optimal solution. Therefore, 273 fusing adaptive weights proposes a new improvement to the 274 producer position update Eq. (2), and the producer position 275 improvement equation is shown in the Eq. (7).
where, ω 0 is the given positive real number. t is the current 280 number of iterations. t 0 is the given number of iterations.

281
In the sparrow search process, the producer improves its 282 global search range with a larger step size in the early iteration 283 and improves its local exploitation capability with a progres-284 sively smaller step size in the late iteration. formula based on Levy flight is shown in Eq. (9) [37].
where, γ is the step control parameter. Levy (λ) is a random 297 path search and satisfies Eq. (10). 298 The generation step is shown in Eq. (11).
where, µ and v are a random number that follows a normal calculation formula of parameter δ µ is shown in Eq. (12).
where, β usually takes the value of the constant 1.5.

306
Reverse learning is a method to find the corresponding .
where, x best (t) represents the optimal inverse solution of

331
The dynamic selection strategy approach is as follows.
where, x newi (t + 1) represents the new sparrow generated by 342 the hybrid strategy. f (x) represents the current adaptation 343 value of the sparrow. The proposed ICSSOA algorithm based on the above three 346 improvement ideas consists of the following eight steps.

347
Step 1: Initialize the sparrow population according to 348 the Eq. (6). Set each parameter such as objective function, 349 population number N, set problem dimension D, maximum 350 number of iterations, percentage of discoverer sparrows, and 351 percentage of warning sparrows.

352
Step 2: Sort the sparrow population for fitness values 353 to find the current best individual and the current worst 354 individual.

355
Step 3:Discoverer position update. The adaptive inertia 356 weight factor is obtained using the Eq. (8), and then the 357 producer location is updated by the Eq. (7).

358
Step 4: Follower location update. The follower position is 359 updated by the Eq. (3).

360
Step 5: Alert sparrow position update. A number of spar-361 rows are randomly selected and the warning sparrow position 362 is updated by Eq. (4).

363
Step 6: Dynamic strategy selection. The sparrow position 364 is updated according to the random probability selection 365 strategy. When rand ∈ (0, 0.5), the Levy flight strategy 366 is selected, the step size is obtained by the Eq. (11) and 367 Eq. (12), and then each sparrow position is updated using the 368 Eq. (9). Otherwise, the reverse learning strategy is selected, 369 the information exchange parameters are obtained by the 370 Eq. (14), and then each sparrow position is updated using the 371 Eq. (13).

372
Step 7:Then positions before and after the update are com-373 pared using the greedy rule and the fitness value is calculated. 374 The sparrow position with the better fitness value is retained. 375 Step 8:Termination condition. The termination condition 376 is determined by determining whether the current number of 377 iterations reaches the maximum number of iterations, and 378 the optimal solution is output if the maximum number of 379 iterations is reached. Otherwise, move to step 2 and add one 380 to the current number of iterations.

381
From the above steps, the algorithm flow chart of the 382 ICSSOA is shown in Figure 1.

384
In SSA, the time magnitudes for population initialization and 385 parameter setting are n and C. 386 In the producer location update phase, the top 20% of spar-387 rows need to be selected as producers for location update by 388 VOLUME 10, 2022 is n × log n 2 ×k + n × k. 415 The Levy flight step in the hybrid strategy calculates the 416 time magnitude as a constant 1, then the time magnitude of 417 Levy flight applied to each sparrow in the population is n × k. 418 The time magnitude for determining whether an individual is 419 out of bounds for judgment is n × k. The time magnitude 420 of reverse learning to solve the reverse solution based on the 421 current solution is 1. The time magnitude of reverse learning 422 applied to each sparrow in the population is n × k. The time 423 magnitude for determining whether an individual is out of 424 bounds for judgment is n × k. 425 The time complexity of ICSSOA is

430
The experiments were conducted using a computer running in 431 an environment such as ADM Ryzen 7 5800H @ 3.20GHz, 432 16G, Windows 10 operating system, and the implementation 433 of the functional code using the programming language MAT-434 LABR2021b. The twenty benchmark functions used in use 435 (F1-F11 for unimodal functions and F12-F20 for multimodal 436 functions) are shown in Table 2. The unimodal function has 437 only one local minima in the bounded interval, while the mul-438 timodal function has multiple local minima in the bounded 439 interval. The unimodal function tests whether the algorithm 440 can find the function's minimum value quickly, while the 441 multimodal function considers whether the algorithm has 442 good enough performance to jump out of the local optimum. 443                     Table 5, and the bolded font shows the optimal values in the 487 algorithms.        the ICSSOA also shows better convergence accuracy than 504 other algorithms, but in the high dimension, the ICSSOA's 505 advantage is not obvious. The performance of ICSSOA is 506 slightly lower than that of CSSOA in the F13. In the F14-F20 507 function test, the convergence accuracy of ICSSOA is better 508 than that of the other five algorithms. The ICSSOA has a 509 VOLUME 10, 2022   strong adaptive capability in optimizing single-peak func-510 tions or multi-peak functions and can use hybrid strategies 511 to make the algorithm jump out of the current local optimal 512 solution's dilemma to obtain higher convergence accuracy.

513
The cross-sectional experiments are compared using four 514 different SI algorithms for 20 test functions, which are 515 run 30 times under the same test environment, respec-516 tively, and the specific results are analyzed and obtained in 517 in terms of convergence accuracy and convergence speed and 520 can find the optimal solution. In the F5-F6, all algorithms fall 521 into the local optimum at the early stage, but the ICSSOA can 522 get rid of the local optimum dilemma by the hybrid policy 523 perturbation, and the convergence accuracy of the solution 524 is more than 15 orders of magnitude higher than the other 525 four algorithms. In the 70-dimensional test of the F13, the 526 convergence accuracy of the ICSSOA algorithm is slightly 527 lower than that of the WOA algorithm. In the F14-F20, the 528 convergence accuracy of ICSSOA is much higher than the 529 other four algorithms in all cases. The ICSSOA is much better 530 than the other four algorithms in terms of convergence speed 531 and accuracy and shows excellent performance in 30, 50, and 532 70 dimensions.

533
The function convergence diagram shows that ICSSOA 534 can perform a wide range of exploration and increase the 535  Table 6.

559
From the data analysis in Table 6, the performance of  local optimum, and ICSSOA significantly improves the opti-575 mization performance based on the following three points. 576 First, Cubic chaotic mapping is used in the population initial-577 ization phase to enrich the population diversity and reduce 578 the risk of the algorithm falling into the local optimum. 579 Secondly, an adaptive inertia weighting strategy is used in 580 the discoverer location update stage to expand the global 581 search step in the first stage and shorten the local exploitation 582 step in the second stage to balance the global search and 583 local exploitation capabilities. Finally, after the population 584 location update, a Levy flight and reverse learning hybrid 585 strategy are used to perturb the population through a stochas-586 tic strategy. A greedy strategy is used to select individuals 587 with higher fitness to improve the ability of the algorithm to 588 escape from the local optimum. The experimental results and 589 related statistical analysis show that the ICSSOA algorithm 590 has significant advantages over the other five SSA algorithms 591 and four different SI optimization algorithms in terms of 592 optimal seeking ability, solution accuracy, and convergence 593 speed. In the future, we will try to apply ICSSOA to industrial 594 problems to improve the versatility and applicability of this 595 algorithm.