Abstract
As one of the latest meta-heuristic algorithms, the grasshopper optimization algorithm (GOA) has extensive applications because of its efficiency and simplicity. However, the basic GOA still has enough room for improvement. Therefore, a new variant GOA algorithm which combines two strategies, namely PCA–GOA, is proposed. Firstly, principal component analysis strategy is employed to obtain the grasshoppers with minimally correlated variables, which can improve the exploitation capability of the GOA. Then, a novel inertia weight is proposed to balance exploration and exploitation in an intelligent way, which makes the GOA to have better search capability. Furthermore, the performance of PCA–GOA is evaluated by solving a series of benchmark functions. The experimental results manifest that the PCA–GOA provides better outcomes than the basic GOA and other state-of-the-art algorithms on the majority of functions, which demonstrates the superiority of the PCA–GOA.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Avoid common mistakes on your manuscript.
1 Introduction
Optimization is used to select the best options among all the solutions, and it exists in many fields such as scheduling problem, parameter estimation, materials prediction and structure design [1,2,3,4,5]. However, it is difficult to solve the high dimension optimization problems with the traditional optimization algorithms, and this issue has drawn much attention of researchers [6]. It is reported that the heuristic and meta-heuristic algorithms show superiority on complex optimization tasks. The majority of these algorithms are proposed based on natural phenomena. Some of the typical algorithms are genetic algorithm (GA) which is inspired from genetic mechanism [7], and particle swarm optimization (PSO) is proposed based on the behavior of birds [8]. Some recent optimization algorithms employ the ant colony optimization (ACO) [9], artificial bee colony algorithm (ABC) [10], firefly algorithm (FA) [11], cuckoo search (CS) [12], gravitational search algorithm (GSA) [13], bat algorithm (BA) [14], gray wolf optimization (GWO) [15] and moth-flame optimization algorithm (MFO) [16]. In addition, modifying the existing algorithms is an important work, and it helps using the hardware better. This point is also meaningful to supercomputing [17]. Graphics processor units (GPUs) have been widely used for large number computation due to its high performance [18]. If the optimization algorithm runs on GPU, the execution time will be shorter [19].
The grasshopper optimization algorithm (GOA) is newly proposed to solve optimization problems. The advantages of the GOA have been proven by comparing with some well-known and latest algorithms [20]. Therefore, practitioners and researchers are interested with employing the GOA to solve the various optimization problems. Aljarah et al. [21] used the GOA to solve the feature selection and support vector machine problem. Zhang et al. [22] applied GOA to analyze vibration signals. Wu and Wang [23] had applied adaptive GOA to trajectory optimization problem. Hekimoğlu and Ekinci [24] applied GOA to automatic voltage regulator system. Łukasik et al. [25] used GOA to solve data clustering problem. Lal et al. [26] applied GOA to optimize fuzzy PID controller. Fathy [27] used GOA to solve reconfiguration of PV array problem.
The basic GOA is a promising algorithm and has been successfully applied to many fields. However, the basic GOA has some shortcomings, such as limited exploitation capability and premature [28]. Therefore, many researchers are interested in improving the GOA. Ewees et al. [29] proposed a novel improved GOA which combined opposition-based learning (OBL) strategy. The outstanding performance of the proposed GOA was proved by benchmark functions and engineering problems. Saxena et al. [30] used chaotic strategy with 10 maps to enhance bridging mechanism of GOA. The results proved the efficiency of the improved GOA. In multilevel thresholding image segmentation, Liang et al. [31] presented a modified GOA, which combined the Levy flight algorithm. To overcome the drawbacks of the basic GOA algorithm, Luo et al. [32] proposed an improved GOA and applied to financial stress predicting problem. Three strategies named Gaussian mutation, Levy flight and opposition-based learning were integrated into GOA. The experiment results indicated that the modifications can significantly improve the basic GOA.
As we can see above, many versions of GOA have been proposed. However, the enhanced GOA algorithms are far from perfect. To further improve the GOA, an enhanced grasshopper optimization algorithm, namely PCA–GOA, is proposed. The main contributions of the paper are as follows:
- (a)
In the PCA–GOA, the principal component analysis is incorporated to generate the new population with high quality. Then, the generated population is used to replace the population with bad fitness values. This operation is able to improve the exploitation capability of the GOA.
- (b)
The novel inertia weight is introduced to control the search process in an intelligent way. Under this strategy, the grasshoppers with better fitness values move quickly to the target grasshopper and the grasshoppers with worse fitness values maintain strong exploration capabilities. Therefore, novel inertia weight plays a role in both enhancing the exploration and exploitation capability.
The structure of the rest of this paper is as follows. Section 2 presents the basic GOA algorithm. Section 3 shows the proposed PCA–GOA algorithm. Section 4 provides discussions and analyses of the experiment results. Section 5 concludes the paper.
2 Basic grasshopper optimization algorithm
The basic grasshopper optimization algorithm (GOA) was originated by Saremi and Mirjalili [20], which mimics the behavior of grasshopper. The mathematical model of the GOA can be expressed as follows:
where \( X_{i} \) is the position of the \( i{\text{-th}} \) grasshopper, \( {\text{S}}_{i} \) represents the social interaction, \( G_{i} \) denotes the gravity force of the \( i{\text{-th}} \) grasshopper, \( {\text{A}}_{i} \) refers the wind advection.
where \( x_{i} \) and \( x_{j} \) are the positions of \( i{\text{-th}} \) and \( j{\text{-th}} \), respectively. \( d_{ij} \) denotes the distance of \( i{\text{-th}} \) and \( j{\text{-th}} \) grasshoppers. The \( s \) function represents social force is given as follows:
where \( f \) is the intensity of attraction, \( l \) denotes the attractive length scale.
where \( g \) denotes the gravitational constant, \( \hat{e}_{g} \) is unity vector.
where \( u \) denotes a constant drift, \( \hat{e}_{w} \) represents a unity vector.
The mathematical model can be written as:
where \( N \) defines the number of grasshoppers.
In order to solve the optimization problem in a better way, a modified GOA is expressed as follows:
where \( ub_{d} \) and \( lb_{d} \) are the upper bound and lower bound, \( \hat{T}_{d} \) is a target grasshopper. \( c \) is the parameter, which used to balance exploration and exploitation. \( c \) can be given by:
where \( c_{{\rm max} } \) and \( c_{{\rm min} } \) are the maximum value and the minimum value, \( l \) is the number of current iterations, \( L \) denotes the maximum number of iterations.
3 The proposed PCA–GOA algorithm
3.1 Principal component analysis
In basic GOA, the grasshoppers fly around the target grasshopper, which leads redundancy that reduces the diversity of population. More importantly, the grasshoppers with bad fitness have the low possibility to reach the optimal solution. In this work, principal component analysis is introduced to solve this problem. Principal component analysis is an important statistical analysis method, which has two main functions that are data reduction and interpretation [33, 34]. The minimally correlated variables can be transformed from correlated variables by principal component analysis [35]. In the PCA–GOA algorithm, the new generated solutions are minimally correlated and show the information of original solutions. Furthermore, the new solutions may have better quality than the original solutions, which enhance the exploitation capability of the GOA. Let that \( U = \left( {U_{1} ,U_{2} \ldots ,U_{p} } \right)^{'} \) is an exemplar of the original data set, and it can be expressed as follows:
where \( p \) represents the number of exemplars. The linear transformations can be calculated as follows:
where \( a_{i} \) represents the coefficient vector. The linear transformation model can be represented in a simple way as follows:
It is important to choose the number \( m \) of principal components. The \( m \) is defined as follows:
where \( \delta \) is contribution rate. In this work, we use \( \delta = 0.85 \).\( \lambda_{1} ,\lambda_{2} ,\lambda_{m} \) denote eigenvalues of covariance matrix.
Suppose the covariance matrix of grasshoppers \( X = \left\{ {x_{1}^{t} ,x_{2}^{t} , \ldots x_{n}^{t} } \right\} \) is \( V \), principal population can be generated as follows:
where \( (a_{1}^{'} ,a_{2}^{'} , \ldots , a_{m}^{'} ) \) denote feature vectors of \( V \). According to the principal component analysis theory, the new generated population is uncorrelated. The individuals of bad fitness are substituted by principal population. Figure 1 shows the flow of principal component analysis operation.
3.2 Novel inertia weight
In basic GOA algorithm, the parameter \( c \) plays an important role in balancing exploration and exploitation, which decreased with the number of iterations in a linear way. However, all the grasshoppers take the same parameter \( c \) without considering the fitness of each grasshopper. In this paper, we propose a novel inertia weight, which takes different strategies based on the fitness values of grasshoppers. To guarantee the steady of searching process, one of \( c \) is replaced. The novel inertia weight is calculated as follows:
The modified mathematical model can be expressed by:
The flowchart of the proposed PCA–GOA is shown in Fig. 2.
4 Experimental results and discussion
In this section, unimodal benchmark functions, multimodal benchmark functions and fixed-dimension multimodal benchmark functions are used to test the performance of the PCA–GOA [36,37,38,39]. The benchmark functions are provided in Tables 1, 2 and 3. The exploitation of an algorithm can be tested by unimodal benchmark functions \( \left( {f_{1} - f_{7} } \right) \) as only one global is contained. Multimodal benchmark functions \( \left( {f_{8} - f_{13} } \right) \) and fixed-dimension multimodal benchmark functions \( \left( {f_{14} - f_{23} } \right) \) are efficient tool for evaluating exploration capability and local optima avoidance. However, fixed-dimension multimodal benchmark functions are different from multimodal benchmark functions in dimensionality.
4.1 Parameters analyze
Parameters setting can influence the performance of the PCA–GOA when solving the various optimization problems. In this study, the five parameters of PCA–GOA include maximum parameter \( c_{\rm max} \), minimum parameter \( c_{{\rm min} } \), number of search agents \( N \), maximum number of iterations \( L \), contribution rate \( \delta \) are analyzed on benchmark function \( f_{1} \). An orthogonal test is worked as a tool to show the relations between the performance and each parameter setting. Ranges of PCA–GOA parameters are described in Table 4. According to the number of factors and levels, we select the \( L_{27} \left( {3^{13} } \right) \) type to complete the task. To make the results more convincing, the average values after 30 runs are used to make comparisons.
As shown in Table 5, the maximum number of iterations \( L \) is the most important factor that affects the search capability of the PCA–GOA. Furthermore, the importance of the other factors is as follows: \( c_{{\rm max} } > c_{{\rm min} } > N > \delta \). Figure 3 shows the relation between average fitness values and the five parameters. From Table 5, we can obtain the best combination is \( c_{\rm max} = 1 \), \( c_{{\rm min} } = 0.00001 \), \( N = 50 \), \( L = 300 \), \( \delta = 0.85 \).
4.2 Performance evaluation
Six typical and recent algorithms including particle swarm optimization (PSO) [8], bat algorithm (BA) [14], ant lion optimizer (ALO) [40], dragonfly algorithm (DA) [41], grasshopper optimization algorithm (GOA) [20] and chaotic grasshopper optimization algorithm (CGOA) [28] are employed to compare the performance of the PCA–GOA. The key parameters of the seven algorithms are shown in Table 6. To test the generality of the PCA–GOA, different number of iterations and population sizes are used to make comparisons. The experiments are first tested on \( N = 20 \) and \( L = 300 \). Then, \( N = 30 \) and \( L = 1000 \) are used to further assess the performance of the proposed PCA–GOA. Each process independently runs 30 times. Best fitness values, worst fitness values, average fitness values and standard deviation values are recorded. It is obvious that the lower value means better search capability of the algorithm. For the drawbacks of the four indices cannot measure whether the results are significant, we use Wilcoxon statistical test to perfect comparisons [42, 43]. If \( p < 0.05 \), it demonstrates the improving affect is significant. Furthermore, CPU time and allocated memory are used to evaluated the computation amount of the PCA–GOA.
The details of experiments environment are as follows: Core (TM) i5-4590 CPU @ 3.30 GHz with 8 GB RAM and 64 bit under Windows 7 system using Matlab R2015a.
Tables 7, 8 and 9 illustrate the results of unimodal benchmark functions, multimodal benchmark functions and fixed-dimension multimodal benchmark functions, respectively. In addition, the best results are highlighted in bold.
Table 7 summarizes the best fitness values, worst fitness values, average fitness values and standard deviation values achieved by PSO, BA, ALO, DA, GOA, CGOA and PCA–GOA. As the results reported in Table 7, the PCA–GOA provides the best results on the four indexes for \( f_{1}, f_{2}, f_{3}, f_{4}, f_{5}, f_{6} , \) and \( f_{7} \), which shows the PCA–GOA has remarkable advantages in terms of unimodal test functions. The superiority of the PCA–GOA can be further proved by Table 10, because all p values are much less than 0.05. Therefore, we can conclude that the PCA–GOA has a high exploitation capability.
Observed from Table 8, it is apparent that PCA–GOA obtains better results for the majority functions except \( f_{8} \) and \( f_{9} \). For \( f_{8} \), the PCA–GOA provides the best standard deviation values. It can be seen from Table 11, the PCA–GOA is markedly better than the other algorithm for \( f_{10}, f_{11}, f_{12} \) and \( f_{13} \). It suggests that the principal component analysis plays an important role in improving the search precision, and novel inertia weight is an efficient tool for keeping the exploration capability. In a word, the PCA–GOA has a perfect exploration ability and superior capability in jumping out of local optima. The PCA–GOA fails to achieve the best performance on some functions, and the reasons are as follows: the principal component analysis helps the algorithm finds the better solutions with a fast rate; however, this leads the grasshoppers gather around the best solution and the novel inertia weight mechanism is insufficient to jump out of the local best solution with a certain probability.
Table 9 shows the results from the seven algorithms for the fixed-dimension multimodal benchmark functions. As we can see the results from Table 9, the PCA–GOA obtains very competitive results by comparing with the other algorithms. The PCA–GOA achieves the best results on \( f_{16}, f_{17}, f_{20}, f_{21}, f_{22} \) and \( f_{23} \) in terms of average fitness values. The ALO provides the best average fitness values for \( f_{15} \). However, the p values in Table 12 are bigger than 0.05, which demonstrates the advantage is not obvious. Therefore, it can be claimed that the PCA–GOA shows better performance than other algorithms on fixed-dimension multimodal benchmark functions.
Tables 13, 14 and 15 display the CPU time of the PSO, BA, ALO, DA, GOA, CGOA and PCA–GOA. From Tables 13 and 14, the DA requires the more computation time than the other algorithms on unimodal benchmark functions and multimodal benchmark functions. Table 15 shows that the PCA–GOA demands the highest computation time among the seven algorithms on the fixed-dimension multimodal benchmark functions. However, the CPU time of PCA–GOA is slightly longer than the GOA and CGOA. It indicates that time complexity of the principal component analysis mechanism is acceptable.
Tables 16, 17 and 18 present the allocated memory of the seven algorithms. These tables show that PCA–GOA demands more allocated memory than the other algorithms. However, the allocated memory of PCA–GOA is almost in the same in the level with the GOA and CGOA.
To continue evaluating the search capability and robustness of the proposed PCA–GOA, different number of iterations and population size are used to make further comparisons. The results are shown in Tables 19, 20 and 21. From the tables, with the increasing of number of iterations and population size, all the algorithms provide better results.
Table 19 lists the results of the seven algorithms for unimodal test functions. Compared with other algorithms, the PCA–GOA always achieve better results on all unimodal test functions; meanwhile the superiority of the PCA–GOA is demonstrated by Table 22. The results show that the PCA–GOA is efficient enough to deal with the unimodal test functions
It can be seen from Tables 20 and 23 the PCA–GOA performs significantly better than the other algorithms on \( f_{10,} f_{11,} f_{12} \) and \( f_{13} . \) Table 21 exhibits statistical results for the fixed-dimension multimodal benchmark functions. From the perspective of average fitness values, the PCA–GOA is the first rank on \( f_{14} ,f_{16} ,f_{17} ,f_{18} \) and \( f_{20} \). In addition, Table 24 shows that p values of \( f_{14} ,f_{16} \)\( f_{17} \) and \( f_{18} \) are much below 0.05, which verify the performance of the PCA–GOA is much better than the other algorithms. Mainly, the PCA–GOA performs better than the PSO, BA, ALO, DA, GOA and CGOA on two types multimodal benchmark functions.
Tables 25, 26, 27, 28, 29 and 30, the CPU time and the allocated memory are increased due to the changing of iterate numbers and population size. The conclusions are consistent with the above.
5 Conclusion
In this paper, the GOA is modified by incorporating it with principal component analysis and novel inertia weight. The proposed PCA–GOA is assessed on 23 benchmark functions with different number of iterations and population sizes. The experiments results show that the proposed PCA–GOA is much better than PSO, BA, ALO, DA, basic GOA and CGOA in most test cases. In the PCA–GOA, combing with the two strategies leads the CPU time and allocated memory rise. However, the increasing computation amount is limited.
For some cases, the PCA–GOA falls into local best solutions, and this is the biggest issue requires to be resolved in the future. Furthermore, the PCA–GOA is planned to solve some engineering problems.
References
Shehab M, Khader AT, Laouchedi M et al (2018) Hybridizing cuckoo search algorithm with bat algorithm for global numerical optimization. J Supercomput 1–28
Nouiri M, Bekrar A, Jemai A et al (2018) An effective and distributed particle swarm optimization algorithm for flexible job-shop scheduling problem. J Intell Manuf 29(3):603–615
Chen X, Xu B, Mei C et al (2018) Teaching–learning-based artificial bee colony for solar photovoltaic parameter estimation. Appl Energy 212:1578–1588
Payne A, Avendaño-Franco G, Bousquet E et al (2018) Firefly algorithm applied to noncollinear magnetic phase materials prediction. J Chem Theory Comput 14(8):4455–4466
Kaveh A, Zakian P (2018) Improved GWO algorithm for optimal design of truss structures. Eng Comput 34(4):685–707
Sun Y et al (2018) A modified whale optimization algorithm for large-scale global optimization problems. Expert Syst Appl 114:563–577
Holland John H (1992) Genetic algorithms. Sci Am 267(1):66–73
Eberhart R, Kennedy J (1995) A new optimizer using particle swarm theory. In: Proceedings of the Sixth International Symposium on Micro Machine and Human Science, 1995. MHS’95. IEEE, pp 39–43
Dorigo M, Di Caro G (1999) Ant colony optimization: a new meta-heuristic. In: Proceedings of the 1999 Congress on Evolutionary Computation-CEC99 (Cat. No. 99TH8406). IEEE, vol 2, pp 1470–1477
Karaboga D (2005) An idea based on honey bee swarm for numerical optimization. Technical report-tr06, Erciyes University, Engineering Faculty, Computer Engineering Department
Yang XS (2009) Firefly algorithms for multimodal optimization. In: International Symposium on Stochastic Algorithms. Springer, Berlin, pp 169–178
Yang XS, Deb S (2009) Cuckoo search via Lévy flights. In: World Congress on Nature and Biologically Inspired Computing, 2009. NaBIC 2009. IEEE, pp 210–214
Rashedi E, Nezamabadi-Pour H, Saryazdi S (2009) GSA: a gravitational search algorithm. Inf Sci 179(13):2232–2248
Yang XS (2010) A new metaheuristic bat-inspired algorithm. In: Nature Inspired Cooperative Strategies for Optimization (NICSO 2010). Springer, Berlin, pp 65–74
Mirjalili S, Mirjalili SM, Lewis A (2014) Grey wolf optimizer. Adv Eng Softw 69:46–61
Mirjalili S (2015) Moth-flame optimization algorithm: a novel nature-inspired heuristic paradigm. Knowl Based Syst 89:228–249
Riganati John P, Schneck Paul B (1984) Supercomputing. Computer 10:97–113
Garcia C et al (2013) Multi-GPU based on multicriteria optimization for motion estimation system. EURASIP J Adv Signal Process 2013.1, p 23
Wei K-C, Wu C, Wu C-J (2013) Using CUDA GPU to accelerate the ant colony optimization algorithm. In: 2013 International Conference on Parallel and Distributed Computing, Applications and Technologies. IEEE
Saremi S, Mirjalili S, Lewis A (2017) Grasshopper optimisation algorithm: theory and application. Adv Eng Softw 105:30–47
Aljarah I, Ala’M AZ, Faris H et al (2018) Simultaneous feature selection and support vector machine optimization using the grasshopper optimization algorithm. Cognitive Comput, pp 1–18
Zhang X, Miao Q, Zhang H et al (2018) A parameter-adaptive VMD method based on grasshopper optimization algorithm to analyze vibration signals from rotating machinery. Mech Syst Signal Process 108:58–72
Wu J, Wang H, Li N et al (2017) Distributed trajectory optimization for multiple solar-powered UAVs target tracking in urban environment by Adaptive Grasshopper Optimization Algorithm. Aerosp Sci Technol 70:497–510
Hekimoğlu B, Ekinci S (2018) Grasshopper optimization algorithm for automatic voltage regulator system. In: 2018 5th International Conference on Electrical and Electronic Engineering (ICEEE). IEEE, pp 152–156
Łukasik S, Kowalski PA, Charytanowicz M et al (2017) Data clustering with grasshopper optimization algorithm. In: 2017 Federated Conference on Computer Science and Information Systems (FedCSIS). IEEE, pp 71–74
Lal DK, Barisal AK, Tripathy M (2018) Load frequency control of multi area interconnected microgrid power system using grasshopper optimization algorithm optimized fuzzy PID controller. In: 2018 Recent Advances on Engineering, Technology and Computational Sciences (RAETCS). IEEE, pp 1–6
Fathy A (2018) Recent meta-heuristic grasshopper optimization algorithm for optimal reconfiguration of partially shaded PV array. Sol Energy 171:638–651
Arora S, Anand P (2018) Chaotic grasshopper optimization algorithm for global optimization. Neural Comput Appl, pp 1–21
Ewees AA, Elaziz MA, Houssein EH (2018) Improved grasshopper optimization algorithm using opposition-based learning. Expert Syst Appl 112:156–172
Saxena A, Shekhawat S, Kumar R (2018) Application and development of enhanced chaotic grasshopper optimization algorithms. Model Exp Eng 2018:4945157
Liang H, Jia H, Xing Z et al (2019) Modified Grasshopper algorithm based multilevel thresholding for color image segmentation. IEEE Access 7:11258–11295
Luo J, Chen H, Xu Y et al (2018) An improved grasshopper optimization algorithm with application to financial stress prediction. Appl Math Model 64:654–668
Johnson RA, Wichern DW (2005) Applied multivariate statistical analysis, 6/E. Technometrics 47(4):517–517
Zhao X, Lin W, Zhang Q (2014) Enhanced particle swarm optimization based on principal component analysis and line search. Appl Math Comput 229:440–456
Cui Z, Li F, Zhang W (2018) Bat algorithm with principal component analysis. Int J Mach Learn Cybern 10(3):603–622
Yao X, Liu Y, Lin G (1999) Evolutionary programming made faster. IEEE Trans Evol Comput 3(2):82–102
Digalakis JG, Margaritis KG (2001) On benchmarking functions for genetic algorithms. Int J Comput Math 77(4):481–506
Molga M, Smutnicki C (2005) Test functions for optimization needs. http://www.robermarks.org/Classes/ENGR5358/Papers/functions.pdf
Yang XS (2010) Firefly algorithm, stochastic test functions and design optimisation. arXiv preprint arXiv:1003.1409
Mirjalili S (2015) The ant lion optimizer. Adv Eng Softw 83:80–98
Mirjalili S (2016) Dragonfly algorithm: a new meta-heuristic optimization technique for solving single-objective, discrete, and multi-objective problems. Neural Comput Appl 27(4):1053–1073
Wilcoxon F (1945) Individual comparisons by ranking methods. Biom Bull 1(6):80–83
García S, Molina D, Lozano M et al (2009) A study on the use of non-parametric tests for analyzing the evolutionary algorithms’ behaviour: a case study on the CEC’2005 special session on real parameter optimization. J Heuristics 15(6):617
Acknowledgements
This paper is supported by Jilin Province Science and Technology Department Foundation of China under Grant No. 2017-00005000605, Research on Visual Inspection System of Industrial Robot for Car Stamping Parts.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Yue, X., Zhang, H. Grasshopper optimization algorithm with principal component analysis for global optimization. J Supercomput 76, 5609–5635 (2020). https://doi.org/10.1007/s11227-019-03098-9
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11227-019-03098-9