# K-Means Segmentation of Underwater Image Based on Improved Manta Ray Algorithm

Authors: Donglin Zhu; Linpeng Xie; Changjun Zhou
Journal: Computational Intelligence and Neuroscience
 (2022)

---

## Abstract

Image segmentation plays an important role in daily life. The traditional K-means image segmentation has the shortcomings of randomness and is easy to fall into local optimum, which greatly reduces the quality of segmentation. To improve these phenomena, a K-means image segmentation method based on improved manta ray foraging optimization (IMRFO) is proposed. IMRFO uses Lévy flight to improve the flexibility of individual manta rays and then puts forward a random walk learning that prevents the algorithm from falling into the local optimal state. Finally, the learning idea of particle swarm optimization is introduced to enhance the convergence accuracy of the algorithm, which effectively improves the global and local optimization ability of the algorithm simultaneously. With the probability that K-means will fall into local optimum reducing, the optimized K-means hold stronger stability. In the 12 standard test functions, 7 basic algorithms and 4 variant algorithms are compared with IMRFO. The results of the optimization index and statistical test show that IMRFO has better optimization ability. Eight underwater images were selected for the experiment and compared with 11 algorithms. The results show that PSNR, SSIM, and FSIM of IMRFO in each image are better. Meanwhile, the optimized K-means image segmentation performance is better.


---

## Body

## 1. Introduction

In recent years, image segmentation has attracted much attention and research by researchers. It is of great significance to the future image processing field. As a key step of image processing, image segmentation plays an important role in extracting objects of interest from images. At present, it has important research value in medicine, agriculture, ocean, and other fields. Image segmentation can be divided into four categories: threshold segmentation, region segmentation, edge segmentation, and segmentation methods based on specific theories. The clustering algorithm is a typical unsupervised learning algorithm. It uses the idea of clustering differentiation to solve the problem. The way to solve the problem is simple and easy to understand. It has been successfully applied in many fields [1]. Cluster image segmentation has also been successfully studied. K-means is the most common and easiest clustering method among them, but K-means has the disadvantage of large randomness and easily fall into local optimum, which makes it impossible to control the cluster center reasonably. Swarm intelligence algorithms is an algorithm with global optimization performance and strong versatility that is suitable for parallel processing. This type of algorithm can find the optimal solution or approximate the optimal solution within a certain period of time. [2] Intelligent optimization algorithm opens up a new way for image segmentation. In terms of clustering segmentation, Hrosik R C and others improved the K-means clustering algorithm based on the firefly algorithm, which could achieve better segmentation average error, peak signal-to-noise ratio, and structural similarity index on medical images; [3] Li h and others proposed a k-means clustering algorithm based on dynamic particle swarm optimization (DPSO), which had better visual effect than traditional K-means clustering in image segmentation and obvious advantages in improving image segmentation quality and efficiency; [4] Shubham and others applied gray wolf optimizer (GWO) [5] to the segmentation of satellite images; [6] Therefore, an intelligent optimization algorithm is of great significance in the field of image segmentation.With the rapid development of swarm intelligence algorithms, a variety of new algorithms are emerging. In addition to the algorithms mentioned above, there are other algorithms as follows: monarch butterfly optimization (MBO) [7], elephant herding optimization (EHO) [8], moth search (MS) algorithm [9], Harris hawks optimization (HHO) [10], etc. Manta ray foraging optimization (MRFO) is a new swarm intelligence optimization algorithm proposed in 2020. With excellent searchability, fewer parameters, simple model and easily understood, it is better than particle swarm optimization (PSO) [11, 12], genetic algorithm (GA) [13, 14], Differential Evolution (DE) [15, 16], Cuckoo Search (CS) [17], gravitational search algorithm (GSA) [18], and ABC [19] in some function optimization [20], and it has been successfully applied to solar energy [21, 22], ECG [23], generator [24, 25], power system [26], cogeneration energy system [27], geophysical inversion problem [28], directional overcurrent relay [29], feature selection [30], hybrid energy system [31], and sewage treatment [32]. Although MRFO has good optimization ability, it still has its own defects. In complex problems, the search ability is limited and the diversity of the population can not be guaranteed. The main reason is that the individual searches orderly, highly dependently, and inflexibly.At present, researchers have noticed this point and carried out successive studies, such as Mohamed Abd Elaziz, who combines fractional calculus with MRFO to correct the direction of manta ray movement. This algorithm has been verified by CEC 2017 test function and is applied to image segmentation problems with good feasibility [33]. Mohamed H. Hassan combines a gradient optimizer with MRFO to reduce the probability that the algorithm will fall into a local optimum, which has a good effect in single-objective and multiobjective economic emission scheduling [34]. Haitao Xu uses adaptive weighting and chaos to improve MRFO, so as to efficiently handle thermodynamic problems [35]. Essam H. Houssein uses reverse learning to initialize the population so as to increase the diversity of the population and apply it to the threshold image segmentation problem with good segmentation quality [36]. Bibekananda Jena adds an attack capability to MRFO, which allows it to jump out of local optimization and find a globally optimal solution. It is then applied to the image segmentation problem of 3D Tsallis [37]. Mihailo Micev fuses Simulate Anneal (SA) with MRFO and applies it to the Proportional Integral Derivative (PID) controller. The fused algorithm is superior to other algorithms [38]. In addition, Serdar and others adopt opposition-based learning and SA to improve the convergence effect of MRFO. It has better control performance when applied to fractional order proportional integral derivative (FOPID) controller [39]. Although the currently proposed variants of MRFO have achieved some results, the following problems still exist:(1)
Most scholars use the fusion of other algorithms to improve the search ability, but this will bring higher time complexity, and the algorithm after fusion may not be able to complement each other so as to present perfect results.(2)
Reverse learning can only solve inversely in a certain space, but in complex high-dimensional situations, there are fewer individual optimization methods, and they cannot jump out of the local optimal state perfectly.(3)
In the optimization process, the above algorithm cannot completely balance the local search and global search capabilities, which results in insufficient convergence accuracy of the algorithm.Based on the above analysis, this paper presents an improved algorithm for manta rays, which uses random walk learning to make individuals wander randomly in space, to increase the diversity of the population, and avoid premature convergence of the algorithm, and then we use Lévy flight for long-distance and short-distance searches to balance the local and global searches of the algorithm. Finally, the learning idea of particle swarm is introduced. Two learning factors are used to improve the convergence accuracy of the algorithm 12 functions are used to verify the validity and feasibility of IMRFO. Then eight underwater image datasets are used in K-means image segmentation. The results show that IMRFO has better generalization ability and better segmentation quality.The innovations and contributions of this paper are as follows:(i)
A random walk learning algorithm is designed to increase the diversity of the population and reduce the probability of the algorithm falling into local optimization to a certain extent.(ii)
Lévy flight and learning factors are introduced to balance the searchability of the algorithm, which makes the algorithm have a good convergence effect.(iii)
In 12 standard test functions, IMRFO is compared with 7 other algorithms to show its superiority and feasibility. Next, two statistical tests are used to emphasize the optimization performance of the algorithm. It is compared with the recently proposed variants of the algorithm. Finally, ablation experiments were performed, all the results show that IMRFO has a good search ability.(iv)
IMRFO is applied to K-means underwater image segmentation. The results of 11 algorithms show that IMRFO performs well.The structure of this paper is as follows: Section2 introduces the basic MRFO algorithm, Section 3 introduces the improved IMRFO algorithm and related analysis. Section 4 describes the process of IMRFO optimizing K-means image segmentation. Section 5 tests the performance of IMRFO and compares the related algorithms. Section 6 describes and analyses the performance of each algorithm in K-means image segmentation. Section 7 summarizes the experimental results of this paper. The last section expresses the advantages and disadvantages of IMRFO and future research directions.


## 2. Manta Ray Foraging Optimization

Manta rays feed on plankton, which are mainly water microfauna. When feeding, they suck water and prey into their mouths with angular head leaves. They then filter prey out of the water through improved rabbles. Individuals of the manta rays work together to find the best food. Inspired by the behavior of the manta rays, the algorithm is divided into chain feeding, spiral-feeding, and somersault foraging. There are three stages of spiral and empty foraging.


### 2.1. Chain Feeding

At this stage, the manta ray population will be arranged in an ordered chain to collaborate in feeding, which will maximize the amount of plankton in the pocket. The mathematical model of the chain feeding process can be expressed as follows:(1)xidt+1=xidt+r⋅xbestdt−xidt+α⋅xbestdt−xidt,i=1,xidt+r⋅xi−1dt−xidt+α⋅xbestdt−xidt,i=2,3,…,N.In formula (1), xidt denotes the d-dimensional information of the location of the first manta ray in generation t. R is a random number that obeys a uniform distribution of [0,1]. α=2⋅r⋅logr is the weight factor, xbestdt is the d-dimensional information of the best location found so far The manta ray at position i depends on the manta ray at position i-1 and the best food position found so far. N represents the population number. The update of the first manta ray depends on the optimal location.


### 2.2. Spiral Feeding

When a manta ray finds a good food source in a certain space, each individual approaches a manta ray in front of it, in addition to spirally moving toward the food. The spiral-feeding process can be represented by the following mathematical model:(2)xidt+1=xbestdt+r⋅xbestdt−xidt+β⋅xbestdt−xidt,i=1,xbestdt+r⋅xi−1dt−xidt+β⋅xbestdt−xidt,i=2,3,…,N.where β=2er1T−t+1/T⋅sin2πr1, a weight factor representing the spiral motion, T being the largest number of iterations, r being the rotation factor and obeying [0,1] uniform random numbers. In addition, in order to improve the efficiency of population foraging, MRFO randomly generates a new location during the optimization process and then performs a spiral search at that location. Its mathematical model is as follows:(3)xidt+1=xranddt+r⋅xbestdt−xidt+β⋅xbestdt−xidt,i=1,xranddt+r⋅xi−1dt−xidt+β⋅xbestdt−xidt,i=2,3,…,N.xranddt represents a new location in space.


### 2.3. Somersault Foraging

When a certain manta ray finds a food source, its position can be regarded as an axis. Each manta ray tends to wander around the axis and flip to a new location. Its mathematical model is as follows:(4)xidt+1=xidt+S⋅r2⋅xbestdt−r3⋅xidt,i=1,2,…,N.S is the flip factor, which determines the flip distance. R2 and r3 are two random numbers that are uniformly distributed [0,1]. As S values vary, individual mantas flip to locations in search space that are symmetrical to the optimal solution at their current location.


## 2.1. Chain Feeding

At this stage, the manta ray population will be arranged in an ordered chain to collaborate in feeding, which will maximize the amount of plankton in the pocket. The mathematical model of the chain feeding process can be expressed as follows:(1)xidt+1=xidt+r⋅xbestdt−xidt+α⋅xbestdt−xidt,i=1,xidt+r⋅xi−1dt−xidt+α⋅xbestdt−xidt,i=2,3,…,N.In formula (1), xidt denotes the d-dimensional information of the location of the first manta ray in generation t. R is a random number that obeys a uniform distribution of [0,1]. α=2⋅r⋅logr is the weight factor, xbestdt is the d-dimensional information of the best location found so far The manta ray at position i depends on the manta ray at position i-1 and the best food position found so far. N represents the population number. The update of the first manta ray depends on the optimal location.


## 2.2. Spiral Feeding

