注:该算法已按照智能优化算法APP标准格式进行整改,可直接集成到APP中,方便大家与自己的算法进行对比。
百慕大三角优化器(Bermuda Triangle Optimizer ,BTO)是受到百慕大吸引力的启发,百慕大地区许多飞机和船只在该区域神秘失踪。这个吸引力区域大致由佛罗里达州、百慕大和波多黎各所界定,形成一个三角形,任何物体都会被吸引到三角形的中心,基于这一理论,这个区域中心可以视为最佳解。
该成果于2025年最新发表在计算机领域期刊
International Journal of Advances in Soft Computing and its Applications上。

百慕大三角是当下时代最持久且最迷人的谜团之一。许多船只和飞机据报在百慕大三角地区神秘消失,这个区域常被称为“魔鬼三角”,位于“北大西洋(NAO)”的西部。百慕大三角的边界一般由波多黎各圣胡安、佛罗里达迈阿密和百慕大这三点所界定。百慕大三角的示意图如下。

1.算法原理
基于爱因斯坦的黑洞引力理论和具有吸引力的物体特性,以下方程可以用作百慕大三角引力模型的描述:
其中,CUG为万有引力常数,值为 ; 为产生引力场的百慕大中心质量,取随机值; 为受 影响的物体质量,取随机值; 为 与 之间的距离,取随机值。
根据科学家的研究,百慕大三角力场区域的面积大约在 500,000 至 1,510,000 平方英里之间。该区域的系数可以通过以下公式计算:
其中, 是百慕大力场的最小面积,取值为 50 万平方英里。算法中会对该值取对数进行规范化; 是第 次迭代时的计数器值; 是百慕大力场的最大面积,取值为 1,510,000 平方英里,也同样对其取对数进行规范化; 是最大迭代次数。
百慕大力场的概率比可以通过以下公式进行计算。数学中, 值表示零假设为真的概率。
其中, 是第 次迭代时的计数器值; 是最大迭代次数; 是百慕大三角的引力。
对于任何物体在百慕大三角区域内或外的存在概率,随机值可以大于0.5或小于0.5。如果随机值大于0.5,算法的理论将应用减法操作,意味着存在强大的吸引力,此时可以基于百慕大三角的面积进行公式化,如下图所示。如果物体位于百慕大三角内,它已受到了强大的吸引力。

