9.9带走70+智能优化算法跑CEC2005测试集(包括2024新算法)

​70+算法跑23个经典测试函数,包括最经典的算法PSO,GA,SA,DE和CMA_ES,也包括很多高被引、高性能和最近提出来的算法。同时包括

(1)基于进化的算法

(2)基于群体智能的算法

(3)基于人类的算法

(4)基于物理和化学的算法

(5)基于其它的。

多数算法程序里面有来源。70+算法包括ABO, AFT,AHA,ALO,AO,AOA,ATOA,AVOA,BAT,BBO,BWO,CBOA,CMA_ES,COA,COOT,CPSOGSA,CSA,DA,DBO,DE,DMO,DOA,DTBO,EO,FO,FOX,GA,GJO,GOA,GOA1,GRO,GTO,GWO,HHO,INFO,MFO,MPA,MVO,NGO,NOA,OIO,OOA,POA,PSO,RUN,SA,SCA,SCHO,SCSO,SHO,SO,SSA,STOA,TSA,WOA,WSO,YSGA,ZOA。还包括2024年最新提出的算法,具体有:

1、苦鱼优化算法(Bitterling Fish Optimization,BFO);

2、冠豪猪优化器(Crested Porcupine Optimizer, CPO);

3、美洲狮优化器(Puma optimizer,Puma);

4、鹅算法(GOOSE algorithm,GOOSE);

5、人类进化优化算法(Human Evolutionary Optimization Algorithm ,HEOA);

6、角蜥优化算法(Horned Lizard Optimization Algorithm,HLOA);

7、河马优化算法(Hippopotamus optimization algorithm,HO);

8、爱情进化算法(Love Evolution Algorithm,LEA);

9、鹦鹉优化器(Parrot Optimizer, PO);

10、牛顿-拉斐尔优化器(Newton-Raphson-based optimizer, NRBO);

每个算法都是一个独立的.m文件,方便大家管理和二次开发,打开即可直接运行。这70+智能算法包括了当前一些高被引算法和一些新型高性能算法,下载后可获得以下文件夹,包括23个函数介绍的pdf:

​23个经典测试集如下表,展示了函数类型(单峰、多峰、固定维多峰),函数细节,搜索范围和理论最优值,维度可调,函数细节描述如下:

编辑

​可以单个运行并且输出函数图和收敛曲线图:

编辑

​同时也包括对比图,这里以DBO、GTO、GWO、AO、WOA、AVOA、BWO、RUN、HHO、SO、NRBO、Puma为例,函数维度为30维,F2运行结果如下:

主函数部分代码如下图,如果需要更改自己的算法或者对比其余算法,直接更改函数名字即可,主函数均加上了中文注释,方便大家理解和二次开发。

部分代码:

Matlab 复制代码
N=30;  %种群数量

F_name='F2';  % 选择函数F1-F23

T=1000;  % 最大迭代次数

%获取函数细节
[lb,ub,dim,fobj]=Get_F(F_name);  % Load details of the selected benchmark function

%调用智能算法,更改名字即可替换成其它算法
[Top_Score_1,Top_Position_1,Convergence_curve_1]=DBO(N,T,lb,ub,dim,fobj);
[Top_Score_2,Top_Position_2,Convergence_curve_2]=GTO(N,T,lb,ub,dim,fobj);
[Top_Score_3,Top_Position_3,Convergence_curve_3]=GWO(N,T,lb,ub,dim,fobj);
[Top_Score_4,Top_Position_4,Convergence_curve_4]=AO(N,T,lb,ub,dim,fobj);
[Top_Score_5,Top_Position_5,Convergence_curve_5]=WOA(N,T,lb,ub,dim,fobj);
[Top_Score_6,Top_Position_6,Convergence_curve_6]=AVOA(N,T,lb,ub,dim,fobj);
[Top_Score_7,Top_Position_7,Convergence_curve_7]=BWO(N,T,lb,ub,dim,fobj);
[Top_Score_8,Top_Position_8,Convergence_curve_8]=RUN(N,T,lb,ub,dim,fobj);
[Top_Score_9,Top_Position_9,Convergence_curve_9]=HHO(N,T,lb,ub,dim,fobj);
[Top_Score_10,Top_Position_10,Convergence_curve_10]=SO(N,T,lb,ub,dim,fobj);
[Top_Score_11,Top_Position_11,Convergence_curve_11]=NRBO(N,T,lb,ub,dim,fobj);
[Top_Score,Top_Position,Convergence_curve]=Puma(N,T,lb,ub,dim,fobj);

