A list,

1. Ant colony algorithm is proposed

Ant Colony Optimization algorithm (ACO), also known as ant algorithm, is a probabilistic algorithm used to find optimal paths. It was proposed by Marco Dorigo in his PhD thesis in 1992 and was inspired by the behavior of ants in finding their way to food. Genetic algorithm has been applied in pattern recognition, neural network, machine learning, industrial optimal control, adaptive control, biological science, social science and so on.

2. Basic principles of the algorithm





Ii. Source code

CLC. X=0:1:20;
Y=0:1:20;
Z=[0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.4 0.7 0.4 0.2 0.4 0.5 0.3;
0.2 0.2 0.3 0.2 0.2 0.3 0.2 0.2 0.2 0.2 0.2 0.1 0.2 0.4 0.3 0.6 0.5 0.3 0.3 0.3 0.2;
0.2 0.3 0.4 0.4 0.2 0.2 0.2 0.3 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.5 0.7 0.4 0.4 0.3 0.3;
0.2 0.3 0.3 0.6 0.3 0.4 0.3 0.2 0.2 0.3 0.6 0.4 0.3 0.2 0.4 0.3 0.8 0.6 0.7 0.4 0.4;
0.2 0.3 0.3 0.7 0.6 0.6 0.4 0.2 0.3 0.5 0.8 0.8 0.3 0.2 0.2 0.8 1.3 0.9 0.8 0.8 0.4;
0.2 0.3 0.6 0.9 0.8 0.8 0.6 0.3 0.4 0.5 0.4 0.5 0.4 0.2 0.5 0.5 1.3 0.6 1.0 0.9 0.3;
0.3 0.5 0.9 1.1 1.0 0.7 0.7 0.4 0.6 0.4 0.4 0.3 0.5 0.5 0.3 0.9 1.2 0.8 1.0 0.8 0.4;
0.3 0.5 0.8 1.1 1.1 1.0 0.8 0.7 0.7 0.4 0.5 0.4 0.4 0.5 0.4 1.1 1.3 0.7 1.0 0.7 0.6;
0.4 0.5 0.4 1.0 1.1 1.2 1.0 0.9 0.7 0.5 0.6 0.3 0.6 0.4 0.6 1.0 1.0 0.6 0.9 1.0 0.7;
0.3 0.5 0.6 1.1 1.2 1.0 1.0 1.1 0.9 0.4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y,'spline');
surf(x,y,z);
hold on
X1=[2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 18 19 18 19 18];
Y1=[1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 19 19];
Z1=[0.300000 0.400000 0.500000 0.600000 0.700000 0.800000 0.900000 0.900000 0.900000 0.900000 0.900000 0.900000 0.900000 0.900000 0.900000 0.900000 0.800000 0.700000 0.600000 0.500000 0.400000 0.300000]
Copy the code

3. Operation results

Fourth, note

Version: 2014 a