【智能优化算法】基于人类学习优化算法求解单目标优化问题附matlab代码

发布于:2023-01-10 ⋅ 阅读:(386) ⋅ 点赞:(0)

1 内容介绍

人类学习优化(HumanLearningOptimizationAlgorithm,HLO)算法是由Wang等人于2014年提出的一种通过模拟人类学习机制进行全局优化的元启发类算法。该算法收敛速度快,全局寻优能力强不易陷入局部最优等优点,且设置参数少、算法简单易实现,已在多个应用问题上表现良好的性能。HLO算法中的每个个体可以通过3个学习算子即随机学习算子、个体学习算子和社会学习算子来模拟人类的3种学习行为进行寻优

2 仿真代码

function Rpopus= B2R(popus,dim,Xmax,Xmin)

%% Description

% 1.This function is to transform the binary code to real code to caculate

% the fitness function.

% 2.Input is the binary matrix popus with size [popsize,m].

% 3.Output is the real matrix Rpopus with size [popsize,1].

%% code starts

[popsize m] = size(popus);

bit = m / dim;

Rpopus = zeros(popsize,dim);

for i = 1:popsize

    for d = 1:dim

       for j = 1 + (d-1) * bit:d * bit

           Rpopus(i,d) = Rpopus(i,d) + (popus(i,j) * 2^( d * bit -j));

       end

        Rpopus(i,d) = Xmin + (Xmax - Xmin) * (Rpopus(i,d) / ( 2^bit - 1));             

    end

end

end

3 运行结果

4 参考文献

[1] Wang L ,  Yang R ,  Ni H , et al. A human learning optimization algorithm and its application to multi-dimensional knapsack problems[J]. Applied Soft Computing, 2015.

博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。

部分理论引用网络文献,若有侵权联系博主删除。

 


网站公告

今日签到

点亮在社区的每一天
去签到