An Improved Grasshopper Optimization Algorithm for Global Optimization

Chinese Journal of ElectronicsVolume 30, Issue 3 p. 451-459 Original Research PaperFree Access An Improved Grasshopper Optimization Algorithm for Global Optimization YAN Yan, Corresponding Author YAN Yan yanyan503986706@163.com College of Energy and Electrical Engineering, Nanjing Hohai University, Nanjing, 211100 ChinaSearch for more papers by this authorMA Hongzhong, Corresponding Author MA Hongzhong hhumhz@163.com College of Energy and Electrical Engineering, Nanjing Hohai University, Nanjing, 211100 ChinaSearch for more papers by this authorLI Zhendong, Corresponding Author LI Zhendong lizhendong@nxu.edu.cn School of Information Engineering, Ningxia University, Yinchuan, 750021 China Collaborative Innovation Center for Ningxia Big Data and Artificial Intelligence Co-founded by Ningxia Municipality and Ministry of Education, Ningxia University, Yinchuan, 750021 ChinaSearch for more papers by this author YAN Yan, Corresponding Author YAN Yan yanyan503986706@163.com College of Energy and Electrical Engineering, Nanjing Hohai University, Nanjing, 211100 ChinaSearch for more papers by this authorMA Hongzhong, Corresponding Author MA Hongzhong hhumhz@163.com College of Energy and Electrical Engineering, Nanjing Hohai University, Nanjing, 211100 ChinaSearch for more papers by this authorLI Zhendong, Corresponding Author LI Zhendong lizhendong@nxu.edu.cn School of Information Engineering, Ningxia University, Yinchuan, 750021 China Collaborative Innovation Center for Ningxia Big Data and Artificial Intelligence Co-founded by Ningxia Municipality and Ministry of Education, Ningxia University, Yinchuan, 750021 ChinaSearch for more papers by this author First published: 01 May 2021 https://doi.org/10.1049/cje.2021.03.008AboutSectionsPDF ToolsRequest permissionExport citationAdd to favoritesTrack citation ShareShare Give accessShare full text accessShare full-text accessPlease review our Terms and Conditions of Use and check box below to share full-text version of article.I have read and accept the Wiley Online Library Terms and Conditions of UseShareable LinkUse the link below to share a full-text version of this article with your friends and colleagues. Learn more.Copy URL Share a linkShare onFacebookTwitterLinked InRedditWechat Abstract We proposes an improved grasshopper algorithm for global optimization problems. Grasshopper optimization algorithm (GOA) is a recently proposed meta-heuristic algorithm inspired by the swarming behavior of grasshoppers. The original GOA has some drawbacks, such as slow convergence speed, easily falling into local optimum, and so on. To overcome these shortcomings, we proposes a grasshopper optimization algorithm based on a logistic Chaos maps opposition-based learning strategy and cloud model inertia weight (CCGOA). CCGOA is divided into three stages. The chaos opposition learning initialization strategy is used to initialize the population, so that the population can be evenly distributed in the feasible solution space as much as possible, so as to improve the uniformity and diversity of the initial population distribution of the grasshopper algorithm. The inertia weight cloud model is introduced into the grasshopper algorithm, and different inertia weight strategies are used to adjust the convergence speed of the algorithm. Based on the principle of chaotic logistic maps, local depth search is carried out to reduce the probability of falling into local optimum. Fourteen benchmark functions and an engineering example are used for simulation verification. Experimental results show that the proposed CCGOA algorithm has superior performance in determining the optimal solution of the test function problem. I. Introduction Global optimization has become the way to deal with many problems in several fields, such as engineering applications[1], medical imaging[2], finance[3] and decision-making[4]. Traditional optimization methods can solve the above problems, but most of these technologies are accurate and need the gradient information of the problem. When dealing with more complex problems, it is difficult to find the global optimal solution. The shortcomings of traditional optimization methods have forced researchers to focus on the meta-heuristic algorithm. With the increasing complexity and scale of practical engineering design optimization problems, the meta-heuristic algorithm has gradually become the main technology to solve global optimization problems[5, 6]. The meta-heuristic algorithm is mainly based on the biological evolution of nature and the simulation of physical phenomena[7, 8]. Among the meta heuristics, those that derive inspiration from the intelligence of natural group simulation are very popular. Some examples are grey wolf optimizer[9], whale optimization algorithm[10], selfish algorithm[11], social spider algorithm[12]. Most meta-initiating algorithms are optimized based on population numbers to avoid falling into local optimization. In the optimization process, the meta-heuristic algorithm is maintains the balance between exploration and development. The main behavior of the meta-heuristic algorithm is to find a more promising search area in the exploration, and to use the development and evaluation ability of the algorithm to determine the search space of the optimal solution. Recently, a new swarm-based algorithm called Grasshopper optimization algorithm (GOA) was proposed that mimics the behavior of grasshopper swarms in nature. Several good attributes of the grasshopper algorithm enable it to obtain better optimal values in optimization problems, such as cancer classification[13], feature selection[14], power load forecasting[15], and PID gain value setting[16]. However, similar to other meta-heuristics, the main determinant of the grasshopper algorithm is that its performance and convergence are affected by many factors. For example, if the proper method is not selected for population initialization, the grasshopper algorithm cannot converge to the full optimal solution. At the same time, the balance between exploration and development of the search space also has a major impact on the convergence of the algorithm. Among them, the algorithm with the most exploration times cannot find the global solution, while the algorithm with the most development times takes a long time, and may fall into the local optimum. The diversity of population is also an important factor affecting the performance of GOA or any other meta-heuristic algorithm. If the diversity is very low, it means that individuals are clustered in a small area, which may lead to local convergence. If the diversity is very high, it means that individuals are scattered over a wide area, which will lead to poor convergence. There are several ways to address these shortcomings. Jianfa Wu et al.[17] proposed Adaptive GOA (AGOA) for trajectory optimization of solar-powered unmanned aerial vehicle cooperative target tracking in urban environments. In AGOA, improvement measures were added to the GOA, such as the natural selection strategy, the democratic decision-making mechanism[18]. Arora S and Anand P[18] used 10 chaotic[19] formulas to directly replace the updated parameter c in GOA, and the algorithm can continuously explore in the whole iterative process. Saxena A and Shekhawat S[20] modified the ten chaos formula[19]; the parameter c in GOA kept decreasing, which could guarantee the subsequent development ability of the algorithm. Ahamed A. Ewees[21] proposed an Opposition-based learning (OBL) GOA algorithm. The algorithm used the opposition learning strategy to initialize the population, and used the opposition learning strategy to update the population in the iterative process to reduce the complexity of the algorithm. Arora S and Anand P[22] proposed a grasshopper algorithm based on cuckoo search. The learning function of GOA was updated by CS algorithm, and its performance was evaluated. M. M. Annie Alphonsa et al.,[23] according to the characteristics of genetic algorithm and different angle optimization problems based on probability selection rules, combed the advantages of genetic algorithm with grasshopper algorithm, the optimization parameters of grasshoppers were adjusted, and the improved method was applied to medical data security. In order to increase the diversity of the population, three strategies (Gauss mutation method, Levy flight strategy and opposition-based learning strategy) were used to improve the grasshopper algorithm in Ref.[24]. In this algorithm, Gauss mutation was used to increase population diversity and local search ability, and Levy flight strategy was used to enhance the randomness of search. The opposition learning strategy was adopted to improve the search efficiency. This method was used to solve the problem of economic pressure. Yue. X. et al. proposed a new variant of GOA[25], which improved the grasshopper algorithm by principal component analysis and a novel inertia weight strategy. Firstly, the grasshopper algorithm with the minimum correlation variable is obtained by principal component analysis, and then a new inertia weight method is proposed to balance the exploration and development process so that the grasshopper algorithm has good local search ability. Xu Z., Hu Z. et al.[26] proposed an improved GOA algorithm aiming at some defects of the basic GOA and introduced two strategies of orthogonal learning and chaotic mining in the traditional GOA algorithm to seek a more stable balance between exploration and mining core. Adding orthogonal learning into GOA can improve the diversity of agents, while chaos development strategy can update the location of grasshoppers in a limited local area. This method can overcome the GOA algorithm's core defects and deal with continuous optimization problems more effectively. Majdi mafarja[27], et al. proposed a feature method based on package selection for feature selection. This method uses four different strategies to overcome the traditional GOA defects, such as falling into local optimum and slow convergence and applies the proposed feature method to various feature selection tasks. These improvements effectively improve the performance of grasshoppers in the corresponding fields. However, according to the free lunch theory in Ref.[28], it is assumed that not all optimization problems can be solved by one algorithm, and this means the grasshopper algorithm can still be improved in terms of its performance development and exploration ability. This prompted us to develop a new improved grasshopper algorithm. In order to improve the accuracy and convergence speed of the grasshopper algorithm, this paper proposes a grasshopper algorithm based on a chaotic search strategy and cloud model inertia, called CCGOA. This paper includes the following three parts: 1) To solve the traditional grasshopper algorithm's optimization problem, the initial population generated by the random method will have an uneven distribution of the initial population and reduced initial population diversity. This paper combines the opposition-based learning strategy and chaotic logistic mapping. The grasshopper algorithm population is initialized to enhance the diversity of the population and improve the solution efficiency, laying the foundation for the algorithm to perform global search diversity; 2) To balance the global exploration ability of the grasshopper algorithm and local optimization, and inertia weight algorithm based on the cloud model is introduced into the grasshopper algorithm. The population is divided into three categories: excellent subgroups, common subgroups, and poor subgroups. When grasshopper is in a common subgroup, it can be adjusted by the cloud model. Each updates the position by updating the weight strategy, which can accelerate the convergence of the population and effectively prevent the population from falling into the local optimum; 3) To reduce the probability that the traditional grasshopper algorithm is easy to fall into the local optimum, this paper uses the optimal individual chaotic search strategy to optimize the algorithm at the later stage of iteration, avoid the local optimization, and establish the optimal fitness value. II. Preliminaries 1. Grasshopper optimization algorithm Sareimi et al. proposed an algorithm to simulate grasshopper behavior in 2017[29]. The life cycle of grasshoppers includes two stages: larval stage and adult stage. The main characteristics of grasshoppers in the larval stage are jumping and moving, and the movement is slow and the stride is small. The main feature of adult grasshoppers is food search, which is very important in the grasshopper algorithm. During exploration, grasshoppers move rapidly, and around the food slowly in the development stage. These two functions, as well as the search for food sources, are naturally realized by grasshoppers. The swarm behavior of grasshoppers is simulated by mathematics as follows: X i = S i + G i + A i = ∑ j = 1 j ≠ i N s ∣ x j - x i ∣ x j - x i d i j - g e ^ g + u e ^ w (1) where, X i represents the position of the ith grasshopper in the grasshopper swarm, S i represents the influence of the ith grasshopper receiving the interaction of other mites, G i represents the gravity of the ith grasshopper, and A i represents the wind advection, u represents the constant drift, G i = - g e ^ g , A i = u e ^ w , g represents the gravity constant, e ^ g represents the unit vector pointing to the center of the earth, and e ^ w represents the unit vector in the same direction as the wind direction. S i = ∑ j = 1 j ≠ i N s d i j d ^ i j (2) where d i j = x i - x j represents the distance between the two grasshoppers. d ^ i j = x i - x j d i j is the unit vector between two grasshoppers. i = 1 , 2 , … , n , n represents the number of populations, and j = 1 , 2 , … , D , D represents the dimensions. The S function is defined as the function of the aphid affected by the interaction force of other aphids. The expression is as follows: s ( τ ) = f e - τ l - e - τ (3) where, f and l are the attraction intensity parameter and the attraction scale parameter respectively, and the values of the two determine the distribution of the parameters. Usually take l = 1 . 5 , f = 0 . 5 . According to Eq.(1), it cannot be directly used to solve the optimization problem. In order to give the model strong global optimization ability, the model is improved as follows: X k d = c ∑ j = 1 j ≠ i N c u b d - l b d 2 s x j d - x i d x j - x i d k j + T ^ d (4) The distance between each grasshopper individual after updating the position is limited to [1,4]. The update parameter c is calculated as follows: c = c max - t c max - c min T max (5) where T max is the maximum number of iterations, and t is the current number of iterations. Here, c max c min represents the maximum and minimum value of c. Usually, c max = 1 , c min = 0 . 00001 . The standard grasshopper algorithm's pseudo code 1 is shown in Appendix A. 2. Chaos systems Chaos is a kind of nonlinear stochastic definite bounded system[19, 29], which is neither periodic nor convergent. In addition, the chaotic system has a strong dependence on the initial parameters and conditions. It has the following characteristics: 1) Ergodicity. Chaotic variables can pass through all state spaces without repetition in a certain range. 2) Randomness. The performance of chaotic variables is as chaotic as that of random variables. 3) Regularity. The chaotic variables are derived by determining the iterative equation. 4) Sensitivity to initial value. Any small change in the initial value will cause great changes in the future movement. In addition, the chaos algorithm has strong global search ability and high calculation efficiency. In this paper, logistic map is used to generate problem-solving sequences. Compared with other chaotic systems, logistic map is simpler and requires less computation. The description is as follows: y k + 1 d = μ y k d 1 - y k d (6) where, y k d ∈ [ 0 , 1 ] represents a chaotic variable; k = 1 , 2 , … , N , d = 1 , 2 , … , D . D is the dimensions, N is the number of the grass-hopper population. 3. Opposition-based learning strategy The basic definition of opposition-based learning strategy was put forward by Tizhooshi in 2005[30]. The core concept of reverse strategy optimization is to discover an improved solution, calculate and evaluate a candidate solution and related matching inverse solution at the same time, and select the optimal solution as the next generation of individuals. For the candidate solution x, the related matching inverse solution x ¯ can be calculated according to the following formula. Suppose real x ∈ [ u , l ] counter value x ¯ (u and l denotes the boundary and the lower boundary problems), the expression is calculated as follows: x ¯ = u + l - x (7) 4. Cloud model inertia weight 1) Cloud theory The cloud model is a qualitative and quantitative bidirectional cognitive computing model proposed by Professor Li Deyi of China, combining probability theory and fuzzy mathematics theory[31]. Let the set u = x be the quantitative domain represented by numerical value, C n is the qualitative concept on u, if the quantitative value x ∈ u is a random realization of the qualitative concept C n , and the certainty of X to C n , u ∈ [ 0 , 1 ] is a random number with a stable tendency, then the distribution of X on the domain u is called cloud, which is recorded as cloud C ( x ) , and each x is called a cloud[32-37]. The cloud model can use three digital features ( E x , E n , H e ). The expected value E x represents the point of qualitative concept, which demarcates the center of gravity of a cloud object in the universe; entropy E n is a measure of the fuzzy degree of qualitative concept, whose size directly determines the range that can be accepted by the fuzzy concept in the universe; super entropy H e is a measure of the randomness of membership function, whose size indirectly reflects the thickness of a cloud, C ( x ) = e - ( x - E x ) 2 / 2 E n 2 (8) 2) GOA based on inertia weight of cloud model In the grasshopper algorithm, inertia weight w is very important for local and global development. The larger inertia weight ω is conducive to jumping out of the local optimum, but it is not easy to get the exact solution. The smaller inertia weight ω is conducive to the local optimum, and speeds up the convergence speed of the algorithm, but it is not easy to jump out of the local extreme point. First of all, we calculate the fitness value of all grasshoppers and get the average fitness value of all grasshoppers. The total number of all grasshopper is N. In the t-th iteration, the individual X i adaptation value is fi, and the corresponding mean adaptation value is f ¯ 1 0 = 1 N ∑ i = 1 N f i . When the individual fitness value is better than f 1 0 ¯ , the average fitness value is f 1 1 ¯ ; when the individual fitness value is lower than f ¯ 1 0 , the average fitness value is f ¯ 1 2 ; the best individual fitness value is f min . The group is divided into three subgroups with different inertia weight generation strategies[38]: If f i is better than f ¯ 1 0 , the value is very small and close to the optimal solution, and the value of ω is 0.2. If f ¯ 1 2 < f ¯ 1 0 < f ¯ 1 1 , and it is a general grasshopper population, the inertia weight can be adjusted adaptively by the X condition cloud generator. The formula for particles to apply X-conditional cloud generator to dynamic and self-adaptive adjustment of inertia weight is as follows: E x = f ¯ 1 0 (9) E n = f ¯ 1 0 - f min / c 1 (10) H e = H e / c 2 (11) where, c 1 and c 2 are the learning factors. E n ' = normrnd E n , H e (12) ω = 0 . 9 - 0 . 2 e - f 1 - E x 2 E n 2 (13) According to the mathematical limit theorem: 0 < e - f 1 - E x 2 E n 2 < 1 the weight value range can be guaranteed to be ω ∈ [ 0 . 7 . 0 . 9 ] . Therefore, from Eq.(13), ω will decrease with the decrease of individual fitness value of grasshopper, thus ensuring that the better grasshopper can obtain a smaller value of ω. ③ If f i is less than f ¯ 1 0 , the grasshopper is a poor individual far away from the optimal solution, so the inertia weight of these grasshoppers can be increased to make ω value 0.9. 5. Optimal individual chaos search strategy Because all the individuals in the population gather to the optimal individuals, the diversity of individuals is lost, the algorithm converges too early, and the local optimal phenomenon appears. In order to reduce the premature convergence of GOA algorithm and the phenomenon of local optimization, CCGOA algorithm applies chaotic maps to the current optimal grasshoppers individuals. By using logistic chaos to adjust the chaos search space adaptively, the obtained chaos optimization solution (decision variable) is finally transformed into the linear optimization space, which is essentially a deep local search algorithm[39]. 1) The decision variable x k d is mapped to the chaotic variable y k d by the following formula: y k d = x k d - X min d X max d - X min d (14) where, X k d ∈ X min d , X max d , y k d ∈ [ 0 , 1 ] . 2) The above formula is substituted into the logistic map of Eq.(6) for iteration to generate chaotic variable sequence y k d ( t ) t = 1 , 2 , … , T max . T max is the maximum number of iterations. 3) The chaotic variable y k d is converted to the decision variable X k d according to the following equation: X k d ( t ) = X min d + X max d - X min d · y k d ( t ) (15) where, X k d ( t ) represents the position of kth grasshoppers at iteration t in dth dimension. 4) Evaluate the adaptability of decision variable X k d and update the current optimal individual. 5) Judge whether the maximum number of chaotic searches is reached. If it is reached, the chaotic searches end, otherwise turn back to Step 2). III. Improved Grasshopper Algorithm 1. The initial phase The population initialization of logistic chaos opposition-based learning strategy is used, and the uniformity and diversity of the initial population distribution of grasshopper algorithm are improved in two stages. Firstly, we use the logistic map in Eq.(6) to generate a chaotic sequence to initialize the population. Eq.(7) is modified as X k d = X min d + X max d - X min d · y k d (16) In the second stage, the population O B X k = O B X k d of opposition-based learning is calculated by population X k d , and the individual O B X k d of opposition population is expressed as O B X k d = X min d + X max d - X k d (17) The new population { X ∪ O B X } is obtained by combining the population X with the reverse population O B X . The new population objective function is calculated and sorted. The N individuals with the best adaptability are the initial population. 2. Update phase The update phase is divided into two stages, the first using the inertia weight of the cloud model and the second using the optimal individual chaos search strategy. In the first stage, using the inertia weight of the cloud model, the grasshopper population is divided into fine subgroups, ordinary subgroups and poor subgroups. and the inertia weight of different sizes is used to improve the convergence speed and expand the search range. The modified mathematical model can be represented as the following Eq.(8): X i d = c ∑ j = 1 j ≠ i N c u b d - l b d 2 s x j d - x i d x j - x i d k j + ω · T ^ d (18) The optimal individual chaos search strategy is used to optimize the later iteration of the grasshopper algorithm, so as to avoid the grasshopper algorithm falling into the local optimum and specifying the optimal fitness value. Finally, the previous two steps are performed again until the terminal criteria are reached. 3. CCGOA time complexity analysis The pseudo code of CCGOA algorithm is in shown in appendix. The algorithm consists of a chaotic opposition-based learning initialization strategy, position update of the cloud model inertia weight, and optimal individual chaos search strategy. Suppose the number of population is N, and the problem dimension of optimization is D. According to the description of GOA and the operation rule of time complexity O, the time complexity of CCGOA is analyzed as follows: 1) In the initial population stage, the computational complexity is O( N D ); 2) In the iterative process, the fitness of each population is sorted, and the computational complexity is O( N log N ). Then, the inertia weight of the cloud model corresponding to each population is calculated, and the complexity is O(N). 3) In the phase of grasshopper update position, the complexity of calculation is O(N). 4) At the end of iteration, the complexity of the logistic map adaptive search map is O(N). Therefore, in each iteration, the complexity of the improved algorithm is O( 3 N + N l o g N + N D ), which is higher than that of the standard grasshopper algorithm. When the dimension of the optimization problem increases gradually, the complexity of the improved algorithm is approximately o ( N D ), which is consistent with the standard grasshopper optimization algorithm. Table 1 shows the comparison computational complexity of CCGOA, CGOA, GOA, and PSO. Table 1. Time complexity analysis Algorithm Computational complexity CCGOA O( 3 N + N l o g N + N D ) CGOA O( 2 N + N D ) GOA O( N D ) PSO O( N D + N ) It can be seen from Table 1 that the complexity of the operator is related to the population number N and the dimension D of the optimization problem. When the dimension is gradually increased ( D ≫ N ), the complexity of the four algorithms is approximately O( N D ), and it belongs to the same order of magnitude. IV. Experimental Studies 1. Measures of the performance In order to test the performance of CCGOA algorithm in this paper, two examples are used in this paper. The mean value, standard deviation, worst, best adaptive value, accuracy and optimization success rate are taken as the new performance indicators of each algorithm. 1) Mean: Used to find the central value of the fitness values and it is computed as M e a n = 1 N n u m ∑ i = 1 N n u m f i t n e s s i (19) 2) Worst value: Used to determine the largest fitness value and it computed as W o r s t = max 1 ≤ i ≤ N n a m f i t n s s s i (20) 3) Best value: Used to find the smallest fitness value and it computed as Best = min 1 ≤ i ≤ N n u m f i t n s s s i (21) 4) Standard deviation (STD): Used to determine deviation of the values from the central value ( A v e r a g e ) and it is computed as S T D = 1 N n u m ∑ i = 1 N m u n t f i t n s s i - A v e r a g e 2 (22) 5) Accuracy rate (AR) reflects the closeness of the result of the algorithm to the global optimal solution of the problem. It is assumed that the optimal solution of a problem after t max iterations is P b e s t , and the definition of accuracy is A C = F P b e s t - F X o p t (23) When A C ≤ 1 . 0 e - 3 , the optimization is successful. In Eq.(23), X o p t is the theoretical optimal value and P b e s t is the actual optimal value. 6) The Success rate (SR), which is the proportion of the algorithm converging to the optimal solution in many experiments, is defined as S R = m ' M × 100 (24) where m ' is the number of times it takes to find the optimal solution and M is the total number of run times. 2. Design and analysis of optimized spring tension To further verify the effectiveness and engineering of this algorithm, the spring tension design problem is selected as an engineering example for analysis. The spring tension structure is shown in Fig.1. The GOA of the spring optimal design problem is to minimize its gravity, including three decision variables of coil diameter ( x 1 ), coil number ( x 2 ), and wire diameter ( x 3 ) and four constraint inequalities. Fig. 1Open in figure viewerPowerPoint Structure of spring tension The objective functions and constraints are as follows: min f ( x ) = x 1 2 x 2 2 + x 3 (25) s . t . g 1 ( x ) = 1 - x 3 x 2 3 7178 x 1 4 ≤ 0 g 2 ( x ) = 4 x 2 2 - x 1 x 2 12566 ( x 1 3 x 2 - x 1 4 + 1 5108 x 1 2 - 1 ≤ 0 g 3 ( x ) = 1 - 140 . 45 x 1 x 2 2 x 3 ≤ 0 g 4 ( x ) = x 1 + x 2 1 . 5 - 1 ≤ 0 0 . 05 ≤ x 1 ≤ 2 0 . 25 ≤ x 2 ≤ 1 . 3 2 ≤ x 3 ≤ 15 (26) The CCGOA and the standard grasshoppers, the OBLG