## 4 Experimental Results and Analysis
### 0-1 Knapsack Problem  
The classic 0-1 knapsack problem involves selecting from a set of items, each with its own volume and value, while aiming to maximize the total value within a fixed capacity constraint. We employed OCA to address the classical 0-1 knapsack problem to demonstrate its versatility. Furthermore, we compared OCA with other optimization algorithms such as GA, PSO, SSA, and ARO for performance evaluation. We set the size of the population, the maximum number of iterations for the population, and the maximum capacity of the backpack as 35, 100, and 150, respectively. The value and weight of the items are shown in Table 4. We used OCA, GA, PSO, SSA, and ARO to compute the theoretical maximum value of items in the knapsack. We randomly selected one experiment and plotted the convergence curve, as shown in Figure 6. We considered the value of items inside the knapsack as the fitness value of the function and aimed to find the maximum value as the search result. We can see that the OCA algorithm found the optimal result of 330 kg, while other algorithms did not find the optimal result in this search. The horizontal axis and the vertical axis represent the number of generations and the maximum value in the knapsack, respectively. We can see that although GA had a faster convergence speed than OCA, GA did not search for the optimal result in the fourth generation. OCA also had a very good convergence speed and converged in the fifth generation. PSO, SSA, and ARO converged only at 16, 34, and 39, respectively. The mechanisms of the determination of safety zones and zone competition in OCA accelerate the computational efficiency of the algorithm. Therefore, OCA exhibits a faster convergence rate. In Table 5, see a comparison of GA, PSO, SSA, ARO, and OCA over 500 Monte-Carlo trails. The average value reflects the overall performance of an algorithm. By comparing the average values, we can evaluate the relative efficiency of algorithms in solving the knapsack problem. OCA has the highest average value among all algorithms, indicating that OCA is more advantageous in addressing this problem. The standard deviation reflects the dispersion of data points, where a larger standard deviation indicates a wider range of variation in the data, while a smaller standard deviation suggests that the data is clustered more closely around the mean value, indicating a smaller range of variation. Therefore, the standard deviation can be used to evaluate the stability and predictability of data. OCA has the lowest standard deviation, indicating that it has better stability and consistency. The maximum value represents the quality of the optimal solution of the algorithm. OCA and ARO have both found the maximum value in the search for the knapsack problem. In solving the knapsack problem, a higher maximum value represents a better algorithm. The minimum value obtained by swarm intelligence algorithms for solving knapsack \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline
**No.** & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 \\
**Weight (kg)** & 11 & 23 & 19 & 31 & 12 & 26 & 22 & 18 & 4 \\
**Value** & 19 & 29 & 25 & 32 & 29 & 40 & 39 & 27 & 32 \\ \hline
**No.** & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 \\
**Weight (kg)** & 7 & 28 & 17 & 29 & 12 & 11 & 24 & 10 & 24 \\
**Value** & 34 & 39 & 28 & 24 & 25 & 25 & 43 & 29 & 31 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Properties of items in the knapsack. problems provides a measure of the worst-case solution found by the algorithm. From the table, it can be seen that the worst solution, 319, of OCA, is also higher than that of the other algorithms. The proportion of the maximum value of the results of solving knapsack problems using swarm intelligence algorithms represents the proportion of the maximum value to the total solution space. A higher proportion of maximum values means that the algorithm can find solutions closer to the optimal solution more frequently when solving knapsack problems.