## 5 Build an Optimal Security Strategy
### Framework of RODE
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Attribute** & **Priori** & **Attribute** & **Priori** & **Attribute** & **Priori** \\
**Notes** & **Probability** & **Notes** & **Probability** & **Notes** & **Probability** \\ \hline S1 & 0.5000 & S2 & 0.1811 & S3 & 0.5000 \\ S4 & 1.0000 & S5 & 1.0000 & S6 & 1.0000 \\ S7 & 0.3967 & S8 & 0.5100 & S9 & 1.0000 \\ S10 & 1.0000 & S11 & 1



Figure 9 shows the experimental results when the initial population number is 20. It can be seen that when the initial population size is particularly small, that is, when the population diversity is not rich, the performance of the algorithm is inhibited to a certain extent. Among them, the effects of PSO, DE, RLPSO and RLDE are not as good as those of the first experiment, and relative to the first experiment, RLDE and DE failed to jump out of the local optimal solution even in the case of 100 iterations in this experiment. In the thirtieth generation, RODE jumped out of the local optimal solution and still converged to the optimal solution 459.4463, which is the same as the experimental result of the initial population number of 200. Figure 8: Experimental comparison with an initial population of 200. Figure 9: Experimental comparison with an initial population of 20. In order to further prove the good robustness of the RODE algorithm, we conducted the second type of experiments. This experiment is based on the initial population size of 200 and 10, and we let each algorithm run 100 times. Our main purpose is to observe the convergence speed and convergence accuracy of various algorithms under different initial population sizes. The experimental results when the initial population size is 200 are shown in Figure 10. Among them, PSO falls into the local optimal solution 91 times, DE falls into the local optimal solution 91 times, RDE falls into the local optimal solution zero times, RLPSO falls into the local optimal solution 76 times, RDE falls into the local optimal solution four times, and RODE falls into the local optimal solution zero times. Although neither DE nor the RODE algorithm has fallen into local optimization, it is obvious that RODE has converged near the optimal solution in the second generation, and its convergence speed is significantly faster than that of DE. At the same time, it can be seen that the convergence speed of the algorithm that introduced reinforcement learning has been significantly improved. The experimental results when the initial population size is 10 are shown in Figure 11.

When the initial population size is 10, PSO falls into the local optimal solution 100 times, DE falls into the local optimal solution 75 times, RLPSO falls into the local optimal solution 99 times, and RLDE falls into the local optimal solution 99 times. There are 16 times the RODE becomes stuck in a local optimal solution. For this reason, we can see that when the initial population size is only 10, except for the RODE algorithm that introduces opposition-based learning, the convergence accuracy of the remaining algorithms is extremely poor. The comparison results of RODE and other algorithms are shown in the following Figure 7.0

Figure 7.1 Algorithm convergence test when the initial population size is 200. (**a**) DE algorithm runs 100 times. (**b**) PSO algorithm runs 100 times. (**c**) RLDE algorithm runs 100 times. (**d**) RLPSO algorithm runs 100 times. (**e**) RODE algorithm runs 100 times. Through the comparison of two experiments, we can find that when the initial population size is large, the convergence accuracy of the algorithm is high, and the convergence speed of the algorithm incorporating reinforcement learning is significantly improved. When the population size is very small, the convergence performance of DE, PSO, RLPSO and RLDE algorithms becomes particularly poor, and it is difficult for them to jump out of the local optimal solution effectively under the condition of 100 iterations. However, RODE can still maintain a high convergence accuracy.