When a manta ray finds a good food source in a certain space, each individual approaches a manta ray in front of it, in addition to spirally moving toward the food. The spiral-feeding process can be represented by the following mathematical model:(2)xidt+1=xbestdt+r⋅xbestdt−xidt+β⋅xbestdt−xidt,i=1,xbestdt+r⋅xi−1dt−xidt+β⋅xbestdt−xidt,i=2,3,…,N.where β=2er1T−t+1/T⋅sin2πr1, a weight factor representing the spiral motion, T being the largest number of iterations, r being the rotation factor and obeying [0,1] uniform random numbers. In addition, in order to improve the efficiency of population foraging, MRFO randomly generates a new location during the optimization process and then performs a spiral search at that location. Its mathematical model is as follows:(3)xidt+1=xranddt+r⋅xbestdt−xidt+β⋅xbestdt−xidt,i=1,xranddt+r⋅xi−1dt−xidt+β⋅xbestdt−xidt,i=2,3,…,N.xranddt represents a new location in space.


## 2.3. Somersault Foraging

When a certain manta ray finds a food source, its position can be regarded as an axis. Each manta ray tends to wander around the axis and flip to a new location. Its mathematical model is as follows:(4)xidt+1=xidt+S⋅r2⋅xbestdt−r3⋅xidt,i=1,2,…,N.S is the flip factor, which determines the flip distance. R2 and r3 are two random numbers that are uniformly distributed [0,1]. As S values vary, individual mantas flip to locations in search space that are symmetrical to the optimal solution at their current location.


## 3. Improved Manta Ray Foraging Optimization

From the above formulas, it can be seen that more communication between individuals and orderly work can improve the searchability of the algorithm and perform a wide-ranging search. On the one hand, the lack of initiative of individuals in the population limits their ability to develop. On the other hand, updates within the population are related to the best location. When encountering high-dimensional complex problems, the change of the optimal position is similar, which results in less change in the two updates before and after the algorithm, which limits the algorithm's optimization ability. Therefore, a flexible change strategy is needed to improve the development ability and local convergence effect of the algorithm. This paper uses the Lévy flight strategy to improve individual blindness search, and random walk learning is used to prevent the algorithm from falling into a local state and the learning idea of particle swarm to improve the search accuracy of the algorithm.


### 3.1. Why Each Modification Has Been Proposed?

MRFO is based on a group of animals collaborating in feeding, which results in fewer optimization methods and a lack of flexibility and fineness. Therefore, individual initiative is required to increase the diversity of the population in order to find high-quality solutions in space.Therefore, this paper analyses and solves the defects of the algorithm from the following three points. Firstly, it is necessary to make the population individuals better distribute the whole space so as to develop the vision of the algorithm and improve the global search ability of the algorithm. Lévy flight is a classical strategy, which can fly in a given space in the way of alternating long and short distances. It has been used by most scholars to improve the search ability of the algorithm. Secondly, some individuals need to be independent and never be limited by group characteristics. Random walk learning is an uncertain way of walking. The traditional random walk can only be carried out in local areas. However, the random walk learning designed in this paper can make large location differences between different individuals and improve the population diversity of the algorithm. Finally, information sharing among individuals is needed to improve the local search ability of the algorithm and find high-quality solutions. The learning factor is derived from the particle swarm optimization algorithm, which is used to speed up the information exchange of the population, prevent the early invalid search, improve the local search ability of the algorithm, and improve the accuracy of the solution to a certain extent.


### 3.2. Lévy Flight Strategy

When manta ray individuals perform chain search, all individuals follow the population to search, which leads to the lack of flexibility of the algorithm and can not perform a better search range. Therefore, the Lévy flight strategy [40, 41] is introduced to enable individuals to search long and short distances, increase the diversity of the population, and enable individuals to fully diffuse into the whole space. The location update format for joining Lévy flight strategy is as follows:(5)xi′t=xit+l⊕levyλ.In formula (8), xi(t) represents the position of the i-th individual in the t-th iteration, ⊕ is an arithmetic symbol representing point-to-point multiplication. l = 0.01(xi(t)-xp) denotes a step length control parameter, xp represents the position of the best individual in the population.Lévy flight formula is as follows [42]:(6)Levyx=0.01×r4×σr51/ξ.where r4 and r5 are random numbers within the range of [0,1], ξ. The general value is 1.5. σ is calculated as follows:(7)σ=Γ1+ξ×sinπξ/2Γ1+ξ/2×ξ×2ξ−1/21/ξ.where Γx=x−1!, the schematic diagram of Lévy flight is shown in Figure 1. Lévy flight can search long and short distances in a certain space and balance the global and local search of the algorithm.Figure 1
Lévy flight diagram.


### 3.3. Random Walk Learning

In the optimization process, MRFO has the probability of falling into the local optimum, which makes the current optimum individual unreliable, so it is necessary to disperse all the individuals to find a better solution. Unlike random walks, the learning factors at the best and worst locations are introduced to make individual escape directional and reduce unreasonable walk. The specific mathematical model of RWL is as follows:(8)xi,jt+1=xbestt+21+t/M⋅sinπ/2⋅r−1⋅e−tM⋅xi,jt−xworstt+c1⋅xbestt−c2⋅Xi,jt.In formula (8), 2/1+t/M.sinπ/2.r−1 is the sinusoidal random factor that uses the mathematical properties of the sinusoidal function to fluctuate toward the optimal solution and continuously adjusts the step size based on the worst position of the current population so that the search path can span the entire solution space. M is the maximum number of iterations, and c1 and c2 represent two learning factors, random numbers that obey a normal distribution. e−t/M.xi,jt−xworstt is the control step, c1.xbestt−c2.Xi,jt is the direction of control. As shown in Figure 2(a), (a) is the distribution of individuals without introducing RWL, (b) introduces the individual distribution of RWL; we can see that the introduction of RWL enables individuals to master global information, makes the individual distribution more even, and finds the global optimal solution.Figure 2
Distribution of algorithm individuals (a) original algorithm (b) algorithm with GWL.
(a)(b)


### 3.4. PSO Algorithm Learning Ideas

There are two learning factors in PSO to develop local solutions, which can effectively improve the convergence accuracy of the algorithm. Therefore, the formula of introducing two learning factors is as follows:(9)xi,jt+1=b1⋅xi,jt+b2⋅rand1⋅BestX−xi,jt.b1, b2 are two learning factors, and BestX is the optimal position of the current population. As can be seen from the formula, this strategy exploits individuals between the current one and the optimal one to enhance the local search of the algorithm.


### 3.5. Improved Manta Ray Foraging Optimization

To improve the local search capability of MRFO and reduce the probability of falling into local optimum, an improved manta ray algorithm is presented in this paper. The algorithm uses random walk learning to prevent the algorithm from falling into the local state after each iteration and to improve the global search ability of the algorithm. Then, the Lévy flight mechanism is combined to improve the blindness of the manta ray algorithm and to balance the searchability of the algorithm. Using two learning factors of particle swarm optimization to improve the search accuracy ultimately makes the algorithm improve effectively both in local and global aspects. The specific pseudocode is shown in Algorithm 1.Algorithm 1: The framework of the IMRFO.
InputM：Maximum number of iterationsN：Population sparrowsOutput：Xbest, fgInitialize populationt = 1;While(t< M)Update the position of the population according to formula (8)%RWLFori = 1 to N doIf rand<0.5 thenIf t/M < rand thenUpdate the position of the individual according to formula (3)ElseUpdate the position of the individual according to formula (2)End ifElseUpdate the position of the individual according to formula (1)End ifUpdate the position of the population according to formula (5)% Lévy flightGet the current best and worstFori = 1 to N doUpdate the position of the individual according to formula (4)End forThe position of the individual is updated according to formula (9)% PSO algorithm learning ideasGet a new Xbest, fg, Xworst;End whileGet the final Xbest, fg.


## 3.1. Why Each Modification Has Been Proposed?

MRFO is based on a group of animals collaborating in feeding, which results in fewer optimization methods and a lack of flexibility and fineness. Therefore, individual initiative is required to increase the diversity of the population in order to find high-quality solutions in space.Therefore, this paper analyses and solves the defects of the algorithm from the following three points. Firstly, it is necessary to make the population individuals better distribute the whole space so as to develop the vision of the algorithm and improve the global search ability of the algorithm. Lévy flight is a classical strategy, which can fly in a given space in the way of alternating long and short distances. It has been used by most scholars to improve the search ability of the algorithm. Secondly, some individuals need to be independent and never be limited by group characteristics. Random walk learning is an uncertain way of walking. The traditional random walk can only be carried out in local areas. However, the random walk learning designed in this paper can make large location differences between different individuals and improve the population diversity of the algorithm. Finally, information sharing among individuals is needed to improve the local search ability of the algorithm and find high-quality solutions. The learning factor is derived from the particle swarm optimization algorithm, which is used to speed up the information exchange of the population, prevent the early invalid search, improve the local search ability of the algorithm, and improve the accuracy of the solution to a certain extent.


## 3.2. Lévy Flight Strategy

When manta ray individuals perform chain search, all individuals follow the population to search, which leads to the lack of flexibility of the algorithm and can not perform a better search range. Therefore, the Lévy flight strategy [40, 41] is introduced to enable individuals to search long and short distances, increase the diversity of the population, and enable individuals to fully diffuse into the whole space. The location update format for joining Lévy flight strategy is as follows:(5)xi′t=xit+l⊕levyλ.In formula (8), xi(t) represents the position of the i-th individual in the t-th iteration, ⊕ is an arithmetic symbol representing point-to-point multiplication. l = 0.01(xi(t)-xp) denotes a step length control parameter, xp represents the position of the best individual in the population.Lévy flight formula is as follows [42]:(6)Levyx=0.01×r4×σr51/ξ.where r4 and r5 are random numbers within the range of [0,1], ξ. The general value is 1.5. σ is calculated as follows:(7)σ=Γ1+ξ×sinπξ/2Γ1+ξ/2×ξ×2ξ−1/21/ξ.where Γx=x−1!, the schematic diagram of Lévy flight is shown in Figure 1. Lévy flight can search long and short distances in a certain space and balance the global and local search of the algorithm.Figure 1
Lévy flight diagram.


## 3.3. Random Walk Learning

In the optimization process, MRFO has the probability of falling into the local optimum, which makes the current optimum individual unreliable, so it is necessary to disperse all the individuals to find a better solution. Unlike random walks, the learning factors at the best and worst locations are introduced to make individual escape directional and reduce unreasonable walk. The specific mathematical model of RWL is as follows:(8)xi,jt+1=xbestt+21+t/M⋅sinπ/2⋅r−1⋅e−tM⋅xi,jt−xworstt+c1⋅xbestt−c2⋅Xi,jt.In formula (8), 2/1+t/M.sinπ/2.r−1 is the sinusoidal random factor that uses the mathematical properties of the sinusoidal function to fluctuate toward the optimal solution and continuously adjusts the step size based on the worst position of the current population so that the search path can span the entire solution space. M is the maximum number of iterations, and c1 and c2 represent two learning factors, random numbers that obey a normal distribution. e−t/M.xi,jt−xworstt is the control step, c1.xbestt−c2.Xi,jt is the direction of control. As shown in Figure 2(a), (a) is the distribution of individuals without introducing RWL, (b) introduces the individual distribution of RWL; we can see that the introduction of RWL enables individuals to master global information, makes the individual distribution more even, and finds the global optimal solution.Figure 2
Distribution of algorithm individuals (a) original algorithm (b) algorithm with GWL.
(a)(b)


## 3.4. PSO Algorithm Learning Ideas

There are two learning factors in PSO to develop local solutions, which can effectively improve the convergence accuracy of the algorithm. Therefore, the formula of introducing two learning factors is as follows:(9)xi,jt+1=b1⋅xi,jt+b2⋅rand1⋅BestX−xi,jt.b1, b2 are two learning factors, and BestX is the optimal position of the current population. As can be seen from the formula, this strategy exploits individuals between the current one and the optimal one to enhance the local search of the algorithm.


## 3.5. Improved Manta Ray Foraging Optimization

