[Classic Algorithm] One of the Interesting Algorithms---Ant Colony Algorithm

every blog every motto: You can do more than you think.

0. Preface

Ant colony algorithm record

img

1 Introduction

Ant colony algorithm (Ant Clony Optimization, ACO) is a swarm intelligence algorithm. It is composed of a group of non-intelligent or slightly intelligent individuals (Agents) that exhibit intelligent behavior through mutual cooperation, thereby providing a new method for solving complex problems. possibility. The ant colony algorithm was first proposed by Italian scholars Colorni A., Dorigo M. and others in 1991. After more than 20 years of development, the ant colony algorithm has made great progress in theoretical and applied research.

Ants often choose paths randomly when looking for food, but they can sense the current pheromone concentration on the ground and tend to move in the direction with higher pheromone concentration . Pheromones are released by the ants themselves and are substances that enable indirect communication within the ant colony. Since the round trip time of ants on the shorter path is shorter and more ants pass through the path per unit time, the pheromone accumulation speed is faster than that on the longer path. Therefore, when subsequent ants are at the intersection, they can sense the information left by the previous ants and tend to choose a shorter path to move forward. This positive feedback mechanism causes more and more ants to travel on the shortest path between the nest and food. Since the pheromones on other paths will evaporate over time, all ants will eventually travel on the optimal path.

img

2. TSP problem

Ant colony algorithm was first used to solve TSP problems and has shown great advantages because of its distributed characteristics, strong robustness and easy combination with other algorithms. However, it also has slow convergence speed and is easy to fall into local minimum. Local optimal and other shortcomings.

The TSP problem (Travel Salesperson Problem, also known as the Chinese Postman Problem) is an NP-hard problem. It is difficult to obtain the optimal solution using general algorithms for this type of problem, so some heuristics are generally needed. Algorithm solution, such as genetic algorithm (GA), ant colony algorithm (ACO), particle swarm algorithm (PSO), etc.

The TSP problem (traveling salesman problem) means that a traveler wants to travel to n cities, and is required to experience each city only once and then return to the departure city, and is required to take the shortest distance.

The algorithm evolved from the above-mentioned ants looking for food model is the ant colony algorithm. This algorithm has the characteristics of distributed computing, positive information feedback and heuristic search . It is essentially a heuristic global optimization algorithm in evolutionary algorithms .

Ant colony algorithm is widely used, such as traveling salesman problem (TSP), assignment problem, job-shop scheduling problem, vehicle routing problem (vehicle routing problem), graph coloring problem (graph coloring problem) and network routing problem ( network routing problem) and so on.

3. Principle

Suppose the number of the entire ant colony is m, the number of cities is n, and the mutual distance between cities i and j is dij d_{ij}dij, the information concentration on the path between city i and city j at time t is τ ij ( t ) \tau_{ij}(t)tij( t ) , at the initial moment, the information concentration on the connecting paths between cities is the same. Let’s assumeτ (0) = τ 0 \tau(0)=\tau_0t ( 0 )=t0

3.1 Transition probability

Ant k determines the city it will visit next based on the pheromone concentration on the connecting path between cities, assuming P ijk ( t ) P^k_{ij}(t)Pijk( t ) represents the probability of ant k from city i to city j at time t. The calculation formula is as follows:

P i j k = { [ τ i j ] α ⋅ [ η i j ( t ) ] β ∑ s ∈ a l l o w k [ τ i s ( t ) ] β ⋅ [ η i s ( t ) ] β , s ∈ a l l o w k 0 , s ∉ a l l o w k \LARGE P^k_{ij}=\left\{ \begin{matrix} {\big [\tau_{ij}\big]^{\alpha} ·\big [\eta_{ij}(t)\big ]^{\beta} \over \sum\limits_{s \in allow_k}\big [\tau_{is}(t) \big ]^{\beta} · \big [\eta_{is}(t) \big]^{\beta}} &, s \in allow_k \\ 0 &, s \notin allow_k \end{matrix} \right. Pijk=

Guess you like

Origin blog.csdn.net/weixin_39190382/article/details/135261288