Modified Remora Optimization Algorithm (MROA) (original author)

1. Algorithm inspiration

  The Remora Optimization Algorithm (ROA) is a meta-heuristic optimization algorithm proposed in 2021. It is inspired by the parasitic behavior of the Remora in the ocean. As the smartest fish in the ocean, in order to protect itself from enemy invasion and save energy, the giant catfish will parasitize sailfish, whales or other creatures to feed. The algorithm uses Swordfish Optimization Algorithm (SFO) and Whale Optimization Algorithm (WOA ) parasitized on the body as an example. Therefore, ROA draws on some of the update formulas of SFO and WOA to perform global and local position updates. In addition, in order to determine whether the host needs to be changed, the giant catfish will move around the host in a small range, that is, to accumulate experience. If there is no need to change the host, it will forage next to the host. Figure 1 shows the detailed process of feeding by giant catfish.
SFO strategy

Figure 1 The feeding process of giant catfish

2. Algorithm introduction

2.1 Initialization phase

  In ROA, the calculation formula for initializing the position of the catfish population is as follows:
X i = lb + rand × ( ub − lb ) (1) {X_i} = lb + rand \times (ub - lb) \tag{1}Xi=lb+rand×(ublb)In formula ( 1 ) , X i {X_i}Xifor individual i {i}The position of i ,lb {lb}l bub {ub}u b is the lower and upper bounds of the search space,rand {rand}r an d is0 00 to1 1A random number between 1 .

2.2 Adsorption following (exploration phase)

2.2.1 SFO strategy

  When the giant fish is attached to the swordfish, the giant fish will move with the swordfish. Based on the elite strategy of the SFO algorithm, the formula of the SFO algorithm is improved and the following formula is obtained:
X it + 1 = XB estt − ( rand × ( XB estt + X randt 2 ) − X randt ) (2) {X_i} ^{t + 1} = {X^t_{Best}} - { { (rand}} \times { {(}}{ { {X^t_{Best}} + {X^t_{rand}}} \ over 2}{ {)}} - {X^t_{rand}}{ {)}} \tag{2}Xit+1=XBestt(rand×(2XBestt+Xrandt)Xrandt)( 2 ) Among them,t {t}t is the current number of iterations,XB estt {X^t_{Best}}XBesttis the current optimal catfish individual, X randt {X^t_{rand}}Xrandtis the current random catfish individual.

2.2.2 Experience accumulation

  When the giant fish is attached to the host, it will move in a small range around the host based on the position of the previous generation giant fish and the current host's position to determine whether the host needs to be changed. This process is similar to the accumulation of experience. The mathematical calculation formula is as follows:
X att = X it + ( X it − X pre ) × randn (3) {X_{att}} = {X_i}^t + { {(}}{ { {X}}_i}^t - { X_ { pre}}{ {)}} \times {randn} \tag{3}Xa tt=Xit+(XitXpre)×randn( 3 ) Among them,X att X_{att}Xa ttIt is a tentative move by the giant fish, X pre {X_{pre}}XpreIndicates the position of the previous generation of minnows, which can be regarded as an experience, randn randnr an d n is0 00 to1 1Normally distributed random numbers between 1 .
  After moving in a small range, Maoyugen will use formula (4) to determine whether it is necessary to switch hosts. The formula for switching hosts is as shown in formula (5):
f (X it) > f (X att) (4) f(X_i^ t) > f({X_{att}}) \tag{4}f(Xit)>f(Xa tt)(4) H ( i ) = r o u n d ( r a n d ) (5) H(i) = { {round}}({rand}) \tag{5} H(i)=round(rand)( 5 ) Among them,H ( i ) H(i)H ( i ) determines the host of the catfish parasitism. The initial value is 0 or 1. IfH (i) H(i)H ( i ) is equal to 0, then the whale is adsorbed, ifH (i) H(i)H ( i ) is equal to 1, then the swordfish is absorbed, round is the rounding function,f (X it) f(X_i^t)f(Xit) f ( X a t t ) f({X_{att}}) f(Xa tt) are respectivelyX it X_i^tXit X a t t X_{att} Xa ttfitness value.

2.3 Thinking about food (development stage)

2.3.1 WOA strategy

  When the host is a whale, the catfish will move synchronously with the whale. The calculation formula is as follows:
