1.背景
2023年,S Xian受到自然界猫鼬生存行为启发,提出了猫鼬优化算法(Meerkat Optimization Algorithm, MOA)。
2.算法原理
2.1算法思想
MOA通过模拟猫鼬的行为模式来实现优化。猫鼬生活在群体中,其生存依赖于协作和互助,其中哨兵猫鼬负责监视周围环境并警告群体成员,使其能够适时地采取行动以应对外部威胁或变化。
2.2算法过程
种群初始化
X
i
t
=
r
a
n
d
o
m
n
o
r
m
a
l
(
l
o
c
=
0.5
,
s
c
a
l
e
=
0.3
)
∗
(
u
b
−
l
b
)
+
l
b
(1)
X_{i}^{t}=random_{normal}(loc=0.5,scale=0.3)*(ub-lb)+lb\tag{1}
Xit=randomnormal(loc=0.5,scale=0.3)∗(ub−lb)+lb(1)
其中𝑟𝑎𝑛𝑑𝑜𝑚𝑛𝑜𝑟𝑚𝑎𝑙为正态分布随机数,默认标准差为0.3。
狩猎活动和警惕性
猫鼬根据捕食者和警报的存在与否来选择行为,在rand < sentry(默认为0.3)的安全条件下,猫鼬个体以相同的概率狩猎或寻找食物,并以以下形式进行全局搜索:
d
i
r
e
c
t
=
X
i
0
s
t
e
p
=
(
1
−
t
/
T
)
)
∗
r
X
i
t
+
1
=
X
i
t
+
s
t
e
p
∗
d
i
r
e
c
t
(2)
\begin{aligned}&direct=X_{i}^{0}\\&\mathrm{step}=(1-\mathrm{t}/\mathrm{T}))*\mathrm{r}\\&X_{i}^{t+1}=X_{i}^{t}+step*direct\end{aligned}\tag{2}
direct=Xi0step=(1−t/T))∗rXit+1=Xit+step∗direct(2)
当P<Rand时,狐獴在初始位置的基础上向外扩展搜索范围,寻找食物,观察天敌。
X
i
t
+
1
=
X
i
t
+
s
t
e
p
∗
(
X
j
t
−
(
r
a
n
d
+
0.5
)
∗
X
i
t
)
(3)
X_i^{t+1}=X_i^t+step*(X_j^t-(rand+0.5)*X_i^t)\tag{3}
Xit+1=Xit+step∗(Xjt−(rand+0.5)∗Xit)(3)
在另一种情况下,猫鼬在搜索过程中随机发现其他同伴,并接近它们进行协同狩猎,其中𝑋𝑗是除了自己之外随机选择的个体。
逃跑或与敌人战斗
在rand>sentry紧急情况下,猫鼬会寻找天敌或灾害,并发出警告,让猫鼬个体避难或反击。
d
i
v
=
r
a
n
d
+
0.1
X
e
m
e
r
g
e
n
c
y
t
=
X
i
t
+
(
2
∗
r
a
n
d
∗
X
g
b
t
−
X
i
t
)
X
i
t
+
1
=
X
e
m
e
r
g
e
n
c
y
t
(4)
\begin{aligned}&\mathrm{div}=\mathrm{rand}+0.1\\&X_{emergency}^{t}=X_{i}^{t}+(2*rand*X_{gb}^{t}-X_{i}^{t})\\&X_{i}^{t+1}=X_{emergency}^{t}\end{aligned}\tag{4}
div=rand+0.1Xemergencyt=Xit+(2∗rand∗Xgbt−Xit)Xit+1=Xemergencyt(4)
恐吓敌人:
X
i
t
+
1
=
d
i
v
∗
X
i
t
−
(
2
∗
r
a
n
d
∗
X
g
b
t
−
X
i
t
)
(5)
X_{i}^{t+1}=div*X_{i}^{t}-(2*rand*X_{gb}^{t}-X_{i}^{t})\tag{5}
Xit+1=div∗Xit−(2∗rand∗Xgbt−Xit)(5)
随机方向探测
为了找到尽可能多的食物,猫鼬群体在每次迭代中都有一定的机会向随机方向探索,这有助于跳出局部最优,找到更好的食物资源。
X
i
t
+
1
=
X
i
t
+
(
2
∗
r
a
n
d
−
1
)
∗
(
X
i
t
+
r
a
n
d
∗
s
)
∗
s
t
e
p
(6)
X_{i}^{t+1}=X_{i}^{t}+(2*rand-1)*(X_{i}^{t}+rand*s)*step\tag{6}
Xit+1=Xit+(2∗rand−1)∗(Xit+rand∗s)∗step(6)
其中,step是Levy飞行步长。
伪代码
3.结果展示
4.参考文献
[1] Xian S, Feng X. Meerkat optimization algorithm: A new meta-heuristic optimization algorithm for solving constrained engineering problems[J]. Expert Systems with Applications, 2023, 231: 120482.