## 3 Improved Mayfly Algorithm
### Performance Analysis of Qma  
In order to verify the superiority of the QMA, the single-peak and multi-peak functions are tested by MFO, GWO, PSO, WOA, SCA, MA, and QMA in this section. We combine the biological habits and existing literature on each algorithm, and the initialization parameters and test functions are shown in Tables 2 and 3, respectively. Meanwhile, to ensure the effectiveness of the comparison results, the number of biological populations in all bionics algorithms is set as 10. The function expression is represented by _Fun_, and the expression dimension is expressed as _Dim_. \(L_{b}\) and \(U_{b}\) are the upper and lower boundaries of the variables, respectively. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Type** & **Parameters** & **Value** & **Parameters** & **Value** \\ \hline \multirow{4}{*}{QMA/MA} & Mutation rate \(r_{m}\) & 0.01 & Personal learning & \multirow{2}{*}{1} \\  & Global learning coefficient \(l_{g}\) & 1.5 & Inertia weight \(w\) & 0.8 \\ \cline{1-1}  & Distance sight coefficient \(d\) & 2 & Nuptial dance & \multirow{2}{*}{5} \\  & Random flight coefficient \(r\) & 1 & Damping ratio \(d_{a}\) & 0.99 \\ \hline WOA & Inertia weight \(a\) & 20\(\rightarrow\)0 & Inertia weight \(a_{1}\) & \(-\)10\(\rightarrow\)\(-\)20 \\ MFO & Maximum weight \(a_{max}\) & \(-\)1 & Minimum weight \(a_{min}\) & \(-\)2 \\ GWO & Inertia weight \(a_{max}\) & 20 & Minimum weight \(a_{min}\) & 0 \\ SCA & Inertia weight \(a_{max}\) & 2 & Minimum weight \(a_{min}\) & 0 \\ \hline \multirow{4}{*}{PSO} & Maximum velocity \(v_{max}\) & 6 & Minimum velocity \(v_{min}\) & \(-\)6 \\ \cline{1-1}  & Maximum weight \(w_{max}\) & 0.9 & Minimum weight \(w_{min}\) & 0.2 \\ \cline{1-1}  & Inertia weight \(c\) & 2 & Inertia weight \(c_{1}\) & 2 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Algorithm parameters. Figure 4: The flow chart of QMA. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Number** & **Type** & **MFO** & **WOA** & **SCA** & **GWO** & **PSO** & **MA** & **QMA** \\ \hline \multirow{3}{*}{F1} & Average & 5693.2166 & 1382.2805 & 4.6177274 & 0.2631747 & 0.01161598 & 5.10 \(\times\) 10\({}^{-8}\) & 7.51 \(\times\) 10\({}^{-9}\) \\  & Var & 44,354,655.8 & 1,791,398.94 & 309.74423 & 0.17328 & 0.00112851 & 1.92 \(\times\) 10\({}^{-15}\) & 3.33 \(\times\) 10\({}^{-16}\) \\  & STD & 6659.92911 & 1338.43152 & 17.599552 & 0.4162691 & 0.03359328 & 4.38 \(\times\) 10\({}^{-8}\) & 1.83 \(\times\) 10\({}^{-8}\) \\ \cline{1-1}  & Average & 197.08007 & 109.26403 & 31.40007 & 37.90619 & 132.70364 & 33.91202 & 20.92731 \\ \cline{1-1} F2 & Var & 2051.98830 & 6157.62175 & 772.52064 & 171.00581 & 1369.34713 & 114.93251 & 39.28933 \\ \cline{1-1}  & STD & 45.29888 & 78.47052 & 27.79426 & 13.07692 & 37.00469 & 10.72066 & 6.26812 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison results in different algorithms. Figure 5: The optimization of algorithms using Sphere function. Figure 6: The optimization of algorithms using Rastrigrin function. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Number** & **Function** & **Dim** & \(L_{b}\) & \(U_{b}\) & **Iteration** \\ \hline F1 & f(x) = \(\sum_{i=1}^{n}x_{i}^{2}\) & 30 & \(-\)100 & 100 & 1000 \\ F2 & f(x) = An + \(\sum_{i=1}^{n}[x_{i}^{2}-Acos(2\pi x_{i})]\) & 30 & \(-\)5.2 & 5.2 & 1000 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Test functions. As can be seen from the Figures and Table, the average value, variance, and standard deviation of the different algorithms after 30 iterations in solving functions are different. The optimal value can be found quickly in the WOA, MFO, and GWO algorithms once they get rid of local deadlock when solving multi-variable functions. However, it is easy for them to fall into a local optimum, which is greatly affected by the number of iterations and randomness. Hence, it is not suitable for these algorithms to solve such functions.