X it + 1 = D × ek × cos ⁡ ( 2 π a ) + X it (6) {X_i}^{t + 1} = D \times {e^k} \times \cos { {(}}2\pi a{ { )}} + {X_i}^t \tag{6}Xit+1=D×ek×cos(2πa)+Xit(6) D = ∣ X B e s t t − X i t ∣ (7) D = \left| { {X_{Best}}^t - {X_i}^t} \right| \tag{7} D= XBesttXit (7) k = r a n d × ( a − 1 ) + 1 (8) k = {rand} \times { {(}}a - 1{ {)}} + 1 \tag{8} k=rand×(a1)+1(8) a = − ( 1 + t T ) (9) a = - { {(}}1 + {t \over T}{ {)}} \tag{9} a=(1+Tt)( 9 ) Among them,DDD represents the distance between the optimal position before update and the current position,kkk is− 1 -11 to1 1a random number between 1 , aaa will be in [ − 2 , 1 ] [-2,1]during iteration[2,1 ] linearly decreases,TTT is the maximum number of iterations.

2.3.2 Foraging on the host’s side

  The foraging stage near the host is a further subdivision of the development stage. The search range is reduced. The giant catfish will look for food around the host without considering adsorption. The mathematical calculation formula is as follows: X it + 1 = X
it + A (10) {X_i}^{t + 1} = {X_i}^t + A \tag{10}Xit+1=Xit+A(10) A = B × ( X i t − C × X B e s t ) (11) A = B \times { {(}}X_i^t - C \times {X_{Best}}{ {)}} \tag{11} A=B×(XitC×XBest)(11) B = 2 × V × r a n d − V (12) B = 2 \times V \times { {rand}} - V \tag{12} B=2×V×randV(12) V = 2 ∗ ( 1 − t T ) (13) V = 2*{ {(}}1 - {t \over T}{ {)}} \tag{13} V=2(1Tt)( 13 ) Among them,AAA is the distance the giant fish moves, which is related to the size of the giant fish and the host. The giant fish factorCCC is used to limit the position of the fish, its value is0.1 0.10.1 B B B is used to simulate the volume of the host,VVV is used to simulate the volume of the catfish.

3. Improved Minyu optimization algorithm

3.1 Host switching mechanism

  ROA determines whether the host needs to be changed by comparing the fitness values ​​of the locations before and after the experience attack. The experience attack is related to the location of the previous generation of giant fish and the current host, but the giant fish mainly relies on the host to obtain food, and its own ability to forage is poor. Switching hosts through experience attacks can easily cause an imbalance between the exploration phase and the development phase. Therefore, this paper proposes a new host switching mechanism, which performs a new evaluation of the surrounding environment of the host according to formula (14), and determines whether the host needs to be switched according to formula (18). The new host switching mechanism reduces the impact of the catfish's own foraging ability and improves the performance of the algorithm.
X new = X it + k × step (14) {X_{new}} = {X_i}^t + k \times step \tag{14}Xnew=Xit+k×step(14) k = β × ( 1 − r a n d ) + r a n d (15) k = \beta \times { {(}}1 - { {rand)}} + { {rand}} \tag{15} k=b×(1rand)+rand(15) s t e p = X r 1 t − X r 2 t (16) step = {X_{r1}}^t - {X_{r2}}^t \tag{16} step=Xr 1tXr 2t(16) P = 0.5 ( 2 − t / T ) (17) P = 0.5{ {(}}2 - t/T{ {)}} \tag{17} P=0.5(2t/T)(17) f ( X n e w ) < f ( X i t ) (18) f({X_{new}}) < f(X_i^t) \tag{18} f(Xnew)<f(Xit)( 18 ) Among them,X new X_{new}Xnewis a new position around the host, kkk is a random movement factor,β ββ is used to control the movement factor. This article chooses0.2 0.20.2 , used to limit the scope of evaluation,step steps t e p represents the step size of movement,X r 1 t X_{r1}^tXr 1tand X r 2 t X_{r2}^tXr2 _tis the position of two random antoe fish individuals, f ( X new ) f(X_{new})f(Xnew) isX new X_{new}Xnewfitness value. PPP decreases linearly, because in the early stage of the iteration, due to the lack of food in the area, the giant fish will frequently evaluate the surroundings of the host to determine whether it needs to switch hosts in order to survive; after entering the food-rich area in the later stage of the iteration, due to sufficient food, the giant fish will also It will reduce the need to switch hosts, and this improvement will be more in line with the living habits of the giant fish.

3.2 Joint reverse learning

  Joint reverse learning combines the advantages of selective reverse and dynamic reverse, further balancing the exploration and development capabilities of the algorithm, while also enhancing the global nature of the algorithm and improving the algorithm's optimization capabilities.

