差分进化算法所有变体已全部封装。可以直接调用!告别找不到,买不了

作品简介

更新日志

2025年5月14日更新记录:更新了TIS-LSHADE-SPACMA算法

Heming Jia, Xuelian Zhou, Jinrui Zhang,Thinking Innovation Strategy (TIS): A novel mechanism for metaheuristic algorithm design and evolutionary update,Applied Soft Computing,Volume 175,2025,113071,https://doi.org/10.1016/j.asoc.2025.113071.

2025年5月6日更新记录:更新了MTDE算法

Nadimi-Shahraki, Mohammad H., et al. “MTDE: An Effective Multi-Trial Vector-Based Differential Evolution Algorithm and Its Applications for Engineering Design Problems.” Applied Soft Computing, vol. 97, Elsevier BV, Dec. 2020, p. 106761, doi:10.1016/j.asoc.2020.106761.

2025年2月20日更新记录:更新了部分算法对应的完整pdf内容

2025年2月17日更新了mLSHADE-SPACMA

Fu, S., Ma, C., Li, K. et al. Modified LSHADE-SPACMA with new mutation strategy and external archive mechanism for numerical optimization and point cloud registration. Artif Intell Rev 58, 72 (2025). https://doi.org/10.1007/s10462-024-11053-1

2024年11月2日更新记录

  1. 增加了SaDE算法
  2. 增加了CJADE算法
  3. 增了IMODE算法
  4. 增加了EBOwithCMA算法

代码目录清单:

2024年10月29日更新记录

  1. 修复了L-SHADE-SPACMA算法配套代码中的错误
  2. 更新了IMODE算法(多算子改进的差分进化算法)

差分进化算法的相关算法实在是太难找了,而且想要封装还是花点时间,很多朋友说好些审稿人返修需要让对比这些算法,想买都找不到在哪买,压根就没有现成的。刚好最近在弄一个相关的算法需要用到,我就统一找出来封装起来。如果有需要就自己点击“阅读全文”领取哈

NO.1|差分进化算法

