【算法】可完整运行的ACO蚁群算法(Matlab)
可运行的蚁群代码:clearclcAnt = 300;%蚂蚁数量Times = 80;%移动次数Rou = 0.9;%荷尔蒙发挥系数P0 = 0.2;%转移概率Lower_1 = -1;%搜索范围Upper_1 = 1;Lower_2 = -1;Upper_2 = 1;% 以下为自定义X = zeros(Ant,2);Tau = ones(1,Ant);Tau_Best = zeros(1,Times);P = zeros(Times,Ant);for i=1:Ant