SUGISAKAMASANORI

Journal of Advances in Artificial Life Robotics
Vol. 4(1); June (2023), pp. 20–26
ON LINE ISSN 2435-8061; ISSN-L 2435-8061
https://alife-robotics.org/jallr.html

Research Article

Design and Application of Enhanced Grey Wolf Optimizationbased Support Vector Machine
Yi Zhao1, Qunpo Liu1,2, Hui Wang1, Yuxi Zhao1

School of Electrical Engineering and Automation, Henan Polytechnic University, 2001 Century Avenue, Jiaozuo, (454003), Henan, China
Henan International Joint Laboratory of Direct Drive and Control of Intelligent Equipment, Jiaozuo 454000, China

1
2

ARTICLE INFO
Article History
Received 10 October 2022
Accepted 31 August 2023
Keywords
Apple external quality assessment
Enhanced Grey wolf optimization arithmetic IGWO
Support vector machine
Reference function
IGWO-SVM

ABSTRACTAn enhanced variant of the Grey Wolf Optimization (GWO) algorithm, known as the Improved
Grey Wolf Optimization (IGWO), was introduced with the primary objective of improving the
precision of apple's external quality assessment categorization using Support Vector Machine(SVM) as the underlying classifier.The IGWO algorithm incorporates several enhancements,
including the utilization of Logistic chaos mapping, a nonlinear convergence factor, and Cauchy
variation. Initially, diverse benchmark functions were employed to assess the efficacy of the
IGWO methodology. The experimental outcomes demonstrated that the IGWO method
significantly enhanced both the rate of convergence and precision. Subsequently, an image
processing approach was employed to capture the exogenous characteristics of apples, which werethen utilized as the dataset. The IGWO method was employed to fine-tune the regularization
parameters and kernel parameters in the SVM, resulting in the optimal IGWO-SVM classification
model. Finally, a comparative analysis was conducted between the classification results obtained
from SVM, GMO-SVM, and IGWO-SVM. The findings revealed that the IGWO-SVM model
achieved the peak accurate classification performance, surpassing the other methods.