To improve the local search capability of MRFO and reduce the probability of falling into local optimum, an improved manta ray algorithm is presented in this paper. The algorithm uses random walk learning to prevent the algorithm from falling into the local state after each iteration and to improve the global search ability of the algorithm. Then, the Lévy flight mechanism is combined to improve the blindness of the manta ray algorithm and to balance the searchability of the algorithm. Using two learning factors of particle swarm optimization to improve the search accuracy ultimately makes the algorithm improve effectively both in local and global aspects. The specific pseudocode is shown in Algorithm 1.Algorithm 1: The framework of the IMRFO.
InputM：Maximum number of iterationsN：Population sparrowsOutput：Xbest, fgInitialize populationt = 1;While(t< M)Update the position of the population according to formula (8)%RWLFori = 1 to N doIf rand<0.5 thenIf t/M < rand thenUpdate the position of the individual according to formula (3)ElseUpdate the position of the individual according to formula (2)End ifElseUpdate the position of the individual according to formula (1)End ifUpdate the position of the population according to formula (5)% Lévy flightGet the current best and worstFori = 1 to N doUpdate the position of the individual according to formula (4)End forThe position of the individual is updated according to formula (9)% PSO algorithm learning ideasGet a new Xbest, fg, Xworst;End whileGet the final Xbest, fg.


## 4. K-Means Image Segmentation Based on IMRFO

The principle of the traditional K-means algorithm is to select K cluster centers randomly, so the way to select them is uncertain, resulting in large differences in the final results and easy to fall into local optimum. Therefore, it is necessary to select an appropriate initial cluster center. Intelligent optimization algorithm has been successfully applied to K-means to improve its randomness and the defect of falling into local optimum. The improved manta ray foraging optimization optimizes K-means so that the initial cluster centers are well controlled. The objective function is as follows:(10)f=∑i=1n∑j=1mXi−Yi2.Xi is a pixel gray value of the image and Yi is the J-th clustering center. The optimal initial number of clustering centers is obtained by IMRFO to minimize the fitness value of the objective function.K-means image segmentation based on IMRFO is mainly divided into two parts:(1)
Use the global search capabilities of IMRFO to find the best initial cluster center in the image point set(2)
The initial cluster centers of the IMRFO output are segmented in the K-means algorithmThe specific flow chart is shown in Figure3.Figure 3
K-Means image segmentation based on IMRFO.


## 5. Performance Analysis and Test

### 5.1. Performance Test

To verify the effectiveness and feasibility of IMRFO, 12 benchmark functions [43, 44] are selected to verify its function optimization ability. The specific test function information is shown in Table 1. F1-6 is a unimodal function, F7-11 is a complex multimodal function, and F12 is a fixed-dimensional function. In addition, F1-11 is tested in different dimensions to verify the optimization ability of the algorithm in high-dimensional cases. To prove that IMRFO is competitive, seven algorithms including MRFO, Honey Badger Algorithm (HBA) [45], GWO, PSO, Whale Optimization Algorithm (WOA) [46], Learning Based Optimization (TLBO) [47], and Flower Pollution Algorithm (FPA) [48] are compared. The new cluster intelligence algorithm was proposed by HBA in 2021, while other algorithms are classical ones that have been extensively studied. The number of iterations and population of each algorithm are 500 and 100. In HBA, O = 6, C = 2; In FPA, the selection probability p = 0.8. B1 and b2 in IMRFO are 0.2 and 0.8, respectively. The experimental environment is Windows 10 64 bit; the software is matlab2019b; the memory is 16 GB; the processor is Intel(R) Core (TM) i5-10200H CPU @ 2.40 GHz. The average, optimal value, and standard deviation of the results of each algorithm for 30 runs are calculated. If IMRFO is the optimal value, the font is bolded. The optimization results of each algorithm are calculated as shown in Table 2-3.Table 1
Test function information table.
FDimIntervalMinF1x=∑i=1nxi230/100[-100,100]0F2x=∑i=1nxi+∏i=1nxi30/100[-10,10]0F3x=∑i=1n∑j=1ixj230/100[-100,100]0F4x=maxixi,1≤i≤n30/100[-100,100]0F5x=∑i=1n−1100xi+1−xi22+xi−1230/100[-30,30]0F6x=∑i=1nixi4+random0,130/100[-1.28,1.28]0F7x=∑i=1n−xisinxi30/100[-500,500]-418.9829nF8x=∑i=1nxi2−10cos2πxi+1030/100[-5.12,5.12]0F9x=−20exp−0.21n∑i=1nxi2−exp1n∑i=1ncos2πxi+20+e30/100[-32,32]0F10x=14000∑i=1nxi2−∏i=1ncosxii+130/100[-600,600]0F11x=π/n10sinπy1+∑i=1n−1yi−121+10sin2πyi+1+yn−12+∑i=1nuxi,10,100,430/100−50,500yi=1+xi+1/4uxi,a,k,m=kxi−am,xi>a,0,−a<xi<a,k−xi−amxi<−a.F12x=0.002+∑i=1251/i+x1−a1i6+x2−a2i6−1wherea=−32−1601632−32…01632−32−32−32−32−32−16…3232322[-65.536.65.536]0.998Table 2
Performance comparison table of each algorithm
FAlgorithmBestMeanStdF1(x)IMRFO000MRFO000HBA9.3799E − 1661.1587E − 1604.2983E − 160WOA3.1181E − 1041.0841E − 954.5034E − 95TLBO4.0530E − 862.9876E − 852.1878E − 85FPA3.4196E + 045.6323E + 049.3090E + 03GWO2.97266E − 429.97975E − 412.31134E − 40PSO1.35628E − 127.30343E − 111.53846E − 10F2(x)IMRFO04.8161E − 2770MRFO4.2592E − 2371.5644E − 2290HBA1.0045E − 873.0642E − 858.9871E − 85WOA5.1550E − 638.1673E − 582.9729E − 57TLBO3.0778E − 431.2493E − 427.1358E − 43FPA4.4336E + 077.9783E + 101.3371E + 11GWO1.00188E − 245.16621E − 243.79647E − 24PSO1.9394E − 061.2453E − 043.7943E − 04F3(X)IMRFO000MRFO04.2858E − 1920HBA7.5465E − 1291.8442E − 1176.9103E − 117WOA4.7217E + 031.4248E + 046.9878E + 03TLBO6.0458E − 171.7598E − 151.8686E − 15FPA6.4669E + 049.4629E + 041.9121E + 04GWO1.2723E − 151.6522E − 115.6380E − 11PSO2.45976.87644.6664F4(X)IMRFO03.6613E − 2830MRFO1.8994E − 2331.2937E − 2230HBA6.4810E − 723.6559E − 688.7750E − 68WOA1.3789E − 072.9967E + 013.0998E + 01TLBO7.54383E − 352.2303E − 341.1471E − 34FPA7.5982E + 018.3319E + 013.0315E + 00GWO1.0249E − 111.3528E − 101.3630E − 10PSO1.0009E + 011.0221E + 025.1654E + 01F5(X)IMRFO1.8761E + 011.9089E + 014.2393E − 01MRFO1.9091E + 012.0074E + 013.9236E − 01HBA1.9310E + 012.1199E + 017.6666E − 01WOA2.6313E + 012.6797E + 012.0942E − 01TLBO1.6702E + 011.8846E + 011.0315FPA1.0583E + 081.7478E + 083.8136E + 07GWO4.5186E + 014.6672E + 017.8488E − 01PSO89.4507234.8606104.6002F6(X)IMRFO1.4166E − 062.9500E − 052.0356E − 05MRFO3.1973E − 063.8448E − 054.0550E − 05HBA1.6931E − 051.1151E − 048.9566E − 05WOA3.9351E − 059.5517E − 049.4421E − 04TLBO4.4041E − 047.9732E − 042.1545E − 04FPA5.1790E + 019.3728E + 011.9183E + 01GWO1.8171E − 045.6482E − 043.1680E − 04PSO7.1930E − 031.8163E − 027.2361E − 03F7(X)IMRFO−1.0536E + 04−1.0050E + 044.2525E + 02MRFO−9.6874E + 03−9.0741E + 034.3594E + 02HBA−1.0990E + 04−9.4427E + 039.4018E + 02WOA−12569.4699−11724.034851302.326078TLBO−9.2643E + 03−7.3757E + 031.1529E + 03FPA−4.0064E + 03−2.9596E + 033.8588E + 02GWO−8.2622E + 03−6.3621E + 037.0903E + 02PSO−8.3241E + 03−6.8450E + 037.5268E + 02F8(X)IMRFO000MRFO000HBA000WOA01.8948E − 151.0378E − 14TLBO06.32844.7427FPA3.3516E + 023.9820E + 022.9755E + 01GWO04.7528E − 011.4588PSO02.06301.3861F9(X)IMRFO8.8818E − 168.8818E − 160MRFO8.8818E − 168.8818E − 160HBA8.8818E − 168.8818E − 160WOA8.8818E − 164.0856E − 152.6960E − 15TLBO4.4409E − 156.3357E − 150FPA1.9290E + 012.0337E + 012.7610E − 01GWO1.8652E − 142.7652E − 143.8165E − 15PSO1.7249E − 061.9663E − 014.5356E − 01F10(X)IMRFO000MRFO000HBA000WOA01.9723E − 033.3266E − 03TLBO000FPA2.7736E − 011.2829E + 006.1301E − 01GWO02.4654E − 033.5462E − 03PSO01.9723E − 033.3266E − 03F11(X)IMRFO7.3400E − 201.2392E − 181.2894E − 18MRFO4.04531E − 061.53518E − 058.77191E − 06HBA3.8903E − 106.7898E − 091.1908E − 08WOA2.7893E − 034.9054E − 031.5734E − 03TLBO5.7527E − 052.2424E − 035.7778E − 03FPA5.1790E + 073.7356E + 081.3609E + 08GWO1.4152E − 061.4681E − 029.2775E − 03PSO6.4838E − 148.6436E − 022.5276E − 01F12(X)IMRFO9.9800E − 019.9800E − 010MRFO9.9800E − 019.9800E − 010HBA9.9800E − 019.9800E − 010WOA9.9800E − 011.26266.8599E − 01TLBO9.9800E − 019.9800E − 010FPA1.99951.0262E + 017.6364GWO9.9800E − 011.7255E + 009.7247E − 01PSO9.9800E − 011.1305E + 003.4368E − 01The optimal value is shown in bold.Table 3
Table of results for each algorithm (100 DIMENSIONS).
FAlgorithmBestMeanStdF1(x)IMRFO000MRFO000HBA8.9040E-1474.6592E-1411.2550E-140WOA1.0469E-1027.2231E-932.5499E-92TLBO1.6114E-751.6114E-751.1585E-75FPA1.3848 E+052.2811 E+054.4746 E+04GWO5.0821E-182.6308E-172.1090E-17PSO1.06691.2459 E+013.0029 E+01F2(x)IMRFO2.0908E-3054.0935E-2810MRFO8.2591E-2348.7997E-2280HBA3.2693E-781.4848E-752.1169E-75WOA3.97136E-628.1673E-584.04975E-55TLBO1.58996E-381.11006E-551.64669E-38FPA2.5777 E+274.8007 E+451.3669 E+46GWO1.1188E-231.0071E-228.1329E-23PSO1.6825E-064.0865E-051.3518E-04F3(X)IMRFO000MRFO04.2858E-1920HBA5.8574E-1066.5344E-943.2931E-93WOA4.5880 E+056.7389 E+051.1901E+05TLBO5.7047E-061.4581E-041.5072E-04FPA5.9828 E+059.8255 E+052.2421 E+05GWO4.3996E-011.1814 E+011.3585 E+01PSO4.1855 E+036.8320 E+037.6320 E+03F4(X)IMRFO2.0908E-3054.0728E-2810MRFO1.0891E-2246.0212E-2190HBA4.1580E-496.4459E-471.2824E-46WOA9.9712E-047.4068 E+012.9309 E+01TLBO2.64171E-304.63468E-301.35657E-30FPA8.7604 E+019.3681 E+012.0880GWO2.0983E-035.2094E-028.6554E-02PSO7.37839.57541.2668F5(X)IMRFO9.0554 E+019.1195 E+017.3432E-01MRFO9.0823 E+019.2361 E+016.6140E-01HBA9.1619 E+019.4762 E+011.8652 E+00WOA9.6679 E+019.7258 E+013.0684E-01TLBO9.1198 E+019.3064 E+019.5488E-01FPA4.0625 E+089.3161 E+082.3879 E+08GWO9.5679 E+019.6973 E+019.2081E-01PSO6.5109 E+023.2217 E+036.7489 E+03F6(X)IMRFO1.4328E-066.6842E-054.9030E-05MRFO2.0781E-064.9605E-054.3316E-05HBA2.3868E-051.4383E-041.2534E-04WOA8.5089E-061.3208E-031.3226E-03TLBO5.1751E-041.1234E-033.2954E-04FPA6.1163 E+021.4259 E+033.5171 E+02GWO9.4824E-042.6521E-031.1372E-03PSO4.9985E-011.1220 E+003.6320E-01F7(X)IMRFO-2.92 E+04-2.57 E+041.67 E+03MRFO-2.7791 E+04-2.5142 E+041.1769 E+03HBA-3.2530 E+04-2.6092 E+043.5550 E+03WOA-4.1898 E+04-3.9015 E+043.7697 E+03TLBO-2.7940 E+04-1.6598 E+045.1640 E+03FPA-6.5597 E+03-5.3592 E+036.0949 E+02GWO-2.2404 E+04-1.6607 E+042.4372 E+03PSO-2.3436 E+04-2.0057 E+042.2771 E+03F8(X)IMRFO000MRFO000HBA000WOA03.7896E-152.0756E-14TLBO06.32844.7427FPA1.3434 E+031.5311 E+038.6281 E+01GWO01.39712.2329PSO2.8854 E+014.8456 E+011.1153 E+01F9(X)IMRFO8.8818E-168.8818E-160MRFO8.8818E-168.8818E-160HBA8.8818E-168.8818E-160WOA8.8818E-164.3225E-152.8731E-15TLBO7.9936E-157.9936E-150FPA1.9841 E+012.0520 E+013.3562E-01GWO2.2204E-143.0257E-143.7242E-15PSO1.3320E-061.4424E-014.4254E-01F10(X)IMRFO000MRFO000HBA000WOA000TLBO000FPA1.3815 E+032.0376 E+033.4470 E+02GWO01.8958E-033.1773E-03PSO01.3192E-032.8042E-03F11(X)IMRFO2.8193E-066.4940E-063.2213E-06MRFO4.6460E-061.09637E-056.3630E-06HBA1.9642E-023.5856E-021.0354E-02WOA1.8029E-037.0382E-039.1277E-03TLBO7.3698E-052.3727E-035.8937E-03FPA7.4824 E+082.1393 E+097.0466 E+08GWO2.1287E-061.5932E-029.1126E-03PSO2.3297E-138.2984E-021.7745E-01F12(X)IMRFO9.9800E-019.9800E-010MRFO9.9800E-019.9800E-010HBA9.9800E-019.9800E-010WOA9.9800E-011.26266.8599E-01TLBO9.9800E-019.9800E-010FPA1.99951.0262 E+017.6364GWO9.9800E-011.7255 E+009.7247E-01PSO9.9800E-011.1305 E+003.4368E-01Bold font is to clearly see the advantages of the algorithm. The best indicators of IMRFO have been bold in this paper.On the one hand, from Table2 and Table 3, we can see that IMRFO has obvious advantages in searching ability, and the results are better than other algorithms in each function. The increase of dimension does not reduce the searching ability of IMRFO. On the other hand, among these functions, F1, F6, F8-10, F12, MRFO itself has a good optimization effect and can find the theoretical optimal value, IMRFO also has the same optimization effect, so it can be seen that IMRFO does not weaken the original algorithm's optimization ability. Overall, IMRFO has been effectively improved in stability and accuracy. It can be seen that the introduction of multiple strategies improves the algorithm's optimization ability and reduces the probability of entering a local optimum.