%收敛曲线绘图
semilogy(Convergence_curve_1,'-c','LineWidth',2)
hold on
semilogy(Convergence_curve_2,'-.c','LineWidth',2)
hold on
semilogy(Convergence_curve_3,'-k','LineWidth',2)
hold on
semilogy(Convergence_curve_4,'-.k','LineWidth',2)
hold on
semilogy(Convergence_curve_5,'-m','LineWidth',2)
hold on
semilogy(Convergence_curve_6,'-.m','LineWidth',2)
hold on
semilogy(Convergence_curve_7,'-g','LineWidth',2)
hold on
semilogy(Convergence_curve_8,'-.g','LineWidth',2)
hold on
semilogy(Convergence_curve_9,'-b','LineWidth',2)
hold on
semilogy(Convergence_curve_10,'-.b','LineWidth',2)
hold on
semilogy(Convergence_curve_11,'-r','LineWidth',2)
hold on
semilogy(Convergence_curve,'-.r','LineWidth',2)
title(F_name)
xlabel('Iteration#');
ylabel('Best Fitness Value');
legend('DBO','GTO','GWO','AO','WOA','AVOA','BWO','RUN','HHO','SO','NRBO','Puma')
axis tight
grid on
box on

%最优结果输出
display(['The best optimal values of the objective funciton found by DBO is : ', num2str(Top_Score_1)]);
display(['The best optimal values of the objective funciton found by GTO is : ', num2str(Top_Score_2)]);
display(['The best optimal values of the objective funciton found by GWO is : ', num2str(Top_Score_3)]);
display(['The best optimal values of the objective funciton found by AO is : ', num2str(Top_Score_4)]);
display(['The best optimal values of the objective funciton found by WOA is : ', num2str(Top_Score_5)]);
display(['The best optimal values of the objective funciton found by AVOA is : ', num2str(Top_Score_6)]);
display(['The best optimal values of the objective funciton found by BWO is : ', num2str(Top_Score_7)]);
display(['The best optimal values of the objective funciton found by RUN is : ', num2str(Top_Score_8)]);
display(['The best optimal values of the objective funciton found by HHO is : ', num2str(Top_Score_9)]);
display(['The best optimal values of the objective funciton found by SO is : ', num2str(Top_Score_10)]);
display(['The best optimal values of the objective funciton found by NRBO is : ', num2str(Top_Score_11)]);
display(['The best optimal values of the objective funciton found by Puma is : ', num2str(Top_Score)]);

代码下载:

​9.9带走70+智能优化算法跑CEC2005测试集(包括2024新算法)

相关推荐
only-qi8 小时前
leetcode24两两交换链表中的节点 快慢指针实现
数据结构·算法·链表
咩咩不吃草8 小时前
【MySQL】表和列、增删改查语句及数据类型约束详解
数据库·mysql·语法
不懒不懒8 小时前
【MySQL 实战:从零搭建规范用户表(含完整 SQL 与避坑指南)】
数据库
多恩Stone8 小时前
【3D AICG 系列-9】Trellis2 推理流程图超详细介绍
人工智能·python·算法·3d·aigc·流程图
sin_hielo8 小时前
leetcode 110
数据结构·算法·leetcode
ID_180079054738 小时前
Python结合淘宝关键词API进行商品价格监控与预警
服务器·数据库·python
整得咔咔响8 小时前
贝尔曼最优公式(BOE)
人工智能·算法·机器学习
日拱一卒——功不唐捐8 小时前
字符串匹配:暴力法和KMP算法(C语言)
c语言·算法
renke33648 小时前
Flutter for OpenHarmony:数字涟漪 - 基于扩散算法的逻辑解谜游戏设计与实现
算法·flutter·游戏
数据知道8 小时前
PostgreSQL 故障排查:万字详解如何找出数据库中的死锁
数据库·postgresql