我在之前的文章中发布了差分进化算法的大部分变体,具体内容可以查看我之前发布的文章差分进化变体合集SaDE、JaDE、SHADE、L-SHADE、L-SHADE-cnEpSin和L-SHADE-SPACMA(这篇文章的文末我放了一些免费的代码,但是没有封装,需要自己调整,如果想挑战一下也可以试试。

DE:基础算法,使用固定的变异和交叉参数。

SaDE:引入多种变异策略和自适应参数调整机制。

JaDE:引入自适应权重和外部档案机制,通过外部档案维护种群多样性。

SHADE:使用记忆共享机制和成功历史记录更新来动态调整参数。

L-SHADE:在SHADE基础上引入种群大小缩减和参数控制策略,提高算法效率和收敛速度。

L-SHADE-cnEpSin:引入灵活的适应度评价策略、协同进化变异策略和非线性参数更新,提高了算法的适应性和鲁棒性。

L-SHADE-SPACMA:通过自适应种群控制、协同进化策略和参数自适应控制,提高了算法的全局搜索能力和局部优化能力。


算法清单如下:

NO.2|主调函数

%% DE算法
tic
[DE_Best_score, DE_Best_pos, DE_cg_curve] = DE(nPop, Max_iter, lb, ub, dim, fobj);
toc
display(['The best optimal value of the objective function found by DE for F' num2str(Function_name), ' is: ', num2str(DE_Best_score)])
;fprintf('Best solution obtained by DE: %s\n', num2str(DE_Best_pos, '%e  '));
​
%% JADE算法
tic
[JADE_Best_score, JADE_Best_pos, JADE_cg_curve] = JADE(nPop, Max_iter, lb, ub, dim, fobj);
toc
display(['The best optimal value of the objective function found by JADE for F' num2str(Function_name), ' is: ', num2str(JADE_Best_score)])
;fprintf('Best solution obtained by JADE: %s\n', num2str(JADE_Best_pos, '%e  '));
​
%% SHADE算法
tic
[SHADE_Best_score, SHADE_Best_pos, SHADE_cg_curve] = SHADE(nPop, Max_iter, lb, ub, dim, fobj);
toc
display(['The best optimal value of the objective function found by SHADE for F' num2str(Function_name), ' is: ', num2str(SHADE_Best_score)])
;fprintf('Best solution obtained by SHADE: %s\n', num2str(SHADE_Best_pos, '%e  '));
​
%% LSHADE算法
tic
[LSHADE_Best_score, LSHADE_Best_pos, LSHADE_cg_curve] = LSHADE(nPop, Max_iter, lb, ub, dim, fobj);
toc
display(['The best optimal value of the objective function found by LSHADE for F' num2str(Function_name), ' is: ', num2str(LSHADE_Best_score)])
;fprintf('Best solution obtained by LSHADE: %s\n', num2str(LSHADE_Best_pos, '%e  '));
​
%% CMAES算法
tic
[CMAES_Best_score, CMAES_Best_pos, CMAES_cg_curve] = CMAES(nPop, Max_iter, lb, ub, dim, fobj);
toc
display(['The best optimal value of the objective function found by CMAES for F' num2str(Function_name), ' is: ', num2str(CMAES_Best_score)])
;fprintf('Best solution obtained by CMAES: %s\n', num2str(CMAES_Best_pos, '%e  '));
​
%% ALSHADE算法
tic
[ALSHADE_Best_score, ALSHADE_Best_pos, ALSHADE_cg_curve] = ALSHADE(nPop, Max_iter, lb, ub, dim, fobj);
toc
display(['The best optimal value of the objective function found by ALSHADE for F' num2str(Function_name), ' is: ', num2str(ALSHADE_Best_score)])
;fprintf('Best solution obtained by ALSHADE: %s\n', num2str(ALSHADE_Best_pos, '%e  '));
​
%% L_SHADE_cnEpSin算法
tic
[L_SHADE_cnEpSin_Best_score, L_SHADE_cnEpSin_Best_pos, L_SHADE_cnEpSin_cg_curve] = L_SHADE_cnEpSin(nPop, Max_iter, lb, ub, dim, fobj);
toc
display(['The best optimal value of the objective function found by L_SHADE_cnEpSin for F' num2str(Function_name), ' is: ', num2str(L_SHADE_cnEpSin_Best_score)])
;fprintf('Best solution obtained by L_SHADE_cnEpSin: %s\n', num2str(L_SHADE_cnEpSin_Best_pos, '%e  '));
​
​
%% LSHADE_SPACMA算法
tic
[LSHADE_SPACMA_Best_score, LSHADE_SPACMA_Best_pos, LSHADE_SPACMA_cg_curve] = LSHADE_SPACMA(nPop, Max_iter, lb, ub, dim, fobj);
toc
display(['The best optimal value of the objective function found by LSHADE_SPACMA for F' num2str(Function_name), ' is: ', num2str(LSHADE_SPACMA_Best_score)])
;fprintf('Best solution obtained by LSHADE_SPACMA: %s\n', num2str(LSHADE_SPACMA_Best_pos, '%e  '));

参考文献

DE

Bilal, M. Pant, H. Zaheer, L. Garcia-Hernandez, and A. Abraham, ‘Differential Evolution: A review of more than two decades of research’, Engineering Applications of Artificial Intelligence, vol. 90, p. 103479, Apr. 2020, doi: 10.1016/j.engappai.2020.103479

改进差分进化算法

Y. Sun, Y. Wu, and Z. Liu, ‘An improved differential evolution with adaptive population allocation and mutation selection’, Expert Systems with Applications, vol. 258, p. 125130, Dec. 2024, doi: 10.1016/j.eswa.2024.125130

SADE

 A. K. Qin and P. N. Suganthan, ‘Self-adaptive differential evolution algorithm for numerical optimization’, in 2005 IEEE Congress on Evolutionary Computation, Sep. 2005, pp. 1785-1791 Vol. 2. doi: 10.1109/CEC.2005.1554904

SHADE

R. Tanabe and A. Fukunaga, ‘Success-history based parameter adaptation for Differential Evolution’, in 2013 IEEE Congress on Evolutionary Computation, Jun. 2013, pp. 71–78. doi: 10.1109/CEC.2013.6557555

L-SHADE:

R. Tanabe and A. S. Fukunaga, ‘Improving the search performance of SHADE using linear population size reduction’, in 2014 IEEE Congress on Evolutionary Computation (CEC), Beijing, China: IEEE, Jul. 2014, pp. 1658–1665. doi: 10.1109/CEC.2014.6900380

L-SHADE-cnEpSin

N. H. Awad, M. Z. Ali, and P. N. Suganthan, ‘Ensemble sinusoidal differential covariance matrix adaptation with Euclidean neighborhood for solving CEC2017 benchmark problems’, in 2017 IEEE Congress on Evolutionary Computation (CEC), Jun. 2017, pp. 372–379. doi: 10.1109/CEC.2017.7969336

L-SHADE-SPACMA

A. W. Mohamed, A. A. Hadi, A. M. Fattouh, and K. M. Jambi, ‘LSHADE with semi-parameter adaptation hybrid with CMA-ES for solving CEC 2017 benchmark problems’, in 2017 IEEE Congress on Evolutionary Computation (CEC), Jun. 2017, pp. 145–152. doi: 10.1109/CEC.2017.7969307

IMODE

K. M. Sallam, S. M. Elsayed, R. K. Chakrabortty and M. J. Ryan, "Improved Multi-operator Differential Evolution Algorithm for Solving Unconstrained Problems," 2020 IEEE Congress on Evolutionary Computation (CEC), Glasgow, UK, 2020, pp. 1-8, doi: 10.1109/CEC48606.2020.9185577
创作时间:2024-09-24 15:41:20