3.2.1 Selective Leading Opposition (SLO)

  SLO is expanded from Selective Reverse (SO). It calculates the distance between the current individual and the optimal individual in each dimension and compares it with a threshold. Those greater than the threshold are distant dimensions, and those smaller than the threshold are close. distance dimension. At the same time, it is also necessary to calculate the Spearman rank correlation coefficient between the current individual and the optimal individual. For correlations less than 0 00 individuals perform selective leading and reverse learning.
Insert image description here

Figure 2 Two-dimensional schematic diagram of selective leading and reversing

  Take the two-dimensional problem as an example, as shown in Figure 2, assuming P 1 P_1P1 P 2 P_2 P2 P 3 P_3 P3Represents the position of the giant fish, GGG is the best position. Assume the threshold is3 33 P 1 P_1 P1with GGThe distance between the first dimensions of G is 5 55 , the distance between the second dimension is1 11 , only the distance between the second dimensions is smaller than the threshold. In this case, only the SLO policy is applied to the second dimension. In the same way, for individualP 2 P_2P2, only perform selective leading and reverse for the first dimension; and for individual P 3 P_3P3, both the first and second dimensions need to be selectively led and reversed.
  The calculation formula of SLO is as follows:
X i , dc ‾ = lb + ub {d_c}}} = lb + ub - {X_{i,{d_c}}}{ { \ ,}}if{ {\ }}src{ { < 0\ and\ size(}}{d_c}{ {) > size(}}{d_f}{ {)}} \tag{19}Xi,dc=lb+ubXi,dc ,if src<0 and size(dc)>size(df)(19) s r c = 1 − 6 × ∑ j = 1 d i m ( d d i , j ) 2 n × ( n 2 − 1 ) (20) src = 1 - { {6 \times \sum\limits_{j = 1}^{dim} { { {(d{d_{i,j}})}^2}} } \over {n \times ({n^2} - 1)}} \tag{20} src=1n×(n21)6×j=1dim(ddi,j)2( 20 ) Among them, is the short-distance dimension of the current individual, is the reverse position of the short-distance dimension,src srcsrc is Spearman rank correlation coefficient,size (dc) size(d_c)size(dc) s i z e ( d f ) size(d_f) size(df) are respectively the individual close distance dimensions (dc d_cdc) and distant dimensions ( df d_fdf)quantity. Calculate the distance between each dimension between the current individual and the optimal individual through formula (19), and the distance smaller than the threshold is dc d_cdc, otherwise it is df dfdf , the threshold is calculated by formula (20).
ddi , jt = ∣ X best , jt − j}^t}} \right| \tag{21}ddi,jt= Xbest,jtXi,jt (21) t h r e s h o l d = 2 − 2 t T (22) threshold = { {2 - }}{ {2t} \over T} \tag{22} threshold=2T2 t(22)

3.2.2 Dynamic opposite (SLO)

  Dynamic reverse learning combines quasi-reflective learning and quasi-reflective learning. Its advantage is that it can dynamically search the space and move asymmetrically in the search space, which helps the algorithm jump out of the local optimum. Its calculation formula is as follows.
X i ‾ = lb + ub − X i (23) \overline { {X_i}} = lb + ub - {X_i} \tag{23}Xi=lb+ubXi(23) X r = r a n d × X i ‾ (24) {X_r} = { {rand}} \times \overline { {X_i}} \tag{24} Xr=rand×Xi(24) X ‾ d o = X i + r a n d × ( X r − X i )   , i f   r a n d < j r (25) {\overline X _{do}} = {X_i} + { {rand}} \times ({X_r} - {X_i}){ { \ ,}}if{ {\ rand}} < jr \tag{25} Xdo=Xi+rand×(XrXi) ,if rand<jr( 25 ) , whereX i ‾ \overline { {X_i}}Xiis the reverse direction of the individual, X i {X_i}Xiis a random reverse solution, X r {X_r}Xris the dynamic reverse solution, jr jrj r is the jump rate, that is, the probability of dynamic reversal, textjr jrj r value is0.25 0.25The best effect is when 0.25 .

3.3 Restart strategy

  The restart strategy is generally used to help poor individuals jump out of the local optimum and get rid of stagnation. Zhang et al. used a trial vector trial (i) trial(i)t r ia l ( i ) records the time when the individual stagnates in the local optimum. If the individual's position has not been improved for a long time,trial ( i ) trial (i)t r ia l ( i ) will add1 11,否则 t r i a l ( i ) trial(i) t r ia l ( i ) will be reset to0 00 . When the individual stagnation time reaches a limit (i.e.limit limitl imi t ), two new positionsT 1 T_1T1and T 2 T_2T2, if T 2 T_2T2Beyond the boundary, the boundary is pulled back through formula (26), at T 1 T_1T1and T 2 T_2T2Choose a better position to replace the current individual's position. The limit limit of this articlel imi t is set tolnt ln^tlnt , early exploration stagelimit limitl A smaller imi t will help enhance the global nature of the algorithm. If limit limitl imi t value that is too small may cause the algorithm to be far away from the optimal solution.