© 2022 The Author. Published by Sugisaka Masanori at ALife Robotics Corporation Ltd.
This is an open access article distributed under the CC BY-NC 4.0 license(http://creativecommons.org/licenses/by-nc/4.0/).

impressive accuracy rate of 92.5%. Liang [2] targeted
the classification of wheat grains, extracted thecharacteristics of wheat grains by digital image
processing, and used hierarchical classification method
and membership function method to classify wheat
grains with his 93% accuracy. Lee et al. [3] used image
processing techniques to extract the features of apples
through computer vision technology. They then applieda backpropagation artificial neural network for accurateclassification and achieved a remarkable classification
accuracy of 92.5%. Xiaqing et al. [4] utilized an
improved algorithm of particle swarm optimization to
train a least squares support vector machine (LS-SVM)
for apple classification. Experimental results showed him
an amazing accuracy of over 96% in classifying apples.
Li Xujun et al. [5] introduced a new apple classification
algorithm that integrates a discriminant tree Analysis
with an enhanced decision-making approach using

1. Introduction
Apples are the fruit with the largest planted area in China,
making it an important fruit industry. However, if thequality is uneven, it cannot be advanced. Currently, apple
classification is mainly done manually. However, thisapproach is based on individual subjectivity, and ischaracterized by reduced classification efficiency andlimited classification accuracy. Therefore, adopting
effective scientific and technical methods for apple
classification is of great importance and value in research.
In the agricultural field, there has been remarkableprogress and development in image processing
technology and machine vision, and their use isremarkable. Li [1] introduced a multi-feature integration
approach with a decision-integration method for apple
classification using D-S evidence theory and achieved an

Corresponding author’s E-mail: lqpny@hpu.edu.cn, 1535164487@qq.com, 1694881860@qq.com, 212007010029@home.hpu.edu.cn
URL: www.hpu.edu.cn

20

support vector machines (SVM). The results
demonstrated the feasibility, with classification accuracy
greater than 98%. These results highlight that the
proposed approach is effectively applicable to apple
classification. Zhao Liping et al. [6] proposed an apple
classification method that combines wavelets and fuzzyalgorithms, and the classification accuracy of thealgorithm reached over 97% in three stages of apple
classification, indicating that this algorithm can be used
for apple classification detection. certified. Li Wenqi etal. [7] presented a convolutional neural network based
apple classification algorithm. Using the DF model heclassified three grades of apples and showed aclassification accuracy of 97%. He Jinrong et al. [8]proposed his DXNet model for apple appearanceclassification based on deep learning. Experimental
results reveal that the classification accuracy of the
proposed algorithm is 97.84%. This paper, based on
previous work, addresses the challenge of poor apple
classification accuracy when using support vector
machines (SVMs), improves his IGWO with the aim ofincreasing apple classification accuracy, and uses support
vectors Optimized machine (SVM) parameters.
Analysis with an enhanced decision-making approach
using support vector machines (SVM). The results
demonstrated the feasibility, with classification accuracy
greater than 98%. These results highlight that the
proposed approach is effectively applicable to apple
classification.

(3)

C = 2r2(4)

a= 2 −

2t
tmax

(5)

The mathematical formulation for individual hunting
behavior in the Grey Wolf algorithm is like Eqs: (6)-(8)(6)
Dα =C1 ⋅ X α (t ) − X i (t )Dβ =C2 ⋅ X β (t ) − X i (t )

(7)

Dδ =
C3 ⋅ X δ (t ) − X i (t )(8)in the equation, Dα , Dβ and Dδ denote the distances
between the individuals α , β and δ respectively.
X α (t ) , X β (t ) and X δ (t ) depict the prevailingcoordinates of α , β , and δ correspondingly; C1 , C2 , C3

are probabilistic vectors;

2. Standard The Canonical Algorithm of Grey
Wolf OptimizationX=
X α (t + 1)= X α (t ) − A1 ⋅ Dα
1

(9)

X=
X β (t + 1)= X β (t ) − A2 ⋅ Dβ
2

(10)

X=
X δ (t + 1)= X δ (t ) − A3 ⋅ Dδ3

(11)

X + X2 + X3
X i (t + 1) =1
3(12)In Eqs, (9)-(11), X 1 , X 2 and X 3 respectively represent the
updated positions of α , β , and δ after guiding ω . In
Eq. (12), X i (t + 1) represents the updated position of ω ,The Grey Wolf Optimization (GWO) method, as
described in reference [9], is an optimization algorithm
that emulates the predatory behavior of grey wolves. In
this algorithm, wolves are categorized into four ranks
based on their fitness values. The grey wolf exhibiting
the highest fitness value is denoted as α , the runner-up
wolf is β , the third- ranked wolf is δ , and the residual
wolf is ω . In the process of capturing prey, the threewolves denoted as α , β and δ ach possessing thehighest fitness value, will be prioritized for preying
pursuits, while the remaining wolves ω will follow the
first three wolves α , β and δ to attack, and the final prey
position is the solution of the optimized target.
The representation of the Grey Wolf algorithm forencircling prey is depicted by Eqs. (1)-(5):(1)
D =⋅C X p (t ) − X i (t )X i (t +=1) X p (t ) − A ⋅ D=
A 2ar1 − awhich corresponds to the optimal outcome of theoffspring grey wolf progeny.
3. Improved Enhanced Grey Wolf Optimization
Arithmetic
3.1. Logistic chaos system
In grey wolf algorithm, the initialization of grey wolf
pack is generally randomly generated. This may lead to a
non-uniform distribution of the population within thesolution space, subsequently impacting the algorithm's
convergence speed and the time required to locate theoptimal solution. Logistic chaos mapping [10] is anirregular chaotic movement with the advantages ofrandomness and ergodicity. Incorporating Logistic
chaotic mapping as a substitute for Stochastic
initialization in the Grey Wolf algorithm enhances the

(2)

21

To mitigate the risk of the algorithm getting trapped inlocal optima, the improved Grey Wolf algorithm
incorporates Cauchy variation [11]. And the Cauchy
distribution features are: Ends with a long tail, this
distribution makes individuals have a higher probabilityof jumping to a better position, jump out of local optimal,zero the center peak is small, smooth from the trend of
the peak dropped to zero for the current generation of the
optimal solution of Cauchy mutation, increase species
diversity and richness, improve the understanding of thesearch space and improve the algorithm's propensity toescape local optima solution of probability, The variation
formula is expressed as Eq. (15) in the algorithm.
(15)
X (φ=
+ 1) X best (φ) + C (0,1) ⊕ X best (φ)

uniform dispersion of the initial population, thereby
augmenting the algorithm's capacity for global search.
The equation denoting the Logistic chaos mapping ispresented as Eq. (13):(13)
X n +1 = X n × μ × (1 − X n ), μ ∈ [ 0, 4] , X ∈ [ 0,1]
3.2. Enhancement of the nonlinear convergencefactorWithin the Graywolf algorithm, the convergence factor
linearly decreases within the range of [0, 2]. However, inthe enhanced Grey Wolf algorithm, a nonlinear
convergence factor is employed, as exemplified by Eq.
(14), to augment the algorithm's search capability. The
improved convergence factor progressively decreases ina linear fashion as the amount of iterations increases from0 to 2. As depicted in Fig.1, during the initial iterations,the enhanced astringent factor exhibits a decreased
convergence rate when compared to the originalalgorithm. This modification aims to facilitate theidentification of the optimal solution across the entire
search space. Towards the end of the iteration process,the convergence factor accelerates, leading to anincreased rate of convergence. This acceleration
enhances the accuracy of searching for local optimal
solutions.
t

2 − 2(a=1
× (e tmax − 1))e −1

where, X best (φ) is the global optimal of generation

φ ;The value C (0,1) corresponds to the standard Cauchy
distribution.
3.4. Algorithm implementation process
The improved Grey Wolf algorithm follows thefollowing steps:(ⅰ) Algorithm parameter setting: set the count of wolves
N, the parameters to consider include the dimensionalityof the exploration domain (D), the upper limit of iteration
cycles (Max), and the upper and lower limits of the
exploration domain.
(ⅱ) Initial population: The initial population is generatedusing Logistic chaos mapping, ensuring a uniform
distribution.;(ⅲ) The fitness function of each wolf was evaluated, andthe grey wolf with the highest fitness value was identified
as α , the second-ranking wolf was β , the third-ranking
wolf was δ , and the remaining individual of the wolf
population was ω . The corresponding positions X α , X β
and X δ were determined；(ⅳ) According to Eq. (15), cauchy variation is performedon the placement of the optimal grey wolf individual in
the current wolf pack;(ⅴ) In accordance with the nonlinear convergence factor
introduced within this research, the parameters arecalculated, and the values of A and C are calculated
according to Eq. (3) and (4);(ⅵ) According to Eqs. (6)-(8), the individual positions of
the population are updated, the fitness is recalculated, andthe values of α , β and δ are updated;(ⅶ) Verify if the iteration count has reached its upper(14)2a)Standard convergence factor

