1.背景
2024年,J Bai受到吸血水蛭觅食行为启发,提出了吸血水蛭优化算法(Blood-Sucking Leech Optimizer, BSLO)。
2.算法原理
2.1算法思想
BSLO灵感来自吸血水蛭觅食行为,其通过五种狩猎策略建模,包括有方向水蛭的探索、有方向水蛭的开发、有方向水蛭的切换机制、无方向水蛭的搜索策略以及重追踪策略。
水蛭分为两种类型,包括有方向的水蛭和无方向的水蛭。有方向的水蛭在接触到人类产生的圆形波动刺激时,可以朝着猎物以α度的角度游动。其他无方向的水蛭则在搜索空间内随机游动。咬了人类一段时间后,水蛭会被人类随机扔回稻田,并再次寻找人类。
N
1
=
f
l
o
o
r
(
N
×
(
m
+
(
1
−
m
)
×
(
t
T
)
2
)
)
N
2
=
N
−
N
1
(1)
\begin{aligned}&N_{1}=floor\left(N\times\left(m+(1-m)\times\left(\frac{t}{T}\right)^{2}\right)\right)\\&N_{2}=N-N_{1}\end{aligned}\tag{1}
N1=floor(N×(m+(1−m)×(Tt)2))N2=N−N1(1)
2.2算法过程
定向水蛭的探索策略
水蛭的探索方式:
X
(
i
,
j
)
t
+
1
=
{
X
(
i
,
j
)
t
+
W
1
×
X
(
i
,
j
)
t
−
L
1
r
a
n
d
<
a
&
∣
P
r
e
y
(
j
)
∣
>
∣
X
(
i
,
j
)
t
∣
X
(
i
,
j
)
t
+
W
1
×
X
(
i
,
j
)
t
+
L
1
r
a
n
d
<
a
&
∣
P
r
e
y
(
j
)
∣
<
∣
X
(
i
,
j
)
t
∣
X
(
i
,
j
)
t
+
W
1
×
X
(
i
,
k
)
t
−
L
2
r
a
n
d
>
a
&
∣
P
r
e
y
(
j
)
∣
>
∣
X
(
i
,
j
)
t
∣
X
(
i
,
j
)
t
+
W
1
×
X
(
i
,
k
)
t
+
L
2
r
a
n
d
>
a
&
∣
P
r
e
y
(
j
)
∣
<
∣
X
(
i
,
j
)
t
∣
(2)
\left.X_{(i,j)}^{t+1}=\left\{\begin{array}{l}X_{(i,j)}^t+W_1\times X_{(i,j)}^t-L_1 rand<a \& \left|Prey_{(j)}\right|>\left|X_{(i,j)}^t\right|\\X_{(i,j)}^t+W_1\times X_{(i,j)}^t+L_1 rand<a \& \left|Prey_{(j)}\right|<\left|X_{(i,j)}^t\right|\\X_{(i,j)}^t+W_1\times X_{(i,k)}^t-L_2 rand>a \& \left|Prey_{(j)}\right|>\left|X_{(i,j)}^t\right|\\X_{(i,j)}^t+W_1\times X_{(i,k)}^t+L_2 rand>a \& \left|Prey_{(j)}\right|<\left|X_{(i,j)}^t\right|\end{array}\right.\right.\tag{2}
X(i,j)t+1=⎩
⎨
⎧X(i,j)t+W1×X(i,j)t−L1rand<a&
Prey(j)
>
X(i,j)t
X(i,j)t+W1×X(i,j)t+L1rand<a&
Prey(j)
<
X(i,j)t
X(i,j)t+W1×X(i,k)t−L2rand>a&
Prey(j)
>
X(i,j)t
X(i,j)t+W1×X(i,k)t+L2rand>a&
Prey(j)
<
X(i,j)t
(2)
扰动系数:
W
1
=
b
×
(
1
−
t
T
)
×
L
V
(
i
,
j
)
(3)
W_1=b\times\left(1-\frac{t}{T}\right)\times LV_{(i,j)}\tag{3}
W1=b×(1−Tt)×LV(i,j)(3)
参数L1,L2:
L
1
=
r
1
×
∣
P
r
e
y
(
j
)
−
X
(
i
,
j
)
t
∣
×
P
D
×
(
1
−
k
2
N
)
L
2
=
∣
P
r
e
y
(
j
)
−
X
(
i
,
k
)
t
∣
×
P
D
×
(
1
−
r
1
2
×
k
2
N
)
(4)
L_{1}=r_{1}\times\left|Prey_{(j)}-X_{(i,j)}^{t}\right|\times PD\times\left(1-\frac{k_{2}}{N}\right)\\L_{2}=\left|Prey_{(j)}-X_{(i,k)}^{t}\right|\times PD\times\left(1-r_{1}^{2}\times\frac{k_{2}}{N}\right)\tag{4}
L1=r1×
Prey(j)−X(i,j)t
×PD×(1−Nk2)L2=
Prey(j)−X(i,k)t
×PD×(1−r12×Nk2)(4)
PD称为感知距离,用来模拟水蛭感知到的距离:
P
D
=
s
×
(
1
−
t
T
)
×
r
2
s
=
{
8
−
(
−
(
t
T
)
2
+
1
)
i
f
r
a
n
d
<
0.5
8
−
7
×
(
−
(
t
T
)
2
+
1
)
o
t
h
e
r
w
i
s
e
(5)
\begin{aligned} &PD=s\times\left(1-\frac{t}{T}\right)\times r_{2} \\ &\left.s=\left\{\begin{array}{ll}{8-\left(-\left(\frac{t}{T}\right)^{2}+1\right) if rand<0.5}\\\\{8-7 \times\left(-\left(\frac{t}{T}\right)^{2}+1\right) otherwise}\end{array}\right.\right. \end{aligned}\tag{5}
PD=s×(1−Tt)×r2s=⎩
⎨
⎧8−(−(Tt)2+1)ifrand<0.58−7×(−(Tt)2+1)otherwise(5)
定向水蛭的开发策略
N1水蛭逐渐接近人类并受到更强烈的刺激,然后获得人类感知区域。之后,水蛭在靠近人类的L区域进入开发阶段:
X
(
i
j
)
t
+
1
=
{
P
r
e
y
(
j
)
+
W
1
×
P
r
e
y
(
j
)
−
L
3
r
a
n
d
<
a
&
∣
P
r
e
y
(
j
)
∣
>
∣
X
(
i
,
j
)
t
∣
P
r
e
y
(
j
)
+
W
1
×
P
r
e
y
(
j
)
+
L
3
r
a
n
d
<
a
&
∣
P
r
e
y
(
j
)
∣
<
∣
X
(
i
,
j
)
t
∣
P
r
e
y
(
j
)
+
W
1
×
P
r
e
y
(
j
)
−
L
4
r
a
n
d
>
a
&
∣
P
r
e
y
(
j
)
∣
>
∣
X
(
i
,
j
)
t
∣
P
r
e
y
(
j
)
+
W
1
×
P
r
e
y
(
j
)
+
L
4
r
a
n
d
>
a
&
∣
P
r
e
y
(
j
)
∣
<
∣
X
(
i
,
j
)
t
∣
(6)
\left.X_{(ij)}^{t+1}=\left\{\begin{array}{l}Prey_{(j)}+W_1\times Prey_{(j)}-L_3 rand<a \& \left|Prey_{(j)}\right|>\left|X_{(i,j)}^t\right|\\Prey_{(j)}+W_1\times Prey_{(j)}+L_3 rand<a \& \left|Prey_{(j)}\right|<\left|X_{(i,j)}^t\right|\\Prey_{(j)}+W_1\times Prey_{(j)}-L_4 rand>a \& \left|Prey_{(j)}\right|>\left|X_{(i,j)}^t\right|\\Prey_{(j)}+W_1\times Prey_{(j)}+L_4 rand>a \& \left|Prey_{(j)}\right|<\left|X_{(i,j)}^t\right|\end{array}\right.\right.\tag{6}
X(ij)t+1=⎩
⎨
⎧Prey(j)+W1×Prey(j)−L3rand<a&
Prey(j)
>
X(i,j)t
Prey(j)+W1×Prey(j)+L3rand<a&
Prey(j)
<
X(i,j)t
Prey(j)+W1×Prey(j)−L4rand>a&
Prey(j)
>
X(i,j)t
Prey(j)+W1×Prey(j)+L4rand>a&
Prey(j)
<
X(i,j)t
(6)
参数L3,L4:
L
3
=
∣
P
r
e
y
(
j
)
−
X
(
i
,
j
)
t
∣
×
P
D
×
(
1
−
r
3
×
k
2
N
)
L
4
=
∣
P
r
e
y
(
j
)
−
X
(
i
,
k
)
t
∣
×
P
D
×
(
1
−
r
3
×
k
2
N
)
(7)
L_{3}=\left|Prey_{(j)}-X_{(i,j)}^t\right|\times PD\times\left(1-r_3\times\frac{k_2}N\right)\\L_{4}=\left|Prey_{(j)}-X_{(i,k)}^t\right|\times PD\times\left(1-r_3\times\frac{k_2}N\right)\tag{7}
L3=
Prey(j)−X(i,j)t
×PD×(1−r3×Nk2)L4=
Prey(j)−X(i,k)t
×PD×(1−r3×Nk2)(7)
伪代码
3.结果展示
4.参考文献
[1] Bai J, Nguyen-Xuan H, Atroshchenko E, et al. Blood-sucking leech optimizer[J]. Advances in Engineering Software, 2024, 195: 103696.