### 5.2. Statistical Test

To verify whether IMRFO and the other seven algorithms have significant differences in global optimization, the 30-dimension results of each algorithm are tested. The Wilcoxon rank-sum test is used to find the differences between the two algorithms. Assume H0 : The two algorithms have the same performance. H1 : There is an obvious difference between the two algorithms. Use theP-value of the test results to measure the differences between the two algorithms. When P < 0.05, reject H0. It shows that there is a significant difference between the two algorithms. When P > 0.05, H0 is accepted, indicating that the two algorithms have the same global optimization performance. To clearly see the differences between these algorithms, we utilize N/A to represent the values of P > 0.05. The Wilcoxon test results are shown in Table 4. At the same time, in order to better show the comprehensive optimization ability of IMRFO in the whole test function, the average and variance of each algorithm are Friedman test [49], and the final ranking is calculated to measure the universality of the algorithm in the 12 test functions. The test results are shown in Table 5.Table 4
Wilcoxon rank-sum testp-value.
FMRFOFPAGWOHBAPSOTLBOWOAF1N/A1.21E-121.21E-121.21E-121.21E-121.21E-121.21E-12F23.02E-113.02E-113.02E-113.02E-113.02E-113.02E-113.02E-11F3N/A1.21E-121.21E-121.21E-121.21E-121.21E-121.21E-12F43.02E-113.02E-113.02E-113.02E-113.02E-113.02E-113.02E-11F51.46E-091.79E-111.79E-114.94E-113.53E-10N/A1.79E-11F6N/A2.91E-112.91E-115.07E-072.91E-112.91E-112.29E-10F77.61E-091.44E-111.44E-113.31E-031.44E-111.97E-117.40E-07F8N/A1.21E-128.15E-02N/A4.24E-121.66E-113.34E-01F9N/A1.21E-126.59E-13N/A1.21E-124.63E-131.02E-07F10N/A1.21E-126.62E-04N/A1.35E-03N/A2.79E-03F113.02E-113.02E-113.02E-113.02E-113.02E-113.02E-113.02E-11F125.46E-031.14E-111.14E-114.95E-106.79E-022.50E-051.14E-11Table 5
Friedman test ranking table.
AlgorithmsIMRFOMRFOHBAWOATLBOFPAGWOPSORank2.02082.27082.83335.00004.45837.54175.41676.4583From Table4, it can be seen that IMRFO differs significantly from other algorithms. In some functions, MRFO itself has better searching ability, so the difference is not obvious. From Table 5, IMRFO ranks best in the search results of each function, which also indicates that it has a good universality.


### 5.3. Comparison with Variants of the Algorithm

To further show the effectiveness and innovation of IMRFO, this paper compares IMRFO with multistrategy serial cuckoo search algorithm (MSSCS) [50], firefly algorithm with courtship learning (FACL) [51], self-adaptive cuckoo search (SACS) [52], and CSsin [53] proposed in recent years. These four algorithms are variants of classical algorithms and have been validated in the CEC test set. The specific parameters of each algorithm are set as follows: In MSCS algorithm, α = 0.01,β = 1.5, Pa = 0.25, C = 0.2, PAmax = 0.35, PAmin = 0.25; in CSsin algorithm, Pmax = 0.75, Pmax = 0.25, freq = 0.5; in FACL, α = 0.01,βmin = 0.2,β = 1, γ = 1. The number of populations and the number of iterations for each algorithm are shown above. Similarly, when IMRFO is the optimal value, font bolding will be applied. The results of each algorithm are shown in Table 6.Table 6
Comparison with variants of the algorithm
FAlgorithmBestMeanStdF1(x)IMRFO000FACL2.6020E + 022.6020E + 024.5704E − 13MSSCS2.6586E − 161.2320E − 142.2109E − 14SACS5.8993E − 172.1975E − 152.2919E − 15CSsin8.1279E − 171.8682E − 152.2000E − 15F2(x)IMRFO04.8161E − 2770FACL1.3615E + 011.3615E + 011.7853E − 15MSSCS2.4907E − 091.0918E − 089.6029E − 09SACS8.1604E − 103.6463E − 092.3128E − 09CSsin8.7299E − 103.3430E − 091.7651E − 09F3(X)IMRFO000FACL2.3244E + 032.3244E + 032.7422E − 12MSSCS2.1933E − 026.6588E − 011.2328E + 00SACS2.0617E − 134.2875E − 107.7897E − 10CSsin3.4984E − 133.5258E − 091.8741E − 08F4(X)IMRFO03.6613E − 2830FACL1.5622E + 011.5622E + 011.4282E − 14MSSCS9.5018E − 052.8057E − 037.0418E − 03SACS2.5496E − 152.8163E − 128.9570E − 12CSsin1.1423E − 151.3641E − 124.9902E − 12F5(X)IMRFO1.8761E + 011.9089E + 014.2393E − 01FACL6.2978E + 046.2978E + 047.3126E − 11MSSCS2.1186E + 012.6991E + 011.5287E + 01SACS9.5265E − 031.6347E + 011.0434E + 01CSsin3.1439E + 001.4000E + 014.5249E + 00F6(X)IMRFO1.4166E − 062.9500E − 052.0356E − 05FACL4.9638E − 012.6540E + 003.6836E + 00MSSCS1.0931E − 033.7296E − 031.7917E − 03SACS2.7015E − 041.2413E − 036.5230E − 04CSsin2.5773E − 041.2047E − 036.2553E − 04F7(X)IMRFO−1.0536E + 04−1.0050E + 044.2525E + 02FACL−3.2588E + 03−3.2588E + 033.6563E − 12MSSCS−1.2409E + 04−1.2023E + 041.7642E + 02SACS−1.2337E + 04−1.2040E + 041.6571E + 02CSsin−1.2197E + 04−1.1773E + 042.2010E + 02F8(X)IMRFO000FACL1.3469E + 021.3469E + 021.9995E − 13MSSCS1.3682E + 021.3682E + 022.2852E − 13SACS1.3558E + 011.9318E + 013.2639E + 00CSsin1.3082E + 011.7173E + 012.4068E + 00F9(X)IMRFO8.8818E − 168.8818E − 160FACL9.5803E + 009.5803E + 001.4282E − 14MSSCS7.8366E − 093.3808E − 082.3225E − 08SACS6.6614E − 093.5846E − 082.6071E − 08CSsin9.4992E − 094.9013E − 083.5110E − 08F10(X)IMRFO000FACL1.6979E + 011.6979E + 012.4994E − 14MSSCS6.6613E − 168.2473E − 044.4988E − 03SACS1.6653E − 153.2272E − 039.0416E − 03CSsin6.6613E − 161.8055E − 038.5946E − 03F11(X)IMRFO7.3400E − 201.2392E − 181.2894E − 18FACL8.7100E + 008.7100E + 001.4282E − 14MSSCS1.5139E − 075.4848E − 073.2760E − 07SACS2.2637E − 074.8725E − 073.3696E − 07CSsin1.7143E − 075.0219E − 073.9414E − 07F12(X)IMRFO9.9800E − 019.9800E − 010FACL1.9920E + 001.9920E + 004.4633E − 15MSSCS———SACS9.9800E − 019.9800E − 010CSsin9.9800E − 019.9800E − 010The optimal value is shown in bold.From Table6, it is clear that IMRFO is the best value in F1-4, F6, F9-12, which shows that IMRFO is better than these algorithms in the optimization of these functions. Secondly, the variants of CS have better optimization results, especially in F5 and F7, which have higher accuracy. FACL, as the worst one, has poor optimization results but good stability. Generally speaking, IMRFO has some advantages in function optimization, which verifies the effectiveness and innovation of the algorithm.


