智能优化算法:海洋捕食者算法

智能优化算法:海洋捕食者算法


摘要:海洋捕食者算法 ( Marine Predators Algorithm,MPA) 是Afshin Faramarzi 等人于 2020 年提出的一种新型元启发式优化算法,其灵感来源于海洋适者生存理论,即海洋捕食者通过在Lévy 游走或布朗游走之间选择最佳觅食策略。具有寻优能力强等特点。

1.算法原理

MPA 优化过程数学描述如下:

(1)初始化阶段。与大多数元启发式算法类似,MPA 随机在搜索空间范围内初始化猎物位置来启动优化过程。数学描述如下:
X 0 = X m i n + r a n d ( X m a x − X m i n ) (1) X_0 = X_{min}+rand(X_{max}-X_{min})\tag{1} X0=Xmin+rand(XmaxXmin)(1)
式中: X m a x X_{max} Xmax X m i n X_{min} Xmin 为搜索空间范围; r a n d ( ) rand( ) rand()为[0,1]内的随机数。

(2) MPA 优化阶段。在迭代初期,当捕食者速度比猎物速度快时,基于勘探策略的 MPA 优化过程数学描述如下:
{ s t e p s i z e i = R B ⨂ ( E l i t e i − R B ⨂ P r e y i ) P r e y i = P r e y i + P . R ⨂ s t e p s i z e i i = 1 , 2 , . . . , n . I t e r < 1 3 M a x _ I t e r (2) \begin{cases} stepsize_i = R_B \bigotimes(Elite_i-R_B\bigotimes Prey_i)\\ Prey_i=Prey_i+P.R\bigotimes stepsize_i \end{cases} i=1,2,...,n. Iter<\frac{1}{3}Max\_Iter \tag{2} {stepsizei=RB(EliteiRBPreyi)Preyi=Preyi+P.Rstepsizeii=1,2,...,n.Iter<31Max_Iter(2)
式中: s t e p s i z e stepsize stepsize 为移动步长; R B R_B RB 为呈正态分布的布朗游走随机向量; E l i t e i Elite_i Elitei 为由顶级捕食者构造的精英矩阵; P r e y i Prey_i Preyi为与精英矩阵具有相同维数的猎物矩阵; ⨂ \bigotimes 为逐项乘法运算符; P P P等于 0.5; R R R为[0,1]内均匀随机向量; n n n 为种群规模; I t e r Iter Iter M a x _ I t e r Max\_Iter Max_Iter 分别为当前和最大迭代次数。

在迭代中期,当捕食者与猎物速度相同时,猎物基于 Lévy游走策略负责开发;捕食者基于布朗游走策略负责勘探,并逐渐由勘探策略转向开发策略。开发和勘探的数学描述如下:
{ s t e p s i z e i = R L ⨂ ( E l i t e i − R L ⨂ P r e y i ) P r e y i = P r e y i + P . R ⨂ s t e p s i z e i i = 1 , 2 , . . . , n / 2. 1 3 M a x _ I t e r < I t e r < 2 3 M a x _ I t e r (3) \begin{cases} stepsize_i = R_L \bigotimes(Elite_i-R_L\bigotimes Prey_i)\\ Prey_i=Prey_i+P.R\bigotimes stepsize_i \end{cases} i=1,2,...,n/2. \frac{1}{3}Max\_Iter<Iter<\frac{2}{3}Max\_Iter \tag{3} {stepsizei=RL(EliteiRLPreyi)Preyi=Preyi+P.Rstepsizeii=1,2,...,n/2.31Max_Iter<Iter<32Max_Iter(3)

{ s t e p s i z e i = R B ⨂ ( R B ⨂ P r e y i − E l i t e i ) P r e y i = E l i t e i + P . C F ⨂ s t e p s i z e i i = n / 2 , . . . , n . 1 3 M a x _ I t e r < I t e r < 2 3 M a x _ I t e r (4) \begin{cases} stepsize_i = R_B \bigotimes(R_B\bigotimes Prey_i - Elite_i)\\ Prey_i=Elite_i + P.CF\bigotimes stepsize_i \end{cases} i=n/2,...,n. \frac{1}{3}Max\_Iter<Iter<\frac{2}{3}Max\_Iter \tag{4} {stepsizei=RB(RBPreyiElitei)Preyi=Elitei+P.CFstepsizeii=n/2,...,n.31Max_Iter<Iter<32Max_Iter(4)

式中: R L R_L RL 为 呈 Lévy 分 布 的 随 机 向 量; C F = ( 1 − I t e r / M a x _ I t e r ) ( 2 I t e r / M a x _ I t e r ) CF = (1-Iter/Max\_Iter)^{(2Iter/Max\_Iter)} CF=(1Iter/Max_Iter)(2Iter/Max_Iter),为控制捕食者移动步长的自适应参数;其他参数意义同上。

在迭代终期,当捕食者速度比猎物速度慢时,捕食者基于Lévy 游走采用开发策略。其数学描述如下:
{ s t e p s i z e i = R L ⨂ ( E l i t e i − R L ⨂ P r e y i ) P r e y i = P r e y i + P . C F ⨂ s t e p s i z e i i = 1 , 2 , . . . , n . I t e r > 2 3 M a x _ I t e r (5) \begin{cases} stepsize_i = R_L \bigotimes(Elite_i-R_L\bigotimes Prey_i)\\ Prey_i=Prey_i+P.CF\bigotimes stepsize_i \end{cases} i=1,2,...,n. Iter>\frac{2}{3}Max\_Iter \tag{5} {stepsizei=RL(EliteiRLPreyi)Preyi=Preyi+P.CFstepsizeii=1,2,...,n.Iter>32Max_Iter(5)
式中:其他参数意义同上。

(3)FADs 效应或涡流。鱼类聚集装置(FADs)或涡流效应通常改变海洋捕食者觅食行为,这一策略能使 MPA 在寻优过程中克服早熟收敛问题,逃离局部极值。其数学描述如下:
{ P r e y i = P r e y i + C F [ X m i n + R L ⨂ ( X m a x − X m i n ) ] ⨂ U   r ≤ F A D s P r e y i + [ F A D s ( 1 − r ) + r ] ( P r e y r 1 − P r e y r 2 )   r > F A D s (6) \begin{cases} Prey_i = Prey_i+CF[X_{min}+R_L\bigotimes(X_{max}-X_{min})]\bigotimes U\ r\leq FADs \\ Prey_i+[FADs(1-r)+r](Prey_{r1}-Prey_{r2})\ r>FADs \end{cases} \tag{6} {Preyi=Preyi+CF[Xmin+RL(XmaxXmin)]U rFADsPreyi+[FADs(1r)+r](Preyr1Preyr2) r>FADs(6)
式中:FADs为影响概率,取 0.2; U U U为二进制向量; r r r 为[0,1]内随机数; r 1 r_1 r1 r 2 r_2 r2 分别为猎物矩阵的随机索引。

算法流程:

步骤1:设定算法参数,初始化种群。

步骤2:计算适应度值,记录最优位置

步骤3:捕食者根据迭代阶段,从式(2)-(6)中选择对应的更新方式,更新捕食者位置

步骤4:计算适应度值,更新最优位置

步骤5:判断是否满足停止条件,如果不满足则重复步骤3-5,否则输出算法最优结果。

2.实验结果

在这里插入图片描述

3.参考文献

[1]胡顺强,崔东文.基于海洋捕食者算法优化的长短期记忆神经网络径流预测[J].中国农村水利水电,2021(02):78-82+90.

4.Matlab代码

算法相关应用

改进算法matlab代码

名称说明或者参考文献
多子群改进的海洋捕食者算法(MSMPA)[1]张磊,刘升,高文欣,郭雨鑫.多子群改进的海洋捕食者算法[J/OL].微电子学与计算机:1-9[2021-11-01].https://doi.org/10.19304/J.ISSN1000-7180.2021.0062.
融合混沌对立和分组学习的海洋捕食者算法(MSIMAP)[1]马驰,曾国辉,黄勃,刘瑾.融合混沌对立和分组学习的海洋捕食者算法[J/OL].计算机工程与应用:1-14[2021-11-02].http://kns.cnki.net/kcms/detail/11.2127.TP.20210730.1554.011.html.

算法相关应用

名称说明或者参考文献
基于海洋捕食者算法的无线传感器网(WSN)覆盖优化https://blog.csdn.net/u011835903/article/details/109262039(原理一样,只是优化算法用海洋捕食者算法)

个人资料介绍

  • 10
    点赞
  • 55
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

智能算法研学社(Jack旭)

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值