1.8b)Improved convergence factor

1.6

1.4

The number of iterations

1.2

1

0.8

0.6

0.4

0.2

0
0

50

100

150

200

250

300

350

400

450

500

Convergence factor

Fig. 1 Nonlinear convergence coefficient3.3. Introduction of Cauchy Perturbation
During the Quest for the optimal solution in the Grey
Wolf algorithm, individuals within the population
gradually converge towards individuals with superior
fitness as the iteration count increases. This phenomenon
results in a reduction in population diversity, potentiallycausing the algorithm to become trapped in local optima.
22

Wolf algorithm. Four standardized evaluation functions
are selected for conducting simulation experiments.
Table 1 presents the details of the standard test functions
used in the experiments. Among these attributes, F1 andF2 exhibit unimodal characteristics, whereas F3 and F4
demonstrate multimodal attributes. The experimental
setup involved an Intel(R) Core(TM) i5-8300H CPU @2.30GHz processor, 16GB of RAM, and Matlab2018b
software.

limit.If the condition is met, terminate the iteration
process and output the optimal solution. Otherwise,
return (ⅲ) and continue to next;
3.5. Improved grey Wolf algorithm test
In order to validate the effectiveness of the proposed
methodology, a comprehensive comparative study is
performed in comparison with the conventional Grey