T 1 = ( ub − lb ) × rand + lb (26) {T_1} = (ub - lb) \times { {rand}} + lb \tag{26}T1=(ublb)×rand+lb(26) T 2 = ( u b + l b ) × r a n d − X i (27) {T_2} = (ub + lb) \times { {rand}} - {X_i} \tag{27} T2=(ub+lb)×randXi(27) T 2 = ( u b − l b ) × r a n d + l b   , i f   T 2 > u b   ∣ ∣   T 2 < l b (28) {T_2} = (ub - lb) \times rand + lb{ {\ ,if\ }}{T_2} > ub\ ||\ {T_2} < lb \tag{28} T2=(ublb)×rand+lb ,if T2>ub ∣∣ T2<lb(28)

3.4 Pseudocode of MROA

  1. Initialize the number of minnows NNN and the maximum number of iterationsTTT etc.
  2. Initialization population: X i ( i = 1 , 2 , . . . , N ) X_i(i=1,2,...,N)Xi(i=1,2,...,N)
  3. While t < T t<T t<T do
  4.   Check if there is a minnow that exceeds the search space and modify it
  5.   Calculate the hunger value (fitness value) of each fish, and find the fullest fish X best X_{best}Xbest
  6.   Selective leading reversal through formula (19)
  7.   For i = 1 i=1 i=1 to NNN do
  8.     If H ( i ) H(i) H(i)==0 then
  9.       Use formula (6) to update the location taken by the whale
  10.     Else If H ( i ) H(i) H(i)==1 then
  11.       Use formula (2) to update the position taken by the swordfish
  12.     End If
  13.     Accumulate experience through formula (3) and determine whether to change the host
  14. Update PP     using formula (17)P
  15.     If r a n d < P rand<P rand<P then
  16.       Use formula (14) to evaluate the surrounding environment of the host
  17.       If f ( X i t ) > f ( X a t t ) f(X_i^t)>f({X_{att}}) f(Xit)>f(Xa tt) then
  18.         Use formula (5) to switch hosts
  19.       End If
  20.     End If
  21.     Use formula (10) for host-side foraging
  22.     Joint reverse learning through formula (23)
  23. Update trial(i) trial(i)     for each search agenttrial(i)
  24.     If t r i a l ( i ) > l i m i t trial(i)>limit trial(i)>limit then
  25.       Generate two positions through formulas (24) and (25)
  26.       Keep the giant fish with smaller hunger value
  27.     End If
  28.   End For
  29.    t = t + 1 t=t+1 t=t+1
  30. End While
  31. Return the fullest fish (optimal solution) X best X_{best}Xbest

4. Experimental results

  MROA and ROA in 23 classic test functions (set dimension dim = 30 dim=30dim=30 ) The convergence curves in F2, F5, and F6, the test function formula is as follows:

function official Theoretical value
F2 F 2 ( x ) = ∑ i = 1 n ∣ x i ∣ + ∏ i = 1 n ∣ x i ∣ {F_2}(x) = \sum\nolimits_{i = 1}^n {\left| { {x_i}} \right|} + \prod _{i = 1}^n\left| { {x_i}} \right| F2(x)=i=1nxi+i=1nxi 0.00 0.00 0.00
F5 F 5 ( x ) = ∑ i = 1 d − 1 [ 100 ( x i + 1 − x i 2 ) 2 + ( x i − 1 ) 2 ] {F_5}(x) = \sum\nolimits_{i = 1}^{d - 1} {[100{ {({x_{i + 1}} - x_i^2)}^2} + { {({x_i} - 1)}^2}]} F5(x)=i=1d1[100(xi+1xi2)2+(xi1)2] 0.00 0.00 0.00
F6 F 6 ( x ) = ∑ i = 1 d ( x i + 5 ) 2 {F_6}(x) = {\sum\nolimits_{i = 1}^d {({x_i} + 5)} ^2} F6(x)=i=1d(xi+5)2 0.00 0.000.00

4. 1 F2 convergence curve

Insert image description here

4. 1 F5 convergence curve

Insert image description here

4. 1 F6 convergence curve

Insert image description here

5. References

[1] Wen C, Jia H, Wu D, et al. Modified remora optimization algorithm with multistrategies for global optimization problem[J]. Mathematics, 2022, 10(19), 3604.

Guess you like

Origin blog.csdn.net/jiaheming1983/article/details/129382917