Multi-strategy improved dung beetle optimization - spiral search + optimal value guidance + reverse learning strategy

Disclaimer: Resale and reselling of the author's original code is prohibited, and violators will be prosecuted!

There are many principles of the dung beetle algorithm on the Internet, so I will not introduce them in detail in this article. The algorithm in this issue was improved by the author after referring to some literature on the Internet. Next, I will go directly to the improvement strategy:

① Spiral search strategy

In the dung beetle optimization algorithm (DBO), if we propagate chicks in the spawning area according to the current method, this will definitely cause the population to converge quickly in a short time, but it will also lead to a reduction in the diversity of the population, and it is easy for the algorithm to fall into local Optimal; therefore, improve this formula in the reproduction phase of the dung beetle algorithm

fe3d8776f563899fe433655844f4fa9f.png

Inspired by the head whale population rounding up prey in the whale algorithm, during the iterative process of the whale algorithm, individual whales will use a spiral search strategy to update their position with the prey, which not only ensures the convergence speed of the algorithm, but also increases the diversity of individuals. The formula for whale rounding up prey stages is as follows:

da6be25be0b00db89d22d9e1342da4b4.png

But this strategy is easily affected by the definition of parameter c. A larger c will cause the algorithm to decay too quickly, leading to a local optimum of the algorithm, while a smaller c will cause the algorithm to converge slowly. In order to solve this problem, the parameter r of the dynamic spiral search shape is introduced

0adbd31659888760398eb202f999a599.png

The spiral search strategy is used to improve the reproduction phase of the dung beetle algorithm. The updated dung beetle algorithm formula is as follows:

092ad948e1f3a742098d12fd484026f0.png

At this time, the schematic diagram of the dung beetle’s search path is as follows:

7c1c6fe2e3dfd372f4343f4c94f15e0c.png

② Optimal value guidance strategy

In the foraging phase of the dung beetle algorithm, the generation of candidate solutions is affected by two random numbers (K1 and K2), which make the probability of generating better and worse candidate solutions equal. Guide the generation of candidate solutions by introducing the current optimal value. The new formula is shown below.

d7c2a2d3a2da47aa43bfba53c7a8ca04.png

③Lens imaging reverse learning strategy

The main idea of ​​lens imaging reverse learning is to use the current coordinates as the basis to generate a reverse position through the principle of convex lens imaging to expand the search range. This can not only jump out of the current position, but also expand the search range of the dung beetle algorithm, improving the dung beetle algorithm. Diversity of the population. The reverse learning formula based on the lens imaging principle is as follows:

8372c0c33f61321cd5c61c8da5e525fb.png

Results display

Tested on the CEC2017 function set (F2 has been deleted from the 2017 official function), the results are as follows. MODBO is an improved dung beetle algorithm, and DBO is the original dung beetle algorithm.

a37ff2c7eb0b5afd41012f330f9e4817.png

b9a7fcf4f0ee5a8f15e9cd83d9ea5d7b.png

cdf3cc0631a2bf267ca1b066bd8421cc.png

29213ddbc75e29a8b7d6a0b57a906a0e.png

fd2691d2a16ef2c52965fc9145e3fdff.png

Here are some screenshots, and you can see that the test results of the CEC2017 function are still very good.

Each algorithm is iterated 500 times, the number of dung beetles is set to 30, and each function is run 30 times. A total of five indicators such as the optimal value, the worst value, the average value, the variance, and the median value are found as follows:

F1函数计算结果:
DBO:最优值:26587534.2785 最差值:885296187.7384 平均值:278519926.4607 方差:202589254.7595 中值:242508285.8441
MODBO:最优值:176099.8914 最差值:271151324.3789 平均值:76067397.0683 方差:71555724.9635 中值:58119739.0369
F3函数计算结果:
DBO:最优值:68234.7729 最差值:183691.5791 平均值:94827.9013 方差:24515.5456 中值:85710.8004
MODBO:最优值:43495.1783 最差值:88562.5671 平均值:72813.6786 方差:12252.9688 中值:73870.7348
F4函数计算结果:
DBO:最优值:527.017 最差值:1040.0388 平均值:680.6191 方差:117.5707 中值:652.1021
MODBO:最优值:489.6904 最差值:667.7609 平均值:578.4681 方差:46.3321 中值:578.3268
F5函数计算结果:
DBO:最优值:634.5203 最差值:852.6906 平均值:745.2637 方差:56.4961 中值:746.7405
MODBO:最优值:605.4213 最差值:745.3838 平均值:670.8696 方差:37.2748 中值:660.932
F6函数计算结果:
DBO:最优值:628.5647 最差值:674.6842 平均值:651.2125 方差:12.7984 中值:652.1216
MODBO:最优值:615.4098 最差值:645.7538 平均值:631.779 方差:8.2401 中值:630.2963
F7函数计算结果:
DBO:最优值:881.1188 最差值:1181.8156 平均值:1007.7016 方差:81.108 中值:997.6261
MODBO:最优值:845.7382 最差值:1171.3257 平均值:982.2269 方差:74.989 中值:980.622
F8函数计算结果:
DBO:最优值:900.0545 最差值:1115.7526 平均值:1015.9085 方差:61.7286 中值:1021.6189
MODBO:最优值:876.7522 最差值:997.2142 平均值:935.4958 方差:29.6456 中值:931.9413
F9函数计算结果:
DBO:最优值:3228.5143 最差值:10660.7884 平均值:6865.7482 方差:2069.9942 中值:6568.7554
MODBO:最优值:2356.5046 最差值:9446.0883 平均值:4412.454 方差:1663.8413 中值:3953.9179
F10函数计算结果:
DBO:最优值:4148.651 最差值:9271.6793 平均值:6483.3671 方差:1227.6979 中值:6151.3225
MODBO:最优值:4538.1623 最差值:9031.1333 平均值:6957.6103 方差:1492.6158 中值:7124.0549
F11函数计算结果:
DBO:最优值:1365.6167 最差值:5717.5147 平均值:2127.2572 方差:950.7368 中值:1774.9541
MODBO:最优值:1249.599 最差值:1584.6569 平均值:1372.9834 方差:82.0467 中值:1353.0988
F12函数计算结果:
DBO:最优值:1636631.9163 最差值:1000605880.0255 平均值:138651222.4276 方差:260670382.031 中值:28103706.5293
MODBO:最优值:741235.8851 最差值:111300910.1722 平均值:17658055.4028 方差:26724635.2059 中值:7560605.797
F13函数计算结果:
DBO:最优值:16922.7094 最差值:64250525.1866 平均值:7551744.9668 方差:15191181.2581 中值:863733.2001
MODBO:最优值:12200.7897 最差值:4332334.3432 平均值:844642.7411 方差:1429735.1549 中值:134109.2547
F14函数计算结果:
DBO:最优值:3628.8755 最差值:2211506.826 平均值:260147.4974 方差:404203.3378 中值:133263.6727
MODBO:最优值:3491.3099 最差值:373667.4927 平均值:100189.6526 方差:86068.427 中值:88233.6257
F15函数计算结果:
DBO:最优值:7695.8216 最差值:28689714.0636 平均值:1020109.4677 方差:5226163.1995 中值:57025.5877
MODBO:最优值:2563.149 最差值:259576.8021 平均值:51882.9929 方差:60308.523 中值:30131.2416
F16函数计算结果:
DBO:最优值:2442.877 最差值:4334.1086 平均值:3380.7791 方差:437.699 中值:3427.9563
MODBO:最优值:2564.1835 最差值:4099.5328 平均值:3198.7369 方差:386.1529 中值:3065.507
F17函数计算结果:
DBO:最优值:2059.4696 最差值:3352.611 平均值:2751.7228 方差:322.2462 中值:2666.2677
MODBO:最优值:2045.3209 最差值:2946.2829 平均值:2520.9179 方差:222.8829 中值:2547.0677
F18函数计算结果:
DBO:最优值:111995.098 最差值:19260406.0013 平均值:4264684.775 方差:5255649.3308 中值:1371475.4517
MODBO:最优值:68714.5908 最差值:10547312.9839 平均值:1481340.6368 方差:2029044.5584 中值:898592.8427
F19函数计算结果:
DBO:最优值:5683.5719 最差值:127030449.7168 平均值:6205389.826 方差:23073920.4903 中值:385245.8425
MODBO:最优值:2395.6836 最差值:2280405.74 平均值:343450.7177 方差:601022.5335 中值:33246.0295
F20函数计算结果:
DBO:最优值:2258.4158 最差值:3179.5373 平均值:2721.4361 方差:243.5226 中值:2673.5387
MODBO:最优值:2253.2546 最差值:2935.108 平均值:2547.2821 方差:163.9393 中值:2542.5695
F21函数计算结果:
DBO:最优值:2441.0167 最差值:2681.4322 平均值:2560.6592 方差:57.929 中值:2543.5668
MODBO:最优值:2329.3153 最差值:2650.5783 平均值:2501.5493 方差:65.9737 中值:2503.3205
F22函数计算结果:
DBO:最优值:2335.8041 最差值:9005.9585 平均值:5147.7854 方差:2563.4733 中值:6307.0029
MODBO:最优值:2341.8913 最差值:2482.0399 平均值:2379.9522 方差:36.0528 中值:2365.957
F23函数计算结果:
DBO:最优值:2814.5573 最差值:3110.1696 平均值:2971.2078 方差:82.9108 中值:2974.881
MODBO:最优值:2780.6881 最差值:3069.9764 平均值:2914.6333 方差:80.6054 中值:2885.1952
F24函数计算结果:
DBO:最优值:3037.3823 最差值:3364.1985 平均值:3181.3893 方差:87.9974 中值:3200.8671
MODBO:最优值:2958.5651 最差值:3242.334 平均值:3099.0717 方差:86.5973 中值:3119.6384
F25函数计算结果:
DBO:最优值:2886.8655 最差值:3132.0272 平均值:2976.574 方差:59.3269 中值:2964.1102
MODBO:最优值:2887.4245 最差值:3017.7836 平均值:2931.109 方差:34.0427 中值:2932.7968
F26函数计算结果:
DBO:最优值:5705.6121 最差值:8479.805 平均值:6928.252 方差:753.7997 中值:6805.2349
MODBO:最优值:3125.2728 最差值:7889.8513 平均值:6319.2604 方差:1123.6276 中值:6616.5321
F27函数计算结果:
DBO:最优值:3222.1202 最差值:3502.0427 平均值:3329.845 方差:67.8683 中值:3327.1453
MODBO:最优值:3222.4915 最差值:3412.8692 平均值:3278.3387 方差:38.4615 中值:3270.9476
F28函数计算结果:
DBO:最优值:3308.6423 最差值:5999.3597 平均值:3805.3548 方差:745.1675 中值:3481.9717
MODBO:最优值:3213.5795 最差值:3474.7211 平均值:3338.6909 方差:54.5755 中值:3338.2342
F29函数计算结果:
DBO:最优值:3707.9156 最差值:5630.6197 平均值:4508.4204 方差:446.8148 中值:4528.4465
MODBO:最优值:3762.919 最差值:5242.045 平均值:4262.0952 方差:340.2025 中值:4193.3854
F30函数计算结果:
DBO:最优值:23738.894 最差值:18437793.6046 平均值:3256963.3511 方差:4381907.9519 中值:1187816.4769
MODBO:最优值:11592.0291 最差值:22223495.0405 平均值:2676568.7866 方差:4774300.516 中值:894187.27

According to the statistical results, it can be seen that the improved dung beetle algorithm (MODBO) performs best among the five indicators!

Code display

The code directory is as follows:

ecf8ae2f2781d83f15f7e83d68a9de9d.png

The author has compiled the function set of cec2017 and can run it directly on the computer. Among them , main.m is used for drawing , and runs_Main.m is used for counting the results of multiple runs.

code acquisition

How to obtain the complete code: Reply keywords in the background, case-insensitive. Keywords:

MODBO

Or click the jump link below to read the original text.

Recommendations for improving the dung beetle algorithm in the past:

Improved dung beetle optimization--adopting Levi's flight and triangle wandering strategies

Improved sine algorithm guided dung beetle optimization algorithm (MSADBO)

Guess you like

Origin blog.csdn.net/woaipythonmeme/article/details/133155063