1.背景
2024年,K Cymerys受到自然界中吸引-排斥现象启发,提出了吸引-排斥优化算法(Attraction–Repulsion Optimization Algorithm, AROA)。
2.算法原理
2.1算法思想
AROA模仿了自然界中发生的吸引-排斥现象的相关平衡,其中候选解决方案根据其邻域中的解决方案质量以及最佳候选方案在搜索空间中移动。
2.2算法过程
吸引和排斥
候选解的位置根据群体其他成员所达到的适应度信息更新,取决于群体成员之间的距离。
d
2
(
x
i
,
x
j
)
=
∑
k
=
1
d
i
m
(
x
i
k
−
x
j
k
)
2
(1)
d^{2}(\mathbf{x_{i}},\mathbf{x_{j}})=\sum_{k=1}^{dim}(x_{i}^{k}-x_{j}^{k})^{2}\tag{1}
d2(xi,xj)=k=1∑dim(xik−xjk)2(1)
向量ni被添加到候选解的位置:
n
i
=
1
n
∑
i
=
1
k
c
⋅
(
x
j
−
x
i
)
⋅
I
(
d
i
,
j
,
d
i
,
m
a
x
)
⋅
s
(
f
i
,
f
j
)
(2)
\mathbf{n_i}=\frac{1}{n}\sum_{i=1}^{k}c\cdot(\mathbf{x_j}-\mathbf{x_i})\cdot I(d_{i,j},d_{i,max})\cdot s(f_i,f_j)\tag{2}
ni=n1i=1∑kc⋅(xj−xi)⋅I(di,j,di,max)⋅s(fi,fj)(2)
其中c是步长,I是评估解决方案影响的函数:
I
(
d
i
,
j
,
d
i
,
m
a
x
)
=
1
−
d
i
,
j
d
i
,
m
a
x
(3)
I(d_{i,j},d_{i,max})=1-\frac{d_{i,j}}{d_{i,max}}\tag{3}
I(di,j,di,max)=1−di,maxdi,j(3)
函数s决定了变化的方向:
s
(
f
i
,
f
j
)
=
{
1
f
i
>
f
j
0
f
i
=
f
j
−
1
f
i
<
f
j
(4)
s(f_i,f_j)=\begin{cases}1&f_i>f_j\\0&f_i=f_j\\-1&f_i<f_j\end{cases}\tag{4}
s(fi,fj)=⎩
⎨
⎧10−1fi>fjfi=fjfi<fj(4)
邻居数量k:
k
=
⌊
(
1
−
t
t
m
a
x
)
⋅
n
⌋
+
1
(5)
k=\lfloor(1-\frac{t}{t_{max}})\cdot n\rfloor+1\tag{5}
k=⌊(1−tmaxt)⋅n⌋+1(5)
tmax最大迭代次数:
t
m
a
x
=
⌈
f
e
s
m
a
x
−
n
2
n
⌉
(6)
t_{max}=\lceil\frac{fes_{max}-n}{2n}\rceil\tag{6}
tmax=⌈2nfesmax−n⌉(6)
吸引最优解
影响候选解决方案在搜索空间中的位置的下一个因素是根据其对最佳解决方案𝐛𝐢的吸引力来确定的:
b
i
=
{
c
⋅
m
⋅
(
x
b
e
s
t
−
x
i
)
r
1
≥
p
1
c
⋅
m
⋅
(
a
1
⊙
x
b
e
s
t
−
x
i
)
r
1
<
p
1
(7)
\mathbf{b_i}=\begin{cases}c\cdot m\cdot(\mathbf{x_{best}}-\mathbf{x_i})&r_1\geq p_1\\c\cdot m\cdot(\mathbf{a_1}\odot\mathbf{x_{best}}-\mathbf{x_i})&r_1<p_1\end{cases}\tag{7}
bi={c⋅m⋅(xbest−xi)c⋅m⋅(a1⊙xbest−xi)r1≥p1r1<p1(7)
m是平衡因子:
m
=
1
2
(
exp
(
z
)
−
1
exp
(
z
)
+
1
+
1
)
(8)
m=\frac{1}{2}(\frac{\exp(z)-1}{\exp(z)+1}+1)\tag{8}
m=21(exp(z)+1exp(z)−1+1)(8)
其中,z表述为:
z
=
18
⋅
t
/
t
m
a
x
−
4
(9)
z = 18\cdot t/t_{max} - 4\tag{9}
z=18⋅t/tmax−4(9)
局部搜索算子
修正布朗运动:
r
B
=
u
1
⊙
N
(
0
,
f
r
1
⋅
(
1
−
t
t
m
a
x
)
⋅
(
x
m
a
x
−
x
m
i
n
)
)
(10)
\mathbf{r_B}=\mathbf{u_1}\odot\mathbf{N}(0,fr_1\cdot(1-\frac{t}{t_{max}})\cdot(\mathbf{x_{max}}-\mathbf{x_{min}}))\tag{10}
rB=u1⊙N(0,fr1⋅(1−tmaxt)⋅(xmax−xmin))(10)
三角函数轮盘赌轮策略:
r
t
r
i
=
{
f
r
2
⋅
u
2
⋅
(
1
−
t
t
m
a
x
)
⋅
sin
(
2
r
5
π
)
⊙
∣
a
2
⊙
x
w
−
x
i
∣
r
4
<
0.5
f
r
2
⋅
u
2
⋅
(
1
−
t
t
m
a
x
)
⋅
cos
(
2
r
5
π
)
⊙
∣
a
2
⊙
x
w
−
x
i
∣
r
4
≥
0.5
(11)
\mathbf{r_{tri}}=\begin{cases}fr_2\cdot\mathbf{u_2}\cdot(1-\frac{t}{t_{max}})\cdot\sin(2r_5\pi)\odot|\mathbf{a_2}\odot\mathbf{x_w}-\mathbf{x_i}|&r_4<0.5\\fr_2\cdot\mathbf{u_2}\cdot(1-\frac{t}{t_{max}})\cdot\cos(2r_5\pi)\odot|\mathbf{a_2}\odot\mathbf{x_w}-\mathbf{x_i}|&r_4\ge0.5\end{cases}\tag{11}
rtri={fr2⋅u2⋅(1−tmaxt)⋅sin(2r5π)⊙∣a2⊙xw−xi∣fr2⋅u2⋅(1−tmaxt)⋅cos(2r5π)⊙∣a2⊙xw−xi∣r4<0.5r4≥0.5(11)
在AROA中,局部搜索算子采用SCA的轮盘选择,最优解的选择采用贪婪选择方法。前两种算子考虑了当前执行迭代的数量,旨在用于探索或开发阶段。在搜索空间中随机选择一个位置丰富种群多样性:
r
R
=
u
3
⊙
(
2
⋅
a
3
−
o
)
⊙
(
x
m
a
x
−
x
m
i
n
)
(12)
\mathbf{r_{R}}=\mathbf{u_{3}}\odot(2\cdot\mathbf{a_{3}}-\mathbf{o})\odot(\mathbf{x_{max}}-\mathbf{x_{min}})\tag{12}
rR=u3⊙(2⋅a3−o)⊙(xmax−xmin)(12)
位置ri:
r
i
=
{
{
r
B
r
3
>
0.5
⋅
t
t
m
a
x
+
0.25
r
t
r
i
r
3
≤
0.5
⋅
t
t
m
a
x
+
0.25
r
2
<
p
2
r
R
r
2
≥
p
2
(13)
\mathbf{r_i}=\begin{cases}\begin{cases}\mathbf{r_B}&r_3>0.5\cdot\frac{t}{t_{max}}+0.25\\\mathbf{r_{tri}}&r_3\leq0.5\cdot\frac{t}{t_{max}}+0.25\end{cases}&r_2<p_2\\\\\mathbf{r_R}&r_2\geq p_2\end{cases}\tag{13}
ri=⎩
⎨
⎧{rBrtrir3>0.5⋅tmaxt+0.25r3≤0.5⋅tmaxt+0.25rRr2<p2r2≥p2(13)
位置更新:
x
i
(
t
)
=
x
i
(
t
−
1
)
+
n
i
+
b
i
+
r
i
(14)
\mathbf{x_{i}(t)=x_{i}(t-1)+n_{i}+b_{i}+r_{i}}\tag{14}
xi(t)=xi(t−1)+ni+bi+ri(14)
基于种群的算子
x i = { x i + c f ⋅ ( u 4 ⊙ ( a 4 ⊙ ( x m a x − x m i n ) + x m i n ) ) r 6 < e f x i + ( e f ⋅ ( 1 − r 7 ) + r 7 ) ( x r 8 − x r 9 ) r 6 ≥ e f (15) \mathbf{x_i}=\begin{cases}\mathbf{x_i}+c_f\cdot(\mathbf{u_4}\odot(\mathbf{a_4}\odot(\mathbf{x_{max}}-\mathbf{x_{min}})+\mathbf{x_{min}}))&r_6<e_f\\\mathbf{x_i}+(e_f\cdot(1-r_7)+r_7)(\mathbf{x_{r8}}-\mathbf{x_{r9}})&r_6\geq e_f\end{cases}\tag{15} xi={xi+cf⋅(u4⊙(a4⊙(xmax−xmin)+xmin))xi+(ef⋅(1−r7)+r7)(xr8−xr9)r6<efr6≥ef(15)
伪代码
3.结果展示
4.参考文献
[1] Cymerys K, Oszust M. Attraction–Repulsion Optimization Algorithm for Global Optimization Problems[J]. Swarm and Evolutionary Computation, 2024, 84: 101459.