Research Article  Open Access
An Improved Squirrel Search Algorithm for Optimization
Abstract
Squirrel search algorithm (SSA) is a new biologicalinspired optimization algorithm, which has been proved to be more effective for solving unimodal, multimodal, and multidimensional optimization problems. However, similar to other swarm intelligencebased algorithms, SSA also has its own disadvantages. In order to get better global convergence ability, an improved version of SSA called ISSA is proposed in this paper. Firstly, an adaptive strategy of predator presence probability is proposed to balance the exploration and exploitation capabilities of the algorithm. Secondly, a normal cloud model is introduced to describe the randomness and fuzziness of the foraging behavior of flying squirrels. Thirdly, a selection strategy between successive positions is incorporated to preserve the best position of flying squirrel individuals. Finally, in order to enhance the local search ability of the algorithm, a dimensional search enhancement strategy is utilized. 32 benchmark functions including unimodal, multimodal, and CEC 2014 functions are used to test the global search ability of the proposed ISSA. Experimental test results indicate that ISSA provides competitive performance compared with the basic SSA and other four wellknown stateoftheart optimization algorithms.
1. Introduction
Optimization is the process of determining decision variables of a function in a way that the function is in its maximal or minimal value. Many reallife engineering problems belong to optimization problems [1–3] in which decision variables are determined in a way that the systems operate in their best optimal point. Usually, these problems are discontinuous, nondifferentiable, multimodal, and nonconevx, and thus the classical gradientbased deterministic algorithms [4–6] are not applicable.
To overcome the drawbacks of the classical algorithms, a considerable number of stochastic optimization algorithms known as metaheuristic algorithms [7–9] have been developed in recent decades. These algorithms are mainly inspired by biological behaviors or physical phenomena and can be roughly classified into three categories: evolutionary algorithms, swarm intelligence, and physicalbased algorithms. The evolutionary algorithms simulate the evolution of the nature such as reproduction, mutation, recombination, and selection, in which a population tries to survive based on the evaluation of fitness value in a given environment. Genetic algorithm (GA) [10] and evolution strategy (ES) [11] are the most popular evolutionary algorithms. Swarm intelligence algorithms are the second category, which are based on movement of a swarm of creatures and imitate the interaction of swarm and their environment in order to enhance their knowledge of a goal (e.g., food source). The most wellknown swarm intelligence algorithms are particle swarm optimization (PSO) [12], artificial bee colony (ABC) [13] algorithm, ant colony optimization (ACO) [14], and grey wolf optimization algorithm (GWO) [15], to name a few. The physicalbased algorithms are inspired by the basic physical laws in universe such as gravitational force, electromagnetic force, and inertia force. Several representatives of this category are simulated annealing (SA) [16], bigbang bigcrunch (BBBC) [17], and gravitational search algorithm (GSA) algorithm [18]. Some of the recent natureinspired algorithms are lightning attachment procedure optimization (LAPO) [19], spotted hyena optimizer (SHO) [20], weighted superposition attraction (WSA) [21], and many more [22, 23].
Unfortunately, most of the abovementioned basic metaheuristic algorithms fail to balance exploration and exploitation, thereby yielding unsatisfactory performance for reallife complicated optimization problems. Exploration stands for global search ability and ensures the algorithm to reach all over the search space and then to find promising regions, whereas exploitation represents local search ability and ensures the searching of optimum within the identified promising regions. Emphasizing the exploration capability only results in a waste of computational resources on searching all over the interior regions of search space and thus reduces the convergence rate; emphasizing the exploitation capability only, by contrast, causes loss of population diversity early and thus probably leads to premature convergence or to be stuck in local optimal. This fact motivates the introduction of various strategies for improving the convergence rate and precision of the basic metaheuristic algorithms. As an illustration, premature convergence of PSO was prevented in CLPSO by proposing a comprehensive learning strategy to maintain the population diversity [24]; a social learning component called fitnessdistanceratio was employed to enhance local search capability of PSO [25]; a selforganizing hierarchical PSO with timevarying acceleration coefficients (HPSOTVAC) was introduced to efficiently control the local search and convergence to the global optimal solution [26]; a distancebased locally informed PSO (LIPS) enabled the algorithm to quickly converge to global optimal solution with high accuracy [27]. Likewise, many modified versions have been proposed to enhance the global search ability of the basic ABC: an improvedglobalbestguide term with a nonlinear adjusting factor was employed to balance the exploration and exploitation [28]; a multiobjective covariance guided artificial bee colony algorithm (MCABC) was proposed to obtain higher precision with quick convergence speed when solving portfolio problems [29]; the slow convergence and unsatisfactory solution accuracy were improved in the variant IABC [30]. As for fruit fly optimization algorithm (FOA) [31], an escape parameter was introduced in MFOA to escape from the local solution [32]; and modified versions for balancing between exploration and exploitation abilities include, for example, IFOA [33], MSFOA [34], IFFO [35], and CMFOA [36].
Squirrel search algorithm (SSA), proposed by Mohit et al. in 2018, is a new and powerful global optimization algorithm inspired by the natural dynamic foraging behavior of flying squirrels [37]. In comparison with other swarm intelligence optimization algorithms, SSA has the advantages of better and efficient search space exploration because a seasonal monitoring condition is incorporated. Moreover, three types of trees (normal tree, oak tree, and hickory tree) are available in the forest region, preserving the population diversity and thus enhancing the exploration of the algorithm. Test results of 33 benchmark functions and a realtime controller design problem confirm the superiority of SSA in comparison with other wellknown algorithms such as GA [10], PSO [25], BA (bat algorithm) [38], and FF (firefly algorithm) [39].
However, SSA still suffers from premature convergence and easily gets trapped in a local optimal solution, especially when solving highly complex problems. The convergence rate of SSA, like other swarm intelligence algorithms, depends on the balance between exploration and exploitation capabilities. In other words, an excellent performance in dealing with optimization problems requires finetuning of the exploration and exploitation problem. According to “no free lunch” (NFL) theorem [40], no single optimization algorithm is able to achieve the best performance for all problems, and SSA is not an exception. Therefore, there still exists room for improving the accuracy and convergence rates of SSA.
Based on the discussion above, this study proposes an improved variant of SSA (ISSA) which employs four strategies to enhance the global search ability of SSA. In brief, the main contributions of this research can be summarized as follows:
(i) An adaptive strategy of predator presence probability is proposed, which dynamically adjusts with the iteration process. This strategy discourages premature convergence and improves the intensive search ability of the algorithm, especially at the latter stages of search. In this way, a balance between the exploration and exploitation capabilities can be properly managed.
(ii) The proposed ISSA employs a normal cloud generator [41] to generate new locations for flying squirrels during the course of gliding, which improves the exploration capability of SSA. This is motivated by the fact that the gliding behaviors of flying squirrels have characteristics of randomness and fuzziness, which can be simultaneously described by the normal cloud model [42].
(iii) A selection strategy between successive positions is proposed to maintain the best position of a flying squirrel individual throughout the optimization process, which enhances the exploitation ability of the algorithm.
(iv) A dimensional search enhancement strategy is originally put forward and results in a better quality of the best solution in each iteration, thereby strengthening the local search ability of the algorithm.
The general properties of ISSA are evaluated against 32 benchmark function including unimodal, multimodal, and CEC 2014 functions [43]. Meanwhile, its performance is compared with the basic SSA and other four wellknown stateoftheart optimization algorithms.
The rest of this paper is organized as follows: Section 2 briefly recapitulates the basic SSA. Next, the proposed ISSA is presented in detail in Section 3. Experimental comparisons are illustrated in Section 4. Finally, Section 5 gives the concluding remarks.
2. The Basic Squirrel Search Optimization Algorithm
SSA mimics the dynamic foraging behavior of southern flying squirrels via gliding, an effective mechanism used by small mammals for travelling long distance, in deciduous forest of Europe and Asia [37]. During warm weather, the squirrels change their locations by gliding from one tree to another in the forest and explore for food resources. They can easily find acorn nuts for meeting daily energy needs. After that, they begin searching hickory nuts (the optimal food source) that are stored for winter. During cold weather, they become less active and maintain their energy requirements with the storage of hickory nuts. When the weather gets warm, flying squirrels become active again. The abovementioned process is repeated and continues throughout the life space of the squirrels, which serves as a foundation of the SSA. According to the food foraging strategy of flying squirrels, the optimization SSA can be modeled by the following phases mathematically.
2.1. Initialize the Algorithm Parameters
The main parameters of the SSA are the maximum number of iteration , the population size , the number of decision variables n, the predator presence probability , the scaling factor , the gliding constant , and the upper and lower bounds for decision variable and . These parameters are set in the beginning of the SSA procedure.
2.2. Initialize Flying Squirrels’ Locations and Their Sorting
The flying squirrels’ locations are randomly initialized in the search apace as follows:where is a uniformly distributed random number in the range .
The fitness value of an individual flying squirrel’s location is calculated by substituting the value of decision variables into a fitness function:Then the quality of food sources defined by the fitness value of the flying squirrels’ locations is sorted in an ascending order:After sorting the food sources of each flying squirrel’s location, three types of trees are categorized: hickory tree (hickory nuts food source), oak tree (acorn nuts food source), and normal tree. The location of the best food source (i.e., minimal fitness value) is regarded as the hickory nut tree (), the locations of the following three food sources are supposed to be the acorn nuts trees (), and the rest are considered as normal trees ():
2.3. Generate New Locations through Gliding
Three scenarios may appear after the dynamic gliding process of flying squirrels.
Scenario 1. Flying squirrels on acorn nut trees tend to move towards hickory nut tree. The new locations can be generated as follows:where is random gliding distance, is a function which returns a value from the uniform distribution on the interval , and is a gliding constant.
Scenario 2. Some squirrels which are on normal trees may move towards acorn nut tree to fulfill their daily energy needs. The new locations can be generated as follows:where is a function which returns a value from the uniform distribution on the interval .
Scenario 3. Some flying squirrels on normal trees may move towards hickory nut tree if they have already fulfilled their daily energy requirements. In this scenario, the new location of squirrels can be generated as follows:where is a function which returns a value from the uniform distribution on the interval .
In all scenarios, gliding distance is considered to be in the interval between 9 and 20 m [37]. However, this value is quite large and may introduce large perturbations in (7)(9) and hence may cause unsatisfactory performance of the algorithm. In order to achieve acceptable performance of the algorithm, a scaling factor () is introduced as a divisor of and its value is chosen to be 18 [37].
2.4. Check Seasonal Monitoring Condition
The foraging behavior of flying squirrels is significantly affected by season variations [43]. Therefore, a seasonal monitoring condition is introduced in the algorithm to prevent the algorithm from being trapped in local optimal solutions.
A seasonal constant and its minimum value are calculated firstly: Then the seasonal monitoring condition is checked. Under the condition of , the winter is over, and the flying squirrels which lose their abilities to explore the forest will randomly relocate their searching positions for food source again:where distribution is a powerful mathematical tool to enhance the global exploration capability of most optimization algorithms [44]:where and are two functions which return a value from the uniform distribution on the interval , is a constant ( = 1.5 in this paper), and is calculated as follows:where .
2.5. Stopping Criterion
The algorithm terminates if the maximum number of iterations is satisfied. Otherwise, the behaviors of generating new locations and checking seasonal monitoring condition are repeated.
2.6. Procedure of the Basic SSA
The pseudocode of SSA is provided in Algorithm 1.
Set , , n, , , , and  
Randomly initialize the flying squirrels locations  
Calculate fitness value  
while  
Generate new locations  
for t = 1: n1 (n1 = total number of squirrels on acorn trees)  
if  
else  
end  
end  
for t =1: n2 (n2 = total number of squirrels on normal trees moving towards acorn trees)  
if  
else  
end  
end  
for t = 1: n3 (n3 = total number of squirrels on normal trees moving towards hickory trees)  
if  
else  
end  
end  
if  
end  
Calculate fitness value of new locations  
end 
3. The Improved Squirrel Search Optimization Algorithm
This section presents an improved squirrel search optimization algorithm by introducing four strategies to enhance the searching capability of the algorithm. In the following, the four strategies will be presented in detail.
3.1. An Adaptive Strategy of Predator Presence Probability
When flying squirrels generate new locations, their natural behaviors are affected by the presence of predators and this character is controlled by predator presence probability . In the early search stage, flying squirrels’ population is often far away from the food source and its distribution range is large; thus it faces a great threat from predators. With the evolution going on, flying squirrels’ locations are close to the food source (an optimal solution). In this case, the distribution range of flying squirrels’ population is increasingly smaller and less threats from predators are expected. Thus, to enhance the exploitation capacity of the SSA, an adaptive , which dynamically varies as a function of iteration number, is adopted as follows:where and are the maximum and minimum predator presence probability, respectively.
3.2. Flying Squirrels’ Random Position Generation Based on Cloud Generator
Under the condition of , the flying squirrels randomly proceed gliding to the next potential food locations, different individuals generally have different judgments and their gliding directions and routines vary. In other words, the foraging behavior of flying squirrels has the characteristics of randomness and fuzziness. These characteristics can be synthetically described and integrated by a normal cloud model. In the model, a normal cloud model generator instead of uniformly distributed random functions is used to reproduce new location for each flying squirrel. Thus, (7)(9) are replaced by the following equations:where (Entropy) represents the uncertainty measurement of a qualitative concept and (Hyper Entropy) is the uncertain degree of entropy [42]. Specifically, in , stands for the search radius, and is used to represent the stability of the search. In the early iterations, a large is requested because the flying squirrels’ location is often far away from an optimal solution. Under the condition of final generations where the population location is close to an optimal solution, a smaller is appropriate for the finetuning of solutions. Therefore, the search radius dynamically changes with iteration number:where is the maximum search radius.
3.3. A Selection Strategy between Successive Positions
When new positions of flying squirrels are generated, it is possible that the new position is worse than the old one. This suggests that the fitness value of each individual needs to be checked after the generation of new positions by comparing with the old one in each iteration. If the fitness value of the new position is better than the old one, the position of the corresponding flying squirrel is updated by the new position. Otherwise, the old position is reserved. This strategy can be mathematically described by
3.4. Enhance the Intensive Dimensional Search
In the basic SSA, all dimensions of one individual flying squirrel are updated simultaneously. The main drawback of this procedure is that different dimensions are dependent and the change of one dimension may have negative effects on others, preventing them from finding the optimal variables in their own dimensions. To further enhance the intensive search of each dimension, the following steps are taken for each iteration: (i) find the best flying squirrel location; (ii) generate one more solution based on the best flying squirrel location by changing the value of one dimension while maintaining the rest dimensions; (iii) compare fitness values of the newgenerated solution with the original one, and reserve the better one; (iv) repeat steps (ii) and (iii) in other dimensions individually. The newgenerated solution is produced by
3.5. Procedure of ISSA
The pseudocode of SSA is provided in Algorithm 2.
Set , , n, , , , and  
Randomly initialize the flying squirrels locations  
Calculate fitness value  
while  
Generate new locations  
for t = 1: n1 (n1 = total number of squirrels on acorn trees)  
if  
else  
end  
end  
for t = 1: n2 (n2 = total number of squirrels on normal trees moving towards acorn trees)  
if  
else  
end  
end  
for t = 1: n3 (n3 = total number of squirrels on normal trees moving towards hickory trees)  
if  
else  
end  
end  
if  
end  
Calculate fitness value of new locations  
if  
end  
Enhance intensive dimensional search  
Find  
for j = 1:n  
Calculate fitness value of the new solution  
if  
end  
end  
end 
4. Experimental Results and Analysis
The performance of proposed ISSA is verified and compared with five natureinspired optimization algorithms, including the basic SSA, PSO [12], fruit fly optimization algorithm (FOA) [31], and its two variations: improved fruit fly optimization algorithm (IFFO) [35] and cloud model based fly optimization algorithm (CMFOA) [36]. 32 benchmark functions are tested with a dimension being equal to 30, 50, or 100. These functions are frequently adopted for validating global optimization algorithms, among which F1F11 are unimodal, F13F25 belong to multimodal, and F26F32 are composite functions in the IEEE CEC 2014 special section [43]. Each function is calculated for ten independent runs in order to better compare the results of different algorithms. Common parameters are set the same for all algorithms, such as population size NP = 50; maximal iteration number = 10,000. Meanwhile, the same set of initial random populations is used. The algorithmspecific parameters are chosen the same as those used in the literature that introduces the algorithm at the first time. The parameters of PSO, FOA, IFFO, CMFOA, and SSA are chosen according to [12], [31], [35], [36], and [37], respectively. Table 1 summarizes both common and algorithmspecific parameters for ISSA and other five algorithms. The error value, defined as (f(x) – Fmin), is recorded for the solution x, where f(x) is the optimal fitness value of the function calculated by the algorithms, and Fmin is the true minimal value of the function. The average and standard deviation of the error values over all independent runs are calculated.