在以下公式中, 是 ,即假设为真的概率。另一方面,如果物体的存在概率小于 0.5,则算法的理论将应用加法操作,这意味着吸引力较小。这可以通过百慕大三角区域和周围区域(黄色圆圈区域)之间的差值来计算,如图所示。基于这一点,物体将根据公式朝着最优解移动。
其中LB 和 UB分别是问题搜索空间的下界和上界;ZoneBF为百慕大力场区域;PoF为百慕大力场的概率比率;Best(xj)表示已达到的最佳值;Acc加速器函数,可以通过以下公式计算,用于加速海洋流动。
其中r是随机值; e是指数值。
Trianglearea是百慕大区域,具有强大的吸引力。该区域可以通过以下公式进行计算。该区域在图中以黑色虚线三角形表示。
其中r1是一个随机值,代表三角形的底边;r2是一个随机值,代表三角形的高度。
Circlearea为百慕大包围的面积,其吸引力较小,可以通过以下公式表示。这个区域在图中用黄色圆圈表示。
其中,r是随机值,其为圆的半径。
BTO使用了Levy和混沌方法来模拟被吸引物体向百慕大中心的精确移动,这些物体主要受到海潮和百慕大力场的影响,沿不规则路径移动。Levy方法在以下公式中建模,用于在初始化步骤中生成各种不同的值。
百慕大三角优化器(BTO)的完整过程如下。
2.结果展示
老规矩,采用作者独创的智能优化算法APP轻松对比一下本期的BTO算法。
随机选个函数集,就选23个经典函数集吧!
轻松与经典算法(GA,PSO)比较。
F1函数:
F3函数:
F5函数:
F12函数:
3.MATLAB核心代码
function [Best_FF,Best_P,Conv_curve]=BTO(N,M_Iter,LB,UB,Dim,F_obj)Best_P=zeros(1,Dim);Best_FF=inf;Conv_curve=zeros(1,M_Iter);%Initialize the solutions (attracted objects)X=initialization(N,Dim,UB,LB);Xnew=X;Ffun=zeros(1,size(X,1));% (fitness values)Ffun_new=zeros(1,size(Xnew,1));% (fitness values)PoF_Max=log(1510000); %Bermuda max areaPoF_Min=log(500000); % Bermuda min area C_Iter=1;g= 6.67*10^-11; %(constant of universal gravitation) G=(log10((1-g)*rand(1,1)+1)); distance = rand();
force=(G*rand()*rand())/(distance^2); %force lows Eq.(22)triangle_area = 0.5*rand()*rand(); % Eq.(26)Circle_area = (3.14*rand()*rand())-triangle_area; %Eq.(27)
for i=1:size(X,1) Ffun(1,i)=F_obj(X(i,:)); %Calculate the fitness values of attracted objects (solutions) if Ffun(1,i)<Best_FF Best_FF=Ffun(1,i); Best_P=X(i,:); endend
while C_Iter<M_Iter+1 %Main loop %The p-value is the probability that the null hypothesis is true. (1 – the p-value) is the probability that the alternative hypothesis is true. PoF=1-((C_Iter)^(1/force)/(M_Iter)^(1/force)); % The probability ratio of Bermuda force Eq.(24)
Zone_Bermuda=PoF_Min+C_Iter*(abs(PoF_Max-PoF_Min)/M_Iter); %The zone of Bermuda force Eq.(23)
%Update the Position of attracted objects (Solutions) for i=1:size(X,1) % UB and LB has a just value for j=1:size(X,2)
m=chaos(5,1,1); %Choas equations
r1=rand(); if (size(LB,2)==1 ) if r1>0.5 %Eq.(28) %The object inside bermuda, it already has massive attraction force. %PoF = (1 – the p-value) is the probability that the alternative hypothesis is true. %If the probability of force is p, then the probability %of no force is (1 – the p-value), that is why we use subtraction operation in Eq.(28) section 1
Xnew(i,j)=m*triangle_area*(rand()*2.7^(-20*(C_Iter/M_Iter))*(Best_P(1,j)-PoF*((UB-LB)*Zone_Bermuda+LB))); else % The object is outside Bermuda, so we need more % attraction force to pull it inside Bermuda triangle
Xnew(i,j)=m*Circle_area*(rand()*2.7^(-20*(C_Iter/M_Iter))*(Best_P(1,j)+PoF*((UB-LB)*Zone_Bermuda+LB)));
end end
if (size(LB,2)~=1) % if each of the UB and LB has more than one value r1=rand(); if r1>0.5 %Eq(28)
Xnew(i,j)=m*triangle_area*(rand()*2.7^(-20*(C_Iter/M_Iter))*(Best_P(1,j)-PoF*((UB(j)-LB(j))*Zone_Bermuda+LB(j)))); else Xnew(i,j)=m*Circle_area*(rand()*2.7^(-20*(C_Iter/M_Iter))*(Best_P(1,j)+PoF*((UB(j)-LB(j))*Zone_Bermuda+LB(j))));
end end
end
Flag_UB=Xnew(i,:)>UB; % exceed (up) the boundaries Flag_LB=Xnew(i,:)<LB; % exceed (down) the boundaries Xnew(i,:)=(Xnew(i,:).*(~(Flag_UB+Flag_LB)))+UB.*Flag_UB+LB.*Flag_LB;
Ffun_new(1,i)=F_obj(Xnew(i,:)); % calculate Fitness function if Ffun_new(1,i)<Ffun(1,i) X(i,:)=Xnew(i,:); Ffun(1,i)=Ffun_new(1,i); end if Ffun(1,i)<Best_FF Best_FF=Ffun(1,i); Best_P=X(i,:); end
end
%Update the convergence curve Conv_curve(C_Iter)=Best_FF;
%Print the best solution details after every 50 iterations if mod(C_Iter,50)==0 display(['At iteration ', num2str(C_Iter), ' the best solution fitness is ', num2str(Best_FF)]); end
C_Iter=C_Iter+1; % incremental iteration
endendfunction O=chaos(index,max_iter,Value)O=zeros(1,max_iter);x(1)=0.7;switch index%Chebyshev map case 1for i=1:max_iter x(i+1)=cos(i*acos(x(i))); G(i)=((x(i)+1)*Value)/2;end case 2%Circle mapa=0.5;b=0.2;for i=1:max_iter x(i+1)=mod(x(i)+b-(a/(2*pi))*sin(2*pi*x(i)),1); G(i)=x(i)*Value;end case 3%Gauss/mouse mapfor i=1:max_iter if x(i)==0 x(i+1)=0; else x(i+1)=mod(1/x(i),1); end G(i)=x(i)*Value;end case 4%Iterative mapa=0.7;for i=1:max_iter x(i+1)=sin((a*pi)/x(i)); G(i)=((x(i)+1)*Value)/2;end case 5%Logistic mapa=4;for i=1:max_iter x(i+1)=a*x(i)*(1-x(i)); G(i)=x(i)*Value;end case 6%Piecewise mapP=0.4;for i=1:max_iter if x(i)>=0 && x(i)<P x(i+1)=x(i)/P; end if x(i)>=P && x(i)<0.5 x(i+1)=(x(i)-P)/(0.5-P); end if x(i)>=0.5 && x(i)<1-P x(i+1)=(1-P-x(i))/(0.5-P); end if x(i)>=1-P && x(i)<1 x(i+1)=(1-x(i))/P; end G(i)=x(i)*Value;end case 7%Sine mapfor i=1:max_iter x(i+1) = sin(pi*x(i)); G(i)=(x(i))*Value; end case 8 %Singer map u=1.07; for i=1:max_iter x(i+1) = u*(7.86*x(i)-23.31*(x(i)^2)+28.75*(x(i)^3)-13.302875*(x(i)^4)); G(i)=(x(i))*Value; end case 9%Sinusoidal map for i=1:max_iter x(i+1) = 2.3*x(i)^2*sin(pi*x(i)); G(i)=(x(i))*Value; end
case 10 %Tent map x(1)=0.6; for i=1:max_iter if x(i)<0.7 x(i+1)=x(i)/0.7; end if x(i)>=0.7 x(i+1)=(10/3)*(1-x(i)); end G(i)=(x(i))*Value; endendO=G;end
4.参考文献
参考文献 :Shehadeh H A. Bermuda Triangle Optimizer (BTO): A Novel Metaheuristic Method for Global Optimization[J]. Int. J. Advance Soft Compu. Appl, 2025, 17(2).
本期算法代码获取
后台回复关键词:
TGDM840
获取更多代码:
或者复制链接跳转:https://docs.qq.com/sheet/DU3NjYkF5TWdFUnpu