### 5.4. Convergence Analysis

In order to clearly see the optimization and convergence effect of each algorithm in each function, the average convergence diagram of each algorithm is given as shown in Figure4.Figure 4
Average convergence of each algorithm.
(a)(b)From Figure4, it can be seen that IMRFO has a good convergence effect and can find the most accurate solution quickly, especially in the functions of F1-4, F6, F11. It can be seen that the flexible search mechanism enables the algorithm to find the best solution quickly in the optimization process.


### 5.5. Ablation Experiment

In order to verify the validity and feasibility of the three combinations of strategies, the combinations of strategies are experimented with to find the better one. In this paper, the algorithm of combining Lévy flight with GWL is recorded as MRFO-I, the algorithm of combining Lévy flight with PSO learning thought strategy is recorded as MRFO-II, while the algorithm of combining PSO thought with GWL is recorded as MRFO-III. Besides, the algorithm using Lévy flight alone is recorded as MRFO-IV, the algorithm using GWL alone as MRFO-V, and the algorithm utilizing PSO alone as MRFO-VI. The experimental parameters are consistent with those above. The test function dimension is 30. If IMRFO is the optimal value, the font is bolded. The experimental results are shown in Table7.Table 7
Test table for each combination algorithm.
FAlgorithmBestMeanStdF1(x)IMRFO000MRFO-I000MRFO-II000MRFO-III000MRFO-IV000MRFO-V000MRFO-VI000F2(x)IMRFO04.8161E-2770MRFO-I2.2366E-2392.3660E-2300MRFO-II1.4788E-2393.6180E-2310MRFO-III6.7519E-2402.1114E-2310MRFO-IV4.9710E-2371.7202E-2290MRFO-V3.4101E-2361.0691E-2290MRFO-VI6.6058E-2398.1070E-2300F3(X)IMRFO000MRFO-I000MRFO-II000MRFO-III000MRFO-IV000MRFO-V000MRFO-VI000F4(X)IMRFO03.6613E-2830MRFO-I7.1957E-2319.1743E-2240MRFO-II5.5959E-2322.5385E-2240MRFO-III2.2845E-2322.3915E-2240MRFO-IV1.7079E-2316.1960E-2240MRFO-V3.1285E-2333.7719E-2252.0880MRFO-VI3.3266E-2332.8006E-2248.6554E-02F5(X)IMRFO1.8761 E+011.9089 E+014.2393E-01MRFO-I1.9160 E+012.0228 E+014.7486E-01MRFO-II1.9205 E+011.9904 E+014.1531E-01MRFO-III1.9050 E+012.0040 E+014.5484E-01MRFO-IV1.9054 E+011.9923 E+014.8479E-01MRFO-V1.8959 E+012.0027 E+015.1658E-01MRFO-VI1.8883 E+011.9994 E+016.7667E-01F6(X)IMRFO1.4166E-062.9500E-052.0356E-05MRFO-I3.3254E-064.0901E-052.9878E-05MRFO-II1.7086E-064.2369E-053.8592E-05MRFO-III2.9884E-064.3133E-054.4862E-05MRFO-IV5.3342E-065.1792E-055.3359E-05MRFO-V8.3930E-066.0626E-054.2128E-05MRFO-VI4.8785E-065.3014E-054.7227E-05F7(X)IMRFO-1.0536 E+04-1.0050 E+044.2525 E+02MRFO-I-9.7467 E+03-8.7240 E+036.4405 E+02MRFO-II-9.9243 E+03-8.7951 E+036.3557 E+02MRFO-III-9.8848 E+03-8.8964 E+035.5148 E+02MRFO-IV-1.0102 E+04-8.7470 E+036.3365 E+02MRFO-V-1.0359 E+04-8.9240 E+037.0323 E+02MRFO-VI-1.0082 E+04-9.0438 E+035.6962 E+02F8(X)IMRFO000MRFO-I000MRFO-II000MRFO-III000MRFO-IV000MRFO-V000MRFO-VI000F9(X)IMRFO8.8818E-168.8818E-160MRFO-I8.8818E-168.8818E-160MRFO-II8.8818E-168.8818E-160MRFO-III8.8818E-168.8818E-160MRFO-IV8.8818E-168.8818E-160MRFO-V8.8818E-168.8818E-160MRFO-VI8.8818E-168.8818E-160F10(X)IMRFO000MRFO-I000MRFO-II000MRFO-III000MRFO-IV000MRFO-V000MRFO-VI000F11(X)IMRFO7.3400E-201.2392E-181.2894E-18MRFO-I1.9606E-191.5295E-181.7575E-18MRFO-II1.8111E-191.4964E-181.1884E-18MRFO-III1.2951E-192.0136E-182.1218E-18MRFO-IV3.8758E-192.7853E-184.2987E-18MRFO-V1.1870E-191.1469E-181.0703E-18MRFO-VI9.2691E-201.8700E-182.1327E-18F12(X)IMRFO9.9800E-019.9800E-010MRFO-I9.9800E-019.9800E-010MRFO-II9.9800E-019.9800E-010MRFO-III9.9800E-019.9800E-010MRFO-IV9.9800E-019.9800E-010MRFO-V9.9800E-019.9800E-010MRFO-VI9.9800E-019.9800E-010Bold font is to clearly see the advantages of the algorithm.As can be seen from Table7, IMRFO is the best performer of all variants, and the criteria on each function are the best. IMRFO search accuracy is better than other algorithms and the difference is significant especially in F2, F4, F11. Therefore, it can be seen that the integration of multiple strategies is important, and the validity and feasibility of IMRFO are verified.


### 5.6. Time Complexity Analysis

Time complexity is an important measure of an algorithm. In order to show an effective improvement, it is necessary to balance the searchability and time complexity of the algorithm. The basic MRFO consists of only three phases, chain feeding, spiral feeding, and empty feeding, where chain feeding and spiral feeding are in the same cycle. Set the population number toN and the maximum number of iterations to T. The dimension is D, so the time complexity of MRFO can be summarized as follows. Macroscopically, the time complexity of swarm intelligence algorithms is the product of population number, iteration number, and dimension. Therefore, the time complexity of IMRFO is O (TND), just like other algorithms.Microscopically, MRFO can be calculated as follows:(11)OIMRFO=OTOcyclone foraging+chain foraging+Osomersault foraging=OTND+ND=OTND.Set the calculation time of introducing RWL to be t1, the calculation time of introducing Lévy flight to bet2, the calculation time of using two learning factors to be t3, and the other calculations are ignored.IMRFO can be summarized as follows:(12)OMRFO=OTOcyclone foraging+chain foraging+Ot1+Osomersault foraging+Ot2+Ot3=OTND.Therefore, it can be seen that the time complexity of IMRFO has not changed fundamentally. A small increase in the number of iterations can be ignored. These increases will be of great significance if the optimization capability of the algorithm is effectively improved.


## 5.1. Performance Test