Table 1 Benchmark function

Capability nameCapability formula

Spheroidal

f1 ( x) = ∑ X i 2

Dim.

Realm

30

[-100,100]

30[-10,10]30[-32,32]30[-600,600]

n

i =1

f=
2 ( x)

Schwefel2.22nn∑ x +∏ x
i =1

i

i =1

i

1 n 2
1 n
xi ) − exp( ∑ cos(2πxi ) + 2∑
n i 1=
ni1=

Ackley−20 exp(−0.2f9 ( x) =Griewank

f10 ( x) =x
1 n 2 nxi − ∏ cos i + 1∑
4000 i =1i
i =1convergence curve. In terms of both unimodal functions
F1 and F2, as well as multimodal functions F3 and F4,
the Improved Grey Wolf Optimization (IGWO)
algorithm consistently outperforms other algorithms suchas Particle Swarm Optimization (PSO) [12], Moth Flame
Optimization (MFO) [13], and standard Grey Wolf
Optimization (GWO) in terms of performance.

Average value and standard deviation are used to test theperformance of the algorithm. Average value can reflect
the accuracy achieved by the algorithm. The standard
deviation can serve as an indicator of the arithmetic 's
stability. It measures the dispersion or variability of thealgorithm's performance. Table 2 presents theexperimental results, while Fig. 2 displays the

Table 2 Comparative analysis of outcomes from various algorithms

Function

PSO

MFO

GWO

IGWO

AVE

STD

AVE

STD

AVE

STD

AVE

STD

F1

3.14e-2

9.44e-2

3.57e-3

2.31e-3

4.19e-23

1.02e-22

8.21e-41

2.28e-41F22.00e-3

2.67e-3

1.88e-3

6.85e-3

3.12e-28

2.34e-27

7.85e-47

8.72e-46

F3

2.23e-1

3.02e-2

3.69e-3

5.43e-3

1.74e-16

1.02e-15

4.63e-17

2.53e-16F4

2.72e+01.68e+0

6.18e-2

1.58e-2

2.94e+1

1.12e+01.39e-10

7.51e-1023

Objective function value

10-40

10

10-10
10-20
-30

10

10-5

10-10

10-60

0

300
400
100
200
The number of iterations(a) Spheroidal

500

10-50

0

100
200
300
400
The number of iterations

10-15

500

(b) Schwefel2.22

10-5

10-10

10-15

10-40

10-80

GWO
PSO
MFO
IGWO

100

100

0

10-20

105

GWO
PSO
MFO
IGWO

GWO
PSO
MFO
IGWO

1010

Objective function value

Objective function value

100

105

1020

GWO
PSO
MFO
IGWO

Objective function value

1020

0

100
200
300
400
The number of iterations

500

10-20

(c) Ackley

0

100
200
300
400
The number of iterations

500(d) Griewank

Fig. 2 Convergence profiles of GWO, PSO, MFO, and IGWO on benchmark evaluation functions.
4.

 x − xi 2 
, xi ) exp −k ( x=
2σ 2 
Parameter optimization of support vector
machineSupport Vector Machine (SVM) [14] is a overseenclassification methodology known for its efficacy inhandling nonlinear classification problems. The principleof support vector machine can be simply described asfollows: use the hyperplane to separate points of different
categories in the data set on both sides, and ensure thatthe points on both sides are as far away from the points
on the hyperplane as possible. The separated hyperplaneis:In Eq. (18), σ is the kernel function optimization
parameter; Selecting proper kernel function σ andparameter C has significant influence on improving theaccuracy of apple classification.
5. Apple grading data set
In this paper, a total of 306 apple samples were tested,
and image processing method was used to extract the size,
color and roundness of apples as data sets. According torelevant literature and the requirements of national
standards GB/T10651-2008 and DB21/T1426-2006,
apples are divided into three grades, and the specificparameters are shown in Table 3 below: Among them,apples with fruit diameter greater than 80mm, red color
accounting for more than 90%, and roundness greaterthan 0.85 are special fruits, and their label is set to 1.
Apples with fruit diameter between 70mm and 80mm,
red accounting for more than 80% and roundness
between 0.8-0.85 are first-class fruits, and the gradinglabel is set as 2. Apples with fruit diameter less than
70mm, red proportion less than 80% and roundness lessthan 0.8 are considered as second-class apples. Set thelabel to 3. First, SVM algorithm was used forclassification, then GMO-SVM was used forclassification, and finally, IGWO-SVM was optimizedby the improved grey wolf algorithm for comparison.

wT x + b =0(16)
In Eq. (16), w refers to the column vector thatindicates the orientation of the hyperplane, while b
represents the offset term denoting the distance
between the hyperplane and the origin. If the data islinearly non-separable, soft interval edge is used todescribe:m1
2
w + C ∑ μi
min
w ,b 2i =1
 s.t. y ( wT x + b) ≥ 1 − μ , μ ≥ 0, i =1, 2,...m
i
i
i
i


(18)

(17)

In Eq. (17), μi represents the slack variable; C is theregularization coefficient, which depicts the penalty
degree of the wrong sample segmentation, and its
parameter affects the precision of SVM segmentation. In
order to solve the ability of support vector machine toprocess nonlinear data, radial basis kernel function is
introduced. For Gaussian kernel function:

24

Table 3 Apple grading standards
Level

Fruit diameter

Maturity3

Circularity

2.8

>80mm

>90%

>0.85

2.6

70mm-80mm>80%0.8-0.85

2.4

Second-class

<70mm

<80%

<0.8

Category label

SpecialFirst class

6. Results

Actual test set classification
Predictive test set classification

2.2
2
1.8
1.6

To validate the classification capability of the proposed
IGWO-SVM algorithm, a series of classification
experiments were conducted, comparing it with otheralgorithms such as SVM, GMO-SVM. The classification
results of experimental test sets are shown as follows:

1.4
1.2
1

0

10

20

30

Test set sample

40

50

60

Fig.4 Results of grading using GMO-SVM

3
Actual test set classification
Predictive test set classification

2.8

3

2.6

2.4

2

Category label

Category label

2.6

2.2

1.8
1.6
1.4

2.2
2
1.8
1.6

1.2
1

Actual test set classification
Predictive test set classification

2.8

2.4

1.4

0

10

20

30

Test set sample

40

50

60

1.2
1

Fig.3 Results of classification using SVM

As shown in Fig. 3, the SVM algorithm without
optimization achieved 49 correct classifications,
resulting in a classification accuracy of 81.66%. Amongthem, the accuracy of characteristic fruit classification is75%, the accuracy of first-grade fruit classification is85%, and the accuracy of second-grade fruitclassification is 85%. The classification accuracy is low.
Following the optimization of the Support Vector
Machine using the Grey Wolf Algorithm, the accuracy
has been significantly improved. As depicted in Fig. 4,
the test set demonstrates a classification accuracy of 90%.
Furthermore, the accuracy for the first-class fruit
category stands at 85%, while the accuracy for thesecond-class fruit category reaches 100% and theaccuracy for the third-class fruit category reaches 85%.
The appliance of the improved Grey Wolf algorithm for
optimizing the Support Vector Machine (SVM) resulted
in a remarkable accuracy of 98.33%, as illustrated in Fig.
5. This outcome successfully achieved the desired
objective of apple classification.

0

10

20

30

Test set sample

40

50

60

Fig.5 Results of IGWO-SVM classification
7. Conclusion
To address the limitations of slow convergence andsusceptibility to local optima in the basic Grey Wolf
Optimization (GWO) algorithm, this study presents anenhanced approach called the Improved Grey Wolf
Optimization (IGWO) algorithm. Building upon thefoundation of the GWO algorithm, the IGWO algorithm
incorporates additional components, including logisticchaos mapping, a factor contributing to non-linear
convergence, along with the Cauchy variation, toenhance its performance. Through comprehensive
simulation experiments conducted on four benchmark
evaluation functions and in comparison with the PSO,
MFO, and GWO algorithms, the findings indicate that the
IGWO methodology achieves significantly improved
precision in enhancing the performance on the test
functions. Moreover, the IGWO algorithm exhibits
enhanced optimization performance in terms ofrobustness and capability to rapidly escape local optima.
25

Furthermore, the IGWO algorithm is utilized to optimize
the penalty parameters and kernel parameters within the
Support Vector Machine (SVM) framework, specificallytailored for apple classification. The experimental results
demonstrate a remarkable accuracy rate of 98.3% for the
IGWO-SVM model.

Authors Introduction
Mrs. Yi Zhao

References[1]

Li Xianfeng, ZHU Weixing, Hua Xiaopeng, KONG
Lingdong. Transactions of the Chinese society for
agricultural machinery,2011, 42(06):188-192.
[2] Liang L. Research on wheat grain grading technology
based on improved ANALYTIC Hierarchy Process [D].
Agricultural University of Hebei, 2013.
[3] Xiaoling, L.and Y. Jimin. Detection Level of Apple
Based on BP Neural Network. 2015: Atlantis Press.
[4] Xia Qing, Li Xianfeng. Apple Classification Detection
Based on improved PSO Algorithm and LS-SVM [J].
Computer and Modernization, 2012.
[5] Li Xuejun, Cheng Hong. Research on key technology ofapple classification detection based on decision fusion.
Food & Machinery, 2020, 36(12):5.
[6] Yao Y, Ma J. Logical chaotic resonance in a bistablesystem[J]. International Journal of Bifurcation and Chaos,
2020, 30(13): 2050196.
[7] Jarlebring E. Convergence factors of Newton methods fornonlinear eigenvalue problems[J]. Linear algebra and its
applications, 2012, 436(10): 3943-3953.
[8] Chiang H D, Chu C C. A systematic search method for
obtaining multiple local optimal solutions of nonlinear
programming problems[J]. IEEE Transactions on Circuits
and Systems I: Fundamental Theory and Applications,
1996, 43(2): 99-109.
[9] Yang J H, Zhao X L, Mei J J, et al. Total variation andhigh-order total variation adaptive model for restoring
blurred images with Cauchy noise[J]. Computers &Mathematics with Applications, 2019, 77(5): 1255-1272.
[10] Mirjalili S, Mirjalili S M, Lewis A. Grey wolf
optimizer[J]. Advances in engineering software, 2014,
69: 46-61.
[11] Wang H, Hu D. Comparison of SVM and LS-SVM forregression[C]//2005 International conference on neuralnetworks and brain. IEEE, 2005, 1: 279-283.
[12] Clerc M. Particle Swarm Optimization[M]. Springer
International Publishing, 2016.
[13] Li X Y, LI Y. Study on eggshell quality recognition ofpoultry eggs based on sample entropy and MFO-SVM [J].
Journal of Chinese agricultural mechanization,
2019,40(05):133-139.
[14] Zamri, Mohd Iz'aan Paiz et al. “Wood Species
Recognition System based on Improved Basic Grey Level
Aura Matrix as feature extractor.” J. Robotics Netw. Artif.
Life 3 (2016): 140-143.

Dr. Qunpo Liu

Dr. Hui Wang

Dr. Yuxi Zhao

26

She
graduatedfrom
Zhengzhou
University of Economics and Business(China) in 2022 with a bachelor's degree
in rail transit signal and control. She iscurrently studying for a master's degree inelectronic
information
at
Henan
Polytechnic University. She is mainly
engaged in research on image processing
and target detection.

He graduated from the Muroran Instituteof Technology (Japan) with a Ph.D. in
Production Information Systems. He is
an associate professor at the School ofElectrical Engineering at Henan
Polytechnic University (China) and amaster's tutor. He is mainly engaged inteaching and research work in robotics,
intelligent instruments and machine
vision.

He graduated from Henan Polytechnic
University (China) in 2022 with abachelor's degree in automation. He iscurrently studying for a master's degree
in electronic information at Henan
Polytechnic University. He is mainly
engaged in research on image processing
and target detection.

He graduated from Henan Institute ofEngineering with a bachelor's degree inElectrical Engineering and Automationin 2019. Graduate student of Henan
Polytechnic University (China), his
research interest covers machine visionand image processing.