4.1. Test 1: Unimodal Functions
Unimodal benchmark functions (Table 2) have one global optimum only and they are commonly used for evaluating the exploitation capacity of optimization algorithms. Tables 3–5 list the mean error and standard deviation of the results obtained from each algorithm after ten runs at dimension n = 30, 50, and 100, respectively. The best values are highlighted and marked in italic. It is noted that difficulty in optimization arises with the increase in the dimension of a function because its search space increases exponentially [45]. It is clear from the results that on most of unimodal functions ISSA has better accuracy and convergence precision than other five counterpart algorithms, which confirms that the proposed ISSA has good exploitation ability. As for F2 and F5, ISSA can obtain the same level of accurate mean error as IFFO, while the former outperforms the latter under the condition of n = 100. It is also found that both ISSA and CMFOA can achieve the true minimal value of F3 at n = 30 and 50, while ISSA is superior at n = 100.




Figures 1–3 show several representative convergence graphs of ISSA and its competitors at n = 30, 50, and 100, respectively. It can be observed that ISSA is able to converge to the true value for most unimodal functions with the fastest convergence speed and highest accuracy, while the convergence results of PSO and FOA are far from satisfactory. The IFFO and CMFOA, with the improvements of search radius though, yield better convergence rates and accuracy in comparison with FOA, but still cannot outperform the proposed ISSA. It is also found that ISSA greatly improves the global convergence ability of SSA mainly because of the introduction of an adaptive strategy of , a selection strategy between successive positions, and enhancement in dimensional search. In addition, the accuracy of all algorithms tends to decrease as the dimension increases, particularly on F6 and F11.
(a) F1
(b) F4
(c) F6
(d) F7
(e) F8
(f) F9
(g) F10
(h) F11
(a) F1
(b) F4
(c) F6
(d) F7
(e) F8
(f) F9
(g) F10
(h) F11