1 簡介
At this moment, we need a good optimizer to obtain the optimalthreshold values by utilizing the Eq. (14) as an objective function.In this context, here we introduce an effificient optimizer. The development of our leader slime mould algorithm (LSMA) is based onthe modeling of approaching behavior of the slime mould algorithm (SMA) (Li et al., 2020) with leaders of the slime mould concentration. The SMA simulates the attacking behavior andmorphological divergences of the slime mould Physarum polycephalum for foraging, which mainly depends on the best leadertogether with two slime mould randomly pooled from the overallpopulations。
2 部分代碼
% Leader Slime Mould Algorithm (LSMA) source Code Version 1.0
%
% Developed in MATLAB R2018b
%_____________________________________________________________________________________________________
clearvars
close all
clc
disp('The LSMA is tracking the problem');
N=30; % Number of slime mould
Function_name='F11' % Name of the test function that can be from F1 to F23?
MaxIT=500; % Maximum number of iterations
[lb,ub,dim,fobj]=Get_Functions_details(Function_name); % Function details
Times=31; %Number of independent times you want to run the AOSMA
display(['Number of independent runs: ', num2str(Times)]);
for i=1:Times
[Destination_fitness(i),bestPositions(i,:),Convergence_curve(i,:)]=LSMA(N,MaxIT,lb,ub,dim,fobj);
display(['The optimal fitness of LSMA is: ', num2str(Destination_fitness(i))]);
end
[bestfitness,index]=min(Destination_fitness);
disp('--------Best Fitness, Average Fitness, Standard Deviation and Best Solution--------');
display(['The best fitness of LSMA is: ', num2str(bestfitness)]);
display(['The average fitness of LSMA is: ', num2str(mean(Destination_fitness))]);
display(['The standard deviation fitness of LSMA is: ', num2str(std(Destination_fitness))]);
display(['The best location of LSMA is: ', num2str(bestPositions(index,:))]);
subplot(1,2,1);
func_plot(Function_name);
title('Objective space')
xlabel('x_1');
ylabel('x_2');
zlabel([Function_name,'( x_1 , x_2 )'])
subplot(1,2,2);
semilogy(Convergence_curve(index,:),'LineWidth',3);
xlabel('Iterations');
ylabel('Best fitness obtained so far');
legend('LSMA');
box on;
axis tight;
grid off;
3 仿真結(jié)果
4 參考文獻(xiàn)
[1] Manoj Kumar Naik, Rutuparna Panda, Ajith Abraham. Normalized square difference based multilevel thresholding technique for multispectral images using leader slime mould algorithm[J]. Journal of King Saud University - Computer and Information Sciences, 2020.
博主簡介:擅長智能優(yōu)化算法硅则、神經(jīng)網(wǎng)絡(luò)預(yù)測怪瓶、信號處理世蔗、元胞自動機(jī)、圖像處理述寡、路徑規(guī)劃、無人機(jī)等多種領(lǐng)域的Matlab仿真叶洞,相關(guān)matlab代碼問題可私信交流鲫凶。
完整代碼獲取關(guān)注微信公眾號天天matlab