# A Quantum-Based Beetle Swarm Optimization Algorithm for Numerical Optimization
## 4 Experiment
### Multimodal Unconstrained Optimization  
Multimodal functions contain more than one optimal solution, which will also mean that the algorithm is more likely to fall into a local optimum when optimizing these functions. The population-based intelligence optimization algorithm has an upper hand in optimizing these functions, and this is the idea we improved. Collaborative search among multiple individuals is less likely to fall into local optima than single-individual algorithms such as the BAS algorithm. We dealt with these multimodal benchmark functions with the solution space dimensions set to 30. The formulation of the functions \(f(y)\), their global minima \(f(y)_{min}\), and the value of the estimated variables \(\mathbf{y}(t)\) are shown in Table 4.  
Each algorithm was run independently 100 times. The optimization results of the multimodal benchmark functions with the population sizes of 30 and 8 are shown in Tables 5 and 6. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Name** & **Formulation _f(y)_** & _f(y)\({}_{min}\)_ & _y(t)_ \\ \hline Ackley & \(-20\exp\left(-0.2\sqrt{\frac{1}{n}\sum\limits_{i=1}^{n}x_{i}^{2}}\right)-\) & 0 & \(\{0,0,\cdots,0\}\) \\  & \(\exp\left(\frac{1}{n}\sum\limits_{i=1}^{n}\cos(2\pi x_{i})\right)+20+\exp(1)\) & \\ Griewank & \(\sum\limits_{i=1}^{n}\frac{x_{i}^{2}}{4000}-\prod\limits_{i=1}^{n}cos\left( \frac{x_{i}}{\sqrt{i}}\right)+1\) & 0 & \(\{0,0,\cdots,0\}\) \\ Rastrigin & \(10n+\sum\limits_{i=1}^{n}(y_{i}^{2}-10\cos(2\pi y_{i}))\) & 0 & \(\{0,0,\cdots,0\}\) \\ Quartic & \(\sum\limits_{i=1}^{n}iy_{i}^{4}+random[0,1)\) & \(0+\text{rand}\) & \(\{\sqrt{i},\sqrt{i},\cdots,\sqrt{i}\}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Multimodal benchmark functions. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Name** & **Algorithm** & **Best** & **Worst** & **Average** & **Variance** & **Time(s)** \\ \hline \multirow{6}{*}{\(F_{1}\)} & PIO & \(-200\) & \(-156.4101\) & \(-186.9236\) & \(126.6304\) & \(0.025\) \\  & SOA & \(-199.9457\) & \(-8.5804\) & \(-119.6113\) & \(10^{3}\) & \(0.009\) \\  & **GWO** & \(\mathbf{-200}\) & \(\mathbf{-199.9999}\) & \(\mathbf{-200}\) & \(\mathbf{10^{-11}}\) & \(0.010\) \\  & QBSO & \(\mathbf{-200}\) & \(-199.9996\) & \(\mathbf{-200}\) & \(10^{-9}\) & \(0.075\) \\  & BSO & \(-199.9958\) & \(-10^{-4}\) & \(-177.3426\) & \(10^{3}\) & \(0.004\) \\  & PIO & \(0.0082\) & \(137.1152\) & \(26.5353\) & \(771.5456\) & \(0.020\) \\  & SOA & \(73.2925\) & \(10^{4}\) & \(10^{4}\) & \(10^{8}\) & \(0.015\) \\ \(F_{2}\) & GWO & \(3.2853\) & \(57.7149\) & \(16.7590\) & \(111.2829\) & \(0.015\) \\  & **QBSO** & \(\mathbf{10^{-8}}\) & \(\mathbf{10^{-6}}\) & \(\mathbf{10^{-6}}\) & \(\mathbf{10^{-12}}\) & \(0.095\) \\  & BSO & \(3.4566\) & \(67.7782\) & \(21.5658\) & \(155.9654\) & \(0.010\) \\  & PIO & \(-1\) & \(-0.6185\) & \(-0.8981\) & \(0.0072\) & \(0.025\) \\  & SOA & \(-0.9635\) & \(-0.0045\) & \(-0.2380\) & \(0.0722\) & \(0.009\) \\ \(F_{3}\) & GWO & \(-1\) & \(-0.9362\) & \(-0.9478\) & \(10^{-4}\) & \(0.010\) \\  & **QBSO** & \(\mathbf{-1}\) & \(\mathbf{-1}\) & \(\mathbf{-1}\) & \(\mathbf{10^{-21}}\) & \(0.076\) \\  & BSO & \(-1\) & \(-0.4877\) & \(-0.9238\) & \(0.0079\) & \(0.003\) \\  & PIO & \(10^{-4}\) & \(10^{13}\) & \(10^{11}\) & \(10^{24}\) & \(0.031\) \\  & SOA & \(10^{10}\) & \(10^{48}\) & \(10^{47}\) & \(10^{95}\) & \(0.013\) \\ \(F_{4}\) & GWO & \(10^{5}\) & \(10^{19}\) & \(10^{17}\) & \(10^{36}\) & \(0.018\) \\  & **QBSO** & \(\mathbf{10^{-20}}\) & \(\mathbf{10^{-14}}\) & \(\mathbf{10^{-15}}\) & \(\mathbf{10^{-30}}\) & \(0.115\) \\  & BSO & \(10^{17}\) & \(10^{49}\) & \(10^{47}\) & \(10^{97}\) & \(0.048\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Results of the unimodal benchmark function experiments (population size = 8). Similarly, we randomly selected 1 result from the 100 independent runs of the multimodal optimization problem. The iterative process is presented in Figure 5. Here, for the reasons we mentioned above, the iteration curve of the algorithm for a population size of eight is not shown.