To verify the effectiveness and feasibility of IMRFO, 12 benchmark functions [43, 44] are selected to verify its function optimization ability. The specific test function information is shown in Table 1. F1-6 is a unimodal function, F7-11 is a complex multimodal function, and F12 is a fixed-dimensional function. In addition, F1-11 is tested in different dimensions to verify the optimization ability of the algorithm in high-dimensional cases. To prove that IMRFO is competitive, seven algorithms including MRFO, Honey Badger Algorithm (HBA) [45], GWO, PSO, Whale Optimization Algorithm (WOA) [46], Learning Based Optimization (TLBO) [47], and Flower Pollution Algorithm (FPA) [48] are compared. The new cluster intelligence algorithm was proposed by HBA in 2021, while other algorithms are classical ones that have been extensively studied. The number of iterations and population of each algorithm are 500 and 100. In HBA, O = 6, C = 2; In FPA, the selection probability p = 0.8. B1 and b2 in IMRFO are 0.2 and 0.8, respectively. The experimental environment is Windows 10 64 bit; the software is matlab2019b; the memory is 16 GB; the processor is Intel(R) Core (TM) i5-10200H CPU @ 2.40 GHz. The average, optimal value, and standard deviation of the results of each algorithm for 30 runs are calculated. If IMRFO is the optimal value, the font is bolded. The optimization results of each algorithm are calculated as shown in Table 2-3.Table 1
Test function information table.
FDimIntervalMinF1x=∑i=1nxi230/100[-100,100]0F2x=∑i=1nxi+∏i=1nxi30/100[-10,10]0F3x=∑i=1n∑j=1ixj230/100[-100,100]0F4x=maxixi,1≤i≤n30/100[-100,100]0F5x=∑i=1n−1100xi+1−xi22+xi−1230/100[-30,30]0F6x=∑i=1nixi4+random0,130/100[-1.28,1.28]0F7x=∑i=1n−xisinxi30/100[-500,500]-418.9829nF8x=∑i=1nxi2−10cos2πxi+1030/100[-5.12,5.12]0F9x=−20exp−0.21n∑i=1nxi2−exp1n∑i=1ncos2πxi+20+e30/100[-32,32]0F10x=14000∑i=1nxi2−∏i=1ncosxii+130/100[-600,600]0F11x=π/n10sinπy1+∑i=1n−1yi−121+10sin2πyi+1+yn−12+∑i=1nuxi,10,100,430/100−50,500yi=1+xi+1/4uxi,a,k,m=kxi−am,xi>a,0,−a<xi<a,k−xi−amxi<−a.F12x=0.002+∑i=1251/i+x1−a1i6+x2−a2i6−1wherea=−32−1601632−32…01632−32−32−32−32−32−16…3232322[-65.536.65.536]0.998Table 2
Performance comparison table of each algorithm
FAlgorithmBestMeanStdF1(x)IMRFO000MRFO000HBA9.3799E − 1661.1587E − 1604.2983E − 160WOA3.1181E − 1041.0841E − 954.5034E − 95TLBO4.0530E − 862.9876E − 852.1878E − 85FPA3.4196E + 045.6323E + 049.3090E + 03GWO2.97266E − 429.97975E − 412.31134E − 40PSO1.35628E − 127.30343E − 111.53846E − 10F2(x)IMRFO04.8161E − 2770MRFO4.2592E − 2371.5644E − 2290HBA1.0045E − 873.0642E − 858.9871E − 85WOA5.1550E − 638.1673E − 582.9729E − 57TLBO3.0778E − 431.2493E − 427.1358E − 43FPA4.4336E + 077.9783E + 101.3371E + 11GWO1.00188E − 245.16621E − 243.79647E − 24PSO1.9394E − 061.2453E − 043.7943E − 04F3(X)IMRFO000MRFO04.2858E − 1920HBA7.5465E − 1291.8442E − 1176.9103E − 117WOA4.7217E + 031.4248E + 046.9878E + 03TLBO6.0458E − 171.7598E − 151.8686E − 15FPA6.4669E + 049.4629E + 041.9121E + 04GWO1.2723E − 151.6522E − 115.6380E − 11PSO2.45976.87644.6664F4(X)IMRFO03.6613E − 2830MRFO1.8994E − 2331.2937E − 2230HBA6.4810E − 723.6559E − 688.7750E − 68WOA1.3789E − 072.9967E + 013.0998E + 01TLBO7.54383E − 352.2303E − 341.1471E − 34FPA7.5982E + 018.3319E + 013.0315E + 00GWO1.0249E − 111.3528E − 101.3630E − 10PSO1.0009E + 011.0221E + 025.1654E + 01F5(X)IMRFO1.8761E + 011.9089E + 014.2393E − 01MRFO1.9091E + 012.0074E + 013.9236E − 01HBA1.9310E + 012.1199E + 017.6666E − 01WOA2.6313E + 012.6797E + 012.0942E − 01TLBO1.6702E + 011.8846E + 011.0315FPA1.0583E + 081.7478E + 083.8136E + 07GWO4.5186E + 014.6672E + 017.8488E − 01PSO89.4507234.8606104.6002F6(X)IMRFO1.4166E − 062.9500E − 052.0356E − 05MRFO3.1973E − 063.8448E − 054.0550E − 05HBA1.6931E − 051.1151E − 048.9566E − 05WOA3.9351E − 059.5517E − 049.4421E − 04TLBO4.4041E − 047.9732E − 042.1545E − 04FPA5.1790E + 019.3728E + 011.9183E + 01GWO1.8171E − 045.6482E − 043.1680E − 04PSO7.1930E − 031.8163E − 027.2361E − 03F7(X)IMRFO−1.0536E + 04−1.0050E + 044.2525E + 02MRFO−9.6874E + 03−9.0741E + 034.3594E + 02HBA−1.0990E + 04−9.4427E + 039.4018E + 02WOA−12569.4699−11724.034851302.326078TLBO−9.2643E + 03−7.3757E + 031.1529E + 03FPA−4.0064E + 03−2.9596E + 033.8588E + 02GWO−8.2622E + 03−6.3621E + 037.0903E + 02PSO−8.3241E + 03−6.8450E + 037.5268E + 02F8(X)IMRFO000MRFO000HBA000WOA01.8948E − 151.0378E − 14TLBO06.32844.7427FPA3.3516E + 023.9820E + 022.9755E + 01GWO04.7528E − 011.4588PSO02.06301.3861F9(X)IMRFO8.8818E − 168.8818E − 160MRFO8.8818E − 168.8818E − 160HBA8.8818E − 168.8818E − 160WOA8.8818E − 164.0856E − 152.6960E − 15TLBO4.4409E − 156.3357E − 150FPA1.9290E + 012.0337E + 012.7610E − 01GWO1.8652E − 142.7652E − 143.8165E − 15PSO1.7249E − 061.9663E − 014.5356E − 01F10(X)IMRFO000MRFO000HBA000WOA01.9723E − 033.3266E − 03TLBO000FPA2.7736E − 011.2829E + 006.1301E − 01GWO02.4654E − 033.5462E − 03PSO01.9723E − 033.3266E − 03F11(X)IMRFO7.3400E − 201.2392E − 181.2894E − 18MRFO4.04531E − 061.53518E − 058.77191E − 06HBA3.8903E − 106.7898E − 091.1908E − 08WOA2.7893E − 034.9054E − 031.5734E − 03TLBO5.7527E − 052.2424E − 035.7778E − 03FPA5.1790E + 073.7356E + 081.3609E + 08GWO1.4152E − 061.4681E − 029.2775E − 03PSO6.4838E − 148.6436E − 022.5276E − 01F12(X)IMRFO9.9800E − 019.9800E − 010MRFO9.9800E − 019.9800E − 010HBA9.9800E − 019.9800E − 010WOA9.9800E − 011.26266.8599E − 01TLBO9.9800E − 019.9800E − 010FPA1.99951.0262E + 017.6364GWO9.9800E − 011.7255E + 009.7247E − 01PSO9.9800E − 011.1305E + 003.4368E − 01The optimal value is shown in bold.Table 3
Table of results for each algorithm (100 DIMENSIONS).
FAlgorithmBestMeanStdF1(x)IMRFO000MRFO000HBA8.9040E-1474.6592E-1411.2550E-140WOA1.0469E-1027.2231E-932.5499E-92TLBO1.6114E-751.6114E-751.1585E-75FPA1.3848 E+052.2811 E+054.4746 E+04GWO5.0821E-182.6308E-172.1090E-17PSO1.06691.2459 E+013.0029 E+01F2(x)IMRFO2.0908E-3054.0935E-2810MRFO8.2591E-2348.7997E-2280HBA3.2693E-781.4848E-752.1169E-75WOA3.97136E-628.1673E-584.04975E-55TLBO1.58996E-381.11006E-551.64669E-38FPA2.5777 E+274.8007 E+451.3669 E+46GWO1.1188E-231.0071E-228.1329E-23PSO1.6825E-064.0865E-051.3518E-04F3(X)IMRFO000MRFO04.2858E-1920HBA5.8574E-1066.5344E-943.2931E-93WOA4.5880 E+056.7389 E+051.1901E+05TLBO5.7047E-061.4581E-041.5072E-04FPA5.9828 E+059.8255 E+052.2421 E+05GWO4.3996E-011.1814 E+011.3585 E+01PSO4.1855 E+036.8320 E+037.6320 E+03F4(X)IMRFO2.0908E-3054.0728E-2810MRFO1.0891E-2246.0212E-2190HBA4.1580E-496.4459E-471.2824E-46WOA9.9712E-047.4068 E+012.9309 E+01TLBO2.64171E-304.63468E-301.35657E-30FPA8.7604 E+019.3681 E+012.0880GWO2.0983E-035.2094E-028.6554E-02PSO7.37839.57541.2668F5(X)IMRFO9.0554 E+019.1195 E+017.3432E-01MRFO9.0823 E+019.2361 E+016.6140E-01HBA9.1619 E+019.4762 E+011.8652 E+00WOA9.6679 E+019.7258 E+013.0684E-01TLBO9.1198 E+019.3064 E+019.5488E-01FPA4.0625 E+089.3161 E+082.3879 E+08GWO9.5679 E+019.6973 E+019.2081E-01PSO6.5109 E+023.2217 E+036.7489 E+03F6(X)IMRFO1.4328E-066.6842E-054.9030E-05MRFO2.0781E-064.9605E-054.3316E-05HBA2.3868E-051.4383E-041.2534E-04WOA8.5089E-061.3208E-031.3226E-03TLBO5.1751E-041.1234E-033.2954E-04FPA6.1163 E+021.4259 E+033.5171 E+02GWO9.4824E-042.6521E-031.1372E-03PSO4.9985E-011.1220 E+003.6320E-01F7(X)IMRFO-2.92 E+04-2.57 E+041.67 E+03MRFO-2.7791 E+04-2.5142 E+041.1769 E+03HBA-3.2530 E+04-2.6092 E+043.5550 E+03WOA-4.1898 E+04-3.9015 E+043.7697 E+03TLBO-2.7940 E+04-1.6598 E+045.1640 E+03FPA-6.5597 E+03-5.3592 E+036.0949 E+02GWO-2.2404 E+04-1.6607 E+042.4372 E+03PSO-2.3436 E+04-2.0057 E+042.2771 E+03F8(X)IMRFO000MRFO000HBA000WOA03.7896E-152.0756E-14TLBO06.32844.7427FPA1.3434 E+031.5311 E+038.6281 E+01GWO01.39712.2329PSO2.8854 E+014.8456 E+011.1153 E+01F9(X)IMRFO8.8818E-168.8818E-160MRFO8.8818E-168.8818E-160HBA8.8818E-168.8818E-160WOA8.8818E-164.3225E-152.8731E-15TLBO7.9936E-157.9936E-150FPA1.9841 E+012.0520 E+013.3562E-01GWO2.2204E-143.0257E-143.7242E-15PSO1.3320E-061.4424E-014.4254E-01F10(X)IMRFO000MRFO000HBA000WOA000TLBO000FPA1.3815 E+032.0376 E+033.4470 E+02GWO01.8958E-033.1773E-03PSO01.3192E-032.8042E-03F11(X)IMRFO2.8193E-066.4940E-063.2213E-06MRFO4.6460E-061.09637E-056.3630E-06HBA1.9642E-023.5856E-021.0354E-02WOA1.8029E-037.0382E-039.1277E-03TLBO7.3698E-052.3727E-035.8937E-03FPA7.4824 E+082.1393 E+097.0466 E+08GWO2.1287E-061.5932E-029.1126E-03PSO2.3297E-138.2984E-021.7745E-01F12(X)IMRFO9.9800E-019.9800E-010MRFO9.9800E-019.9800E-010HBA9.9800E-019.9800E-010WOA9.9800E-011.26266.8599E-01TLBO9.9800E-019.9800E-010FPA1.99951.0262 E+017.6364GWO9.9800E-011.7255 E+009.7247E-01PSO9.9800E-011.1305 E+003.4368E-01Bold font is to clearly see the advantages of the algorithm. The best indicators of IMRFO have been bold in this paper.On the one hand, from Table2 and Table 3, we can see that IMRFO has obvious advantages in searching ability, and the results are better than other algorithms in each function. The increase of dimension does not reduce the searching ability of IMRFO. On the other hand, among these functions, F1, F6, F8-10, F12, MRFO itself has a good optimization effect and can find the theoretical optimal value, IMRFO also has the same optimization effect, so it can be seen that IMRFO does not weaken the original algorithm's optimization ability. Overall, IMRFO has been effectively improved in stability and accuracy. It can be seen that the introduction of multiple strategies improves the algorithm's optimization ability and reduces the probability of entering a local optimum.


## 5.2. Statistical Test

To verify whether IMRFO and the other seven algorithms have significant differences in global optimization, the 30-dimension results of each algorithm are tested. The Wilcoxon rank-sum test is used to find the differences between the two algorithms. Assume H0 : The two algorithms have the same performance. H1 : There is an obvious difference between the two algorithms. Use theP-value of the test results to measure the differences between the two algorithms. When P < 0.05, reject H0. It shows that there is a significant difference between the two algorithms. When P > 0.05, H0 is accepted, indicating that the two algorithms have the same global optimization performance. To clearly see the differences between these algorithms, we utilize N/A to represent the values of P > 0.05. The Wilcoxon test results are shown in Table 4. At the same time, in order to better show the comprehensive optimization ability of IMRFO in the whole test function, the average and variance of each algorithm are Friedman test [49], and the final ranking is calculated to measure the universality of the algorithm in the 12 test functions. The test results are shown in Table 5.Table 4
Wilcoxon rank-sum testp-value.
FMRFOFPAGWOHBAPSOTLBOWOAF1N/A1.21E-121.21E-121.21E-121.21E-121.21E-121.21E-12F23.02E-113.02E-113.02E-113.02E-113.02E-113.02E-113.02E-11F3N/A1.21E-121.21E-121.21E-121.21E-121.21E-121.21E-12F43.02E-113.02E-113.02E-113.02E-113.02E-113.02E-113.02E-11F51.46E-091.79E-111.79E-114.94E-113.53E-10N/A1.79E-11F6N/A2.91E-112.91E-115.07E-072.91E-112.91E-112.29E-10F77.61E-091.44E-111.44E-113.31E-031.44E-111.97E-117.40E-07F8N/A1.21E-128.15E-02N/A4.24E-121.66E-113.34E-01F9N/A1.21E-126.59E-13N/A1.21E-124.63E-131.02E-07F10N/A1.21E-126.62E-04N/A1.35E-03N/A2.79E-03F113.02E-113.02E-113.02E-113.02E-113.02E-113.02E-113.02E-11F125.46E-031.14E-111.14E-114.95E-106.79E-022.50E-051.14E-11Table 5
Friedman test ranking table.
AlgorithmsIMRFOMRFOHBAWOATLBOFPAGWOPSORank2.02082.27082.83335.00004.45837.54175.41676.4583From Table4, it can be seen that IMRFO differs significantly from other algorithms. In some functions, MRFO itself has better searching ability, so the difference is not obvious. From Table 5, IMRFO ranks best in the search results of each function, which also indicates that it has a good universality.


## 5.3. Comparison with Variants of the Algorithm

