1 简介
Metaheuristics are computational procedures that intelligently lead the search process through the efficient exploration of the search space associated with an optimization problem. With the progressive outburst of problems with large data sets in various fields, there is an ongoing quest for enhancing existing metaheuristic algorithms as well as developing new ones with greater accuracy and efficiency. In general, a powerful and efficient metaheuristic algorithm is based on a rich inspiration source, implemented effectively through a precise mathematical model. Aiming to develop a highly efficient, nature-inspired optimization algorithm, here we propose a novel metaheuristic called Crystal Structure Algorithm (CryStAl). This method is chiefly inspired by the principles underlying the formation of crystal structures from the addition of the basis to the lattice points, which is a natural phenomenon that can be seen in the symmetric arrangement of constituents (i.e. atoms, molecules, or ions) in crystalline minerals such as quartz. A total number of 239 mathematical functions which are categorized into four different groups are utilized to evaluate the overall performance of the proposed method. To validate the results of this novel algorithm, 12 different classical and modern metaheuristic algorithms are selected from the literature. The minimum, mean, and standard deviation values alongside the number of function evaluations for CryStAl and the other metaheuristics for a specific tolerance are calculated and presented accordingly. The obtained results, further supported by a complete statistical analysis, demonstrated that the proposed algorithm is capable of providing very competitive results, outperforming the other metaheuristics in most cases.
2 部分代码
% ----------------------------------------------------------------------- %
%% [1] Talatahari, S. , et al. "Crystal Structure Algorithm (CryStAl): A Metaheuristic Optimization Method." IEEE Access PP.99(2021):1-1. for Unconstrained Benchmark Problems
%%
clc;clear all;
%% Get Required Problem Information
ObjFuncName = @(x) Sphere(x); % @CostFunction ;
Var_Number = 100 ; % Number of variables ;
LB = -10 *ones(1,Var_Number) ; % Lower bound of variable ;
UB = 10 *ones(1,Var_Number) ; % Upper bound of variable ;
%% Get Required Algorithm Parameters
MaxIteation = 1000 ; % Maximum number of Iterations ;
Cr_Number = 10 ; % Maximum number of initial Crystals ;
%% Outputs:
% BestCr (Best solution)
% BestFitness (final Best fitness)
% Conv_History (Convergence History Curve)
%% Updating the Size of ProblemParameters
if length(LB)==1
LB=repmat(LB,1,Var_Number);
end
if length(UB)==1
UB=repmat(UB,1,Var_Number);
end
%% Initialization
% Initializing the Position of first probs
val(i)
Fun_eval(i)=Fun_evalNew(i2);
Crystal(i,:)=NewCrystal(i2,:);
end
% Updation the Number of Function Evalutions
Eval_Number=Eval_Number+1;
end
end % End of One Iteration
Iter=Iter+1;
% The best Crystal
[BestFitness,idbest]=min(Fun_eval);
Crb=Crystal(idbest,:);
BestCr=Crb;
Conv_History(Iter)=BestFitness;
% Show Iteration Information
disp(['Iteration ' num2str(Iter) ': Best Cost = ' num2str(Conv_History(Iter))]);
end % End of Main Looping
semilogy(Conv_History)
3 仿真结果
4 参考文献
[1] Talatahari, S. , et al. "Crystal Structure Algorithm (CryStAl): A Metaheuristic Optimization Method." IEEE Access PP.99(2021):1-1.
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。