To further show the effectiveness and innovation of IMRFO, this paper compares IMRFO with multistrategy serial cuckoo search algorithm (MSSCS) [50], firefly algorithm with courtship learning (FACL) [51], self-adaptive cuckoo search (SACS) [52], and CSsin [53] proposed in recent years. These four algorithms are variants of classical algorithms and have been validated in the CEC test set. The specific parameters of each algorithm are set as follows: In MSCS algorithm, α = 0.01,β = 1.5, Pa = 0.25, C = 0.2, PAmax = 0.35, PAmin = 0.25; in CSsin algorithm, Pmax = 0.75, Pmax = 0.25, freq = 0.5; in FACL, α = 0.01,βmin = 0.2,β = 1, γ = 1. The number of populations and the number of iterations for each algorithm are shown above. Similarly, when IMRFO is the optimal value, font bolding will be applied. The results of each algorithm are shown in Table 6.Table 6
Comparison with variants of the algorithm
FAlgorithmBestMeanStdF1(x)IMRFO000FACL2.6020E + 022.6020E + 024.5704E − 13MSSCS2.6586E − 161.2320E − 142.2109E − 14SACS5.8993E − 172.1975E − 152.2919E − 15CSsin8.1279E − 171.8682E − 152.2000E − 15F2(x)IMRFO04.8161E − 2770FACL1.3615E + 011.3615E + 011.7853E − 15MSSCS2.4907E − 091.0918E − 089.6029E − 09SACS8.1604E − 103.6463E − 092.3128E − 09CSsin8.7299E − 103.3430E − 091.7651E − 09F3(X)IMRFO000FACL2.3244E + 032.3244E + 032.7422E − 12MSSCS2.1933E − 026.6588E − 011.2328E + 00SACS2.0617E − 134.2875E − 107.7897E − 10CSsin3.4984E − 133.5258E − 091.8741E − 08F4(X)IMRFO03.6613E − 2830FACL1.5622E + 011.5622E + 011.4282E − 14MSSCS9.5018E − 052.8057E − 037.0418E − 03SACS2.5496E − 152.8163E − 128.9570E − 12CSsin1.1423E − 151.3641E − 124.9902E − 12F5(X)IMRFO1.8761E + 011.9089E + 014.2393E − 01FACL6.2978E + 046.2978E + 047.3126E − 11MSSCS2.1186E + 012.6991E + 011.5287E + 01SACS9.5265E − 031.6347E + 011.0434E + 01CSsin3.1439E + 001.4000E + 014.5249E + 00F6(X)IMRFO1.4166E − 062.9500E − 052.0356E − 05FACL4.9638E − 012.6540E + 003.6836E + 00MSSCS1.0931E − 033.7296E − 031.7917E − 03SACS2.7015E − 041.2413E − 036.5230E − 04CSsin2.5773E − 041.2047E − 036.2553E − 04F7(X)IMRFO−1.0536E + 04−1.0050E + 044.2525E + 02FACL−3.2588E + 03−3.2588E + 033.6563E − 12MSSCS−1.2409E + 04−1.2023E + 041.7642E + 02SACS−1.2337E + 04−1.2040E + 041.6571E + 02CSsin−1.2197E + 04−1.1773E + 042.2010E + 02F8(X)IMRFO000FACL1.3469E + 021.3469E + 021.9995E − 13MSSCS1.3682E + 021.3682E + 022.2852E − 13SACS1.3558E + 011.9318E + 013.2639E + 00CSsin1.3082E + 011.7173E + 012.4068E + 00F9(X)IMRFO8.8818E − 168.8818E − 160FACL9.5803E + 009.5803E + 001.4282E − 14MSSCS7.8366E − 093.3808E − 082.3225E − 08SACS6.6614E − 093.5846E − 082.6071E − 08CSsin9.4992E − 094.9013E − 083.5110E − 08F10(X)IMRFO000FACL1.6979E + 011.6979E + 012.4994E − 14MSSCS6.6613E − 168.2473E − 044.4988E − 03SACS1.6653E − 153.2272E − 039.0416E − 03CSsin6.6613E − 161.8055E − 038.5946E − 03F11(X)IMRFO7.3400E − 201.2392E − 181.2894E − 18FACL8.7100E + 008.7100E + 001.4282E − 14MSSCS1.5139E − 075.4848E − 073.2760E − 07SACS2.2637E − 074.8725E − 073.3696E − 07CSsin1.7143E − 075.0219E − 073.9414E − 07F12(X)IMRFO9.9800E − 019.9800E − 010FACL1.9920E + 001.9920E + 004.4633E − 15MSSCS———SACS9.9800E − 019.9800E − 010CSsin9.9800E − 019.9800E − 010The optimal value is shown in bold.From Table6, it is clear that IMRFO is the best value in F1-4, F6, F9-12, which shows that IMRFO is better than these algorithms in the optimization of these functions. Secondly, the variants of CS have better optimization results, especially in F5 and F7, which have higher accuracy. FACL, as the worst one, has poor optimization results but good stability. Generally speaking, IMRFO has some advantages in function optimization, which verifies the effectiveness and innovation of the algorithm.


## 5.4. Convergence Analysis

In order to clearly see the optimization and convergence effect of each algorithm in each function, the average convergence diagram of each algorithm is given as shown in Figure4.Figure 4
Average convergence of each algorithm.
(a)(b)From Figure4, it can be seen that IMRFO has a good convergence effect and can find the most accurate solution quickly, especially in the functions of F1-4, F6, F11. It can be seen that the flexible search mechanism enables the algorithm to find the best solution quickly in the optimization process.


## 5.5. Ablation Experiment

In order to verify the validity and feasibility of the three combinations of strategies, the combinations of strategies are experimented with to find the better one. In this paper, the algorithm of combining Lévy flight with GWL is recorded as MRFO-I, the algorithm of combining Lévy flight with PSO learning thought strategy is recorded as MRFO-II, while the algorithm of combining PSO thought with GWL is recorded as MRFO-III. Besides, the algorithm using Lévy flight alone is recorded as MRFO-IV, the algorithm using GWL alone as MRFO-V, and the algorithm utilizing PSO alone as MRFO-VI. The experimental parameters are consistent with those above. The test function dimension is 30. If IMRFO is the optimal value, the font is bolded. The experimental results are shown in Table7.Table 7
Test table for each combination algorithm.
FAlgorithmBestMeanStdF1(x)IMRFO000MRFO-I000MRFO-II000MRFO-III000MRFO-IV000MRFO-V000MRFO-VI000F2(x)IMRFO04.8161E-2770MRFO-I2.2366E-2392.3660E-2300MRFO-II1.4788E-2393.6180E-2310MRFO-III6.7519E-2402.1114E-2310MRFO-IV4.9710E-2371.7202E-2290MRFO-V3.4101E-2361.0691E-2290MRFO-VI6.6058E-2398.1070E-2300F3(X)IMRFO000MRFO-I000MRFO-II000MRFO-III000MRFO-IV000MRFO-V000MRFO-VI000F4(X)IMRFO03.6613E-2830MRFO-I7.1957E-2319.1743E-2240MRFO-II5.5959E-2322.5385E-2240MRFO-III2.2845E-2322.3915E-2240MRFO-IV1.7079E-2316.1960E-2240MRFO-V3.1285E-2333.7719E-2252.0880MRFO-VI3.3266E-2332.8006E-2248.6554E-02F5(X)IMRFO1.8761 E+011.9089 E+014.2393E-01MRFO-I1.9160 E+012.0228 E+014.7486E-01MRFO-II1.9205 E+011.9904 E+014.1531E-01MRFO-III1.9050 E+012.0040 E+014.5484E-01MRFO-IV1.9054 E+011.9923 E+014.8479E-01MRFO-V1.8959 E+012.0027 E+015.1658E-01MRFO-VI1.8883 E+011.9994 E+016.7667E-01F6(X)IMRFO1.4166E-062.9500E-052.0356E-05MRFO-I3.3254E-064.0901E-052.9878E-05MRFO-II1.7086E-064.2369E-053.8592E-05MRFO-III2.9884E-064.3133E-054.4862E-05MRFO-IV5.3342E-065.1792E-055.3359E-05MRFO-V8.3930E-066.0626E-054.2128E-05MRFO-VI4.8785E-065.3014E-054.7227E-05F7(X)IMRFO-1.0536 E+04-1.0050 E+044.2525 E+02MRFO-I-9.7467 E+03-8.7240 E+036.4405 E+02MRFO-II-9.9243 E+03-8.7951 E+036.3557 E+02MRFO-III-9.8848 E+03-8.8964 E+035.5148 E+02MRFO-IV-1.0102 E+04-8.7470 E+036.3365 E+02MRFO-V-1.0359 E+04-8.9240 E+037.0323 E+02MRFO-VI-1.0082 E+04-9.0438 E+035.6962 E+02F8(X)IMRFO000MRFO-I000MRFO-II000MRFO-III000MRFO-IV000MRFO-V000MRFO-VI000F9(X)IMRFO8.8818E-168.8818E-160MRFO-I8.8818E-168.8818E-160MRFO-II8.8818E-168.8818E-160MRFO-III8.8818E-168.8818E-160MRFO-IV8.8818E-168.8818E-160MRFO-V8.8818E-168.8818E-160MRFO-VI8.8818E-168.8818E-160F10(X)IMRFO000MRFO-I000MRFO-II000MRFO-III000MRFO-IV000MRFO-V000MRFO-VI000F11(X)IMRFO7.3400E-201.2392E-181.2894E-18MRFO-I1.9606E-191.5295E-181.7575E-18MRFO-II1.8111E-191.4964E-181.1884E-18MRFO-III1.2951E-192.0136E-182.1218E-18MRFO-IV3.8758E-192.7853E-184.2987E-18MRFO-V1.1870E-191.1469E-181.0703E-18MRFO-VI9.2691E-201.8700E-182.1327E-18F12(X)IMRFO9.9800E-019.9800E-010MRFO-I9.9800E-019.9800E-010MRFO-II9.9800E-019.9800E-010MRFO-III9.9800E-019.9800E-010MRFO-IV9.9800E-019.9800E-010MRFO-V9.9800E-019.9800E-010MRFO-VI9.9800E-019.9800E-010Bold font is to clearly see the advantages of the algorithm.As can be seen from Table7, IMRFO is the best performer of all variants, and the criteria on each function are the best. IMRFO search accuracy is better than other algorithms and the difference is significant especially in F2, F4, F11. Therefore, it can be seen that the integration of multiple strategies is important, and the validity and feasibility of IMRFO are verified.


## 5.6. Time Complexity Analysis

Time complexity is an important measure of an algorithm. In order to show an effective improvement, it is necessary to balance the searchability and time complexity of the algorithm. The basic MRFO consists of only three phases, chain feeding, spiral feeding, and empty feeding, where chain feeding and spiral feeding are in the same cycle. Set the population number toN and the maximum number of iterations to T. The dimension is D, so the time complexity of MRFO can be summarized as follows. Macroscopically, the time complexity of swarm intelligence algorithms is the product of population number, iteration number, and dimension. Therefore, the time complexity of IMRFO is O (TND), just like other algorithms.Microscopically, MRFO can be calculated as follows:(11)OIMRFO=OTOcyclone foraging+chain foraging+Osomersault foraging=OTND+ND=OTND.Set the calculation time of introducing RWL to be t1, the calculation time of introducing Lévy flight to bet2, the calculation time of using two learning factors to be t3, and the other calculations are ignored.IMRFO can be summarized as follows:(12)OMRFO=OTOcyclone foraging+chain foraging+Ot1+Osomersault foraging+Ot2+Ot3=OTND.Therefore, it can be seen that the time complexity of IMRFO has not changed fundamentally. A small increase in the number of iterations can be ignored. These increases will be of great significance if the optimization capability of the algorithm is effectively improved.


## 6. Image Segmentation Experiments

At present, image processing has been applied in many fields, and the image on land has been well developed, but it still has research value in underwater images. So in order to show the research value, eight underwater images are selected as test images. From the literature [54], select PSO, DPSO, sparrow search algorithm (SSA) [55], Modified sparrow search algorithm (MSSA) [56], ABC, MRFO, WOA, TLBO, FPA, IMRFO 9 algorithms optimize K-means algorithm and traditional K-means algorithm for image segmentation. MSSA is a newly proposed K-means based algorithm, and other algorithms have been successfully applied to image segmentation problems in recent years. Because the K-means clustering algorithm has a strong dependence on K values, improper selection of K values will have a great impact on the results, and K-means clustering algorithm has a strong dependence on K values. Set the value of k to 3 to avoid interference from unrelated factors. The general parameters of the algorithm are population size of 30 and the maximum number of iterations of 100. Each algorithm divides the image as shown in Figure 5 and Figure 6. The first line in Figure 5 and Figure 6 represents the original image, and each subsequent line represents the segmentation effect of each algorithm.Figure 5
Segmentation effect of test 01–4.
(a)(b)Figure 6
Segmentation effect of test 05–8.
(a)(b)It is impossible to see the difference between each algorithm in image segmentation by human eyes. Therefore, three commonly used image segmentation metrics, PSNR, SSIM, and FSIM, are selected to measure the quality of each algorithm.Peak Signal-to-Noise Ratio (PSNR) is mainly used to measure the difference between the segmented image and the original image. The formula is as follows [57]:(13)PSNR=20.log10255RMSE,RMSE=∑i=1M∑j=1QIi,j−Segi,j2M×Q.In formula (12) and (13), RMSE represents the root mean square error of the pixels; M×Q represents the size of the image; Ii,j represents the pixel gray value of the original image; Segi,j represents the pixel gray value of the segmented image. The larger the PSNR value, the better the segmented image quality. Generally speaking, PSNR higher than 40 dB indicates excellent image quality (indicating that it is very close to the original image). At 30–40db, it usually indicates that the image quality is good (indicating that the distortion is perceptible but acceptable).Structural Similarity (SSIM) is used to measure the similarity between the original image and the segmented image. The larger the SSIM, the better the segmented result. SSIM is defined as follows [58]:(14)SSIM=2μIμseg+c12σI,seg+c2μI2+μseg2+c1σI2+σseg2+c2.In formula (14), μI and μseg represent the average value of the original image and the segmented image; σI and σseg represent the standard deviation of the original image and the segmented image, respectively.; σI,seg represents the covariance between the original image and the segmented image; c1,c2 are constantly used to ensure stability. SSIM value range [0,1]. The larger the value, the smaller the image distortion.Feature similarity index mersure (FSIM) is a measure of the characteristic similarity between the original image and the quality of the segmentation, used to evaluate local structure and provide contrast information. The value range of FSIM is [0,1], and the closer the value is to 1, the better the segmentation effect. FSIM is defined as follows [59]:(15)FSIM=∑l∈ΩSLXPCmX∑l∈ΩPCmX,SLX=SPCXSGX,SPCX=2PC1XPC2X+T1PC12XPC22X+T1,PCX=EXε+∑mAnX.G=Gx2+Gy2,SGX=2G1XG2X+T2G12XG22X+T2,In the above formula,Ω is all the pixel regions of the original image; SLX is the similarity score; PCmX is the phase consistency measure; T1 and T2 are constants; G is the gradient descent; E(x) is the response vector size at position X and the scale is n; ε is a very small value; An(X) is the local size at scale n.Run each algorithm 10 times, and the average and average running time of the partitioned metrics are shown in Table8.Table 8
Segmentation effect tables for each algorithm.
ImageIndexK-meansPSOMRFODPSOMSSAIMRFOTest 01PSNR8.060242.905142.993442.804043.478944.4989SSIM0.05250.73540.74120.73700.76710.7479FSIM0.55560.94780.94760.95710.94670.9579Ave time2.588639.260676.778938.498650.684676.3475Test 02PSNR6.453244.000843.315544.059543.903743.7004SSIM0.03060.79750.77880.80270.78770.7970FSIM0.49340.94640.94730.94100.95080.9601Ave time5.974543.974478.4206438.731550.770674.5214Test 03PSNR6.631443.160243.392543.376043.278243.7128SSIM0.02730.76150.77700.76550.76780.7894FSIM0.42490.94000.94700.94240.95060.9430Ave time2.494142.695175.719638.534650.755074.7570Test 04PSNR7.608543.070742.741943.270042.699943.1534SSIM0.04610.75590.73960.76510.73800.7808FSIM0.49200.93510.94350.93340.93970.9466Ave time5.856441.282477.943038.473252.137675.2728Test 05PSNR7.794143.129542.991343.299942.699943.5453SSIM0.01870.75420.75030.76370.73800.7726FSIM0.40110.95510.95660.95960.93970.9634Ave time2.225337.442673.582937.614448.260473.7482Test 06PSNR9.689242.970542.705243.53942.831643.1626SSIM0.03930.73750.73090.73850.73380.7517FSIM0.53010.95010.95670.94800.94740.9604Ave time1.229937.547572.655839.047748.761874.5432Test 07PSNR7.8242.799542.879172.822342.792443.0107SSIM0.10710.73570.73990.73770.74140.7409FSIM0.44600.96250.95840.96670.95580.9734Ave time2.346439.157374.328338.107649.287974.5704Test 08PSNR8.216544.111443.519144.556042.823946.4141SSIM0.02100.76810.74170.78350.71850.8710FSIM0.66140.82590.81300.80640.84440.8340Ave time1.253038.831574.715838.220348.772075.4689FindexWOAABCTLBOFPASSAIMRFOTest 01PSNR43.117643.101842.813643.037043.430044.4989SSIM0.74880.74730.73410.74070.75450.7479FSIM0.94760.94410.94380.94410.94660.9579ave time38.303639.490874.821740.140239.165376.3475Test 02PSNR44.191943.523843.440842.966343.440143.7004SSIM0.80060.78360.78520.76220.78080.7970FSIM0.94820.95850.95570.94870.95310.9601ave time38.885240.417275.312139.292242.014974.5214Test 03PSNR43.408543.440843.070343.263543.347043.7128SSIM0.77460.77900.76410.77310.77380.7894FSIM0.94220.94530.94520.94420.95030.9430ave time38.793742.837875.080341.840240.251274.7570Test 04PSNR43.387743.272743.287742.746742.434343.1534SSIM0.76000.76220.76300.74100.72560.7808FSIM0.94260.94020.94030.94000.93800.9466ave time39.228940.440374.405839.598439.067375.2728Test 05PSNR42.923842.926242.959442.840542.959343.5453SSIM0.75180.75140.74970.74800.74970.7726FSIM0.96070.96050.95680.95860.95680.9634ave time39.078338.974374.981038.671740.557273.7482Test 06PSNR42.900343.371542.536542.513643.158443.1626SSIM0.73560.75010.71070.714710.75030.7517FSIM0.93960.95030.94440.94420.95110.9604ave time37.525738.484876.389738.178437.818674.5432Test 07PSNR42.845542.835342.898642.839942.809343.0107SSIM0.74100.73860.74090.74500.73970.7409FSIM0.94260.95510.95660.93670.94910.9734ave time38.753239.609174.495638.659338.11867474.5704Test 08PSNR44.062345.544243.256045.398443.711546.4141SSIM0.76630.82210.73150.81820.75450.8710FSIM0.83810.83980.81960.82630.83160.8340ave time39.314839.118076.636339.187138.875275.4689The bold font here is to see the advantages and disadvantages of IMRFO. Although IMRFO has good performance, it has no advantage in time.Simply from the naked eye, the image after IMRFO segmentation in Figures5 and Figure 6 is clearer. Some algorithms have a rough segmentation effect and have appeared a blurry phenomenon. From Table 7, it can be seen that the segmentation index of IMRFO has a greater advantage, especially in test01 and test03-08, where more than two indexes are optimal. For example, the FSIM index in test07 reaches 0.97, SSIM in test08 reaches 0.87, which has a significant advantage over other algorithms. When the performance indicator is not optimal, IMRFO is still close to the optimal value. For example, in test01, the SSIM index of WOA is 0.7488, while that of IMRFO is 0.7479, which is close to the optimal value. In test06, the PSNR of ABC was 43.3715, and that of IMRFO was 43.1626. Therefore, both subjective visual effect and measurement result of IMRFO is better than other algorithms, which can prove a good segmentation effect. It also indirectly proves the good search performance of IMRFO, solves the problem that MRFO is easy to fall into local optimal solution and K-means has the disadvantage of being sensitive to the initial clustering center, which results in an excellent initial clustering center and further improves the image segmentation quality. On the other hand, the running time of K-means segmentation is the least, but the quality is the worst. The operation of other algorithms is large and the effect is obvious. The IMRFO does have a time disadvantage, to be expected, as it takes more time to accurately scan the solution in space.


## 7. Summary of Results

MRFO relies on group behavior to find food, so it lacks flexibility and is prone to fall into local optimum. In the existing work, most scholars can not solve such problems well. In order to improve the searching ability of MRFO, an improved algorithm for bats is presented, which uses Lévy flight, random walk learning, and learning factors.The current experimental work is summarized as follows:(1)
Comparing IMRFO with some basic algorithms on 12 standard test functions shows that the algorithm has certain advantages.(2)
Two statistical tests are used to verify the universality of IMRFO and show a good search ability.(3)
The convergence of each algorithm in each function is given, and the result shows that IMRFO has a good convergence rate.(4)
To further verify the performance of the algorithm, IMRFO is compared with the recently proposed variants of the algorithm, and the results show that IMRFO has an obvious advantage in most functions.(5)
In order to verify the validity and value of the three combinations of strategies, ablation experiments were carried out. The results show that IMRFO is better than other combinations of strategies, highlighting the practical value of IMRFO.(6)
Eight underwater images were used to verify the effect of IMRFO optimized K-means image segmentation. The results show that the IMRFO optimized image segmentation quality is good and has a rational segmentation index in multiple images.In summary, several experiments have demonstrated that IMRFO is a challenging new variant of the algorithm. IMRFO has shown good results in several test functions and image segmentation, but the optimization results in some functions and images need to be improved. More work is waiting to improve its optimization capability.


## 8. Conclusion and Future Works

In order to improve the shortcomings of K-means image segmentation and its vulnerability to local optimization, this paper presents a K-means image segmentation method based on IMRFO. IMRFO uses Lévy flight to improve the individual searchability, proposes random walk learning to prevent the premature phenomenon of the algorithm, and finally uses learning factor to improve the convergence accuracy of the algorithm so as to improve the search of the algorithm. The validity and feasibility of IMRFO are verified by 12 test functions, and through 8 underwater image data sets, it can be seen that IMRFO has a good segmentation effect and is superior to other algorithms proposed in recent years under several indicators.Although IMRFO has good segmentation advantages in eight images, it does not achieve the best three criteria for all images. From the experimental point of view, IMRFO is only the best in test 05, while the other test pictures are basically the two best. On the other hand, the running time of each algorithm is too large, and the accuracy is at the expense of time. In the future, we will improve the image quality from the following three aspects.(1)
Comprehensively improve the three performance indicators, making the three indicators the best(2)
Balance the time and the search ability of the algorithm to get the best performance in an effective time(3)
It can be used in agricultural, aerospace, medical, and other scenarios so that the algorithm can play a suitable role in different environments



---

*Source: 4587880-2022-03-16.xml*