Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Received May 31, 2020, accepted June 11, 2020, date of publication June 16, 2020, date of current

version September 2, 2020.


Digital Object Identifier 10.1109/ACCESS.2020.3002817

Dynamic Density Clustering Ant Colony Algorithm


With Filtering Recommendation
Backtracking Mechanism
JIN YU 1, XIAOMING YOU 2, AND SHENG LIU 2
1 College of Electronic and Electrical Engineering, Shanghai University of Engineering Science, Shanghai 201620, China
2 School of Management, Shanghai University of Engineering Science, Shanghai 201620, China

Corresponding author: Xiaoming You (yxm6301@163.com)


This work was supported in part by the Natural Science Foundation of China under Grant 61673258 and Grant 61075115, and in part by
the Shanghai Natural Science Foundation under Grant 19ZR1421600.

ABSTRACT Ant colony system has a good performance in solving Traveling Salesman Problem (TSP),
but it tends to fall into local optimum and is deficient in convergence speed. To address this problem, a
dynamic density clustering ant colony algorithm with a filtering recommendation backtracking mechanism is
proposed (DBACS). Firstly, a dynamic density clustering strategy is proposed to accelerate the convergence
speed of the algorithm and improve the quality of the solution. Under this strategy, the search radius is
expanded dynamically to merge adjacent classes, so as to form the differential pheromone distribution.
The splicing paths between each class are adjusted through the ant colony algorithm to achieve better
performance. Secondly, a recommendation backtracking mechanism based on collaborative filtering is
proposed to increase the diversity of the population, thus helping the algorithm jump out of the local
optimum. With the help of the collaborative filtering algorithm, some dense data points are recommended
for pheromone dynamic backtracking, which can not only help algorithm jump out of the local optimum,
but also help the algorithm accelerate convergence. Simulation results show that the improved algorithm
can obtain a better solution and higher stability. Especially in solving large-scale TSP, the accuracy of the
solution is significantly improved.

INDEX TERMS Ant colony algorithm, dynamic clustering, collaborative filtering recommendation,
pheromone dynamic backtracking, TSP.

I. INTRODUCTION lems. Nowadays, improved ant colony algorithms are used


Traveling salesman problem (TSP) is a classical combina- to realize path planning of mobile robots [9], predicting
torial optimization problem. The content of TSP is to find RNA folding path [10], agricultural soil survey [11], data
the shortest path through all cities on the premise that each mining [12], etc. Although ant colony algorithm has strong
city is passed only once. Many algorithms can solve TSP, advantages in solving TSP, there are still some deficiencies.
such as Ant Colony Optimization (ACO) [1], Genetic Algo- When the algorithm solves large-scale TSP, the convergence
rithm (GA) [2], and Particle Swarm Optimization (PSO) [3]. speed of the algorithm decreases, and it is easy to fall into
What’s more, some hybrid algorithms show very promising local optimum. Later, Dorigo combined local pheromone
results for TSP, such as the improved Immune Algorithm [4] update with global pheromone update and put forward Ant
and the improved Clonal Selection Algorithms [5], [6]. Colony System (ACS) [13] to improve the above problems,
Ant Colony Optimization (ACO) [7], [8] was first pro- which has a faster convergence rate. In 2000, T. Stutzle et
posed in 1996 by Marco Dorigo with reference to the ant al. set the maximum and minimum threshold for pheromone
foraging mechanism to solve distributed optimization prob- and put forward the Min-Max Ant System (MMAS) [14] to
prevent the algorithm from falling into local optimum due to
The associate editor coordinating the review of this manuscript and too high local pheromone. These traditional ant algorithms
approving it for publication was Sotirios Goudos . have good global search capability and good performance for

This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/
VOLUME 8, 2020 154471
J. Yu et al.: Dynamic Density Clustering Ant Colony Algorithm With Filtering Recommendation Backtracking Mechanism

small-scale TSP, but for medium-scale and large-scale TSP, system (MBMS) [25]. The main contributions of this paper
there are still problems such as slow convergence speed and are as follows:
poor accuracy. 1. A dynamic density clustering strategy is proposed to
In order to solve the above problems, many experts and improve the poor accuracy of the solution and the slow
scholars have improved the ant colony algorithm from differ- convergence speed. The strategy includes two parts: primary
ent fields and aspects. clustering and dynamic clustering. During the primary clus-
SaenphonS et al. [15] proposed a fast-reverse-gradient- tering, TSP will be classified by Density-Based Spatial Clus-
search strategy to enhance the ability of the algorithm to tering of Applications with Noise (DBSCAN). Because the
find solutions. Zhang et al. [16] introduced the replication scale of each new TSP generated by clustering is small, ant
operation of bacteria foraging, which improves the speed colony algorithm can obtain good local solutions. Dynamic
of finding solutions by fusing the elimination mechanism. clustering can merge adjacent classes on the basis of primary
Starzec et al. [17] proposed a parallel ant colony optimization clustering and finally form a large class.
algorithm, which uses high-performance computing infras- 2. A recommendation backtracking mechanism based on
tructure to make the algorithm run effectively on a cluster collaborative filtering is proposed to increase the diversity of
of 30 computing nodes. The designed system could run thou- the population. Dense data points are recommended by an
sands of ants. Although they have accelerated the conver- image processing algorithm for dynamic pheromones back-
gence speed of the algorithm, the diversity of the algorithm is tracking. The pheromone concentration on dense paths will
still insufficient. dynamically go back to a certain state which the algorithm
Gaifang et al. [18] combined ant colony algorithm with has got before.
genetic algorithm, and used the nearest-neighbor-selection The paper is organized as follows: Section II briefly intro-
strategy to get a better solution. Meng et al. [19] proposed duces the ACS and DBSCAN. Section III introduces the
directional pheromones and exploration factors to improve improved strategies in DBACS, including the dynamic den-
the quality of the solution. MahiÖ.K et al. [20] firstly used sity clustering strategy and the recommendation backtracking
particle swarm optimization algorithm to optimize the param- mechanism based on collaborative filtering. Section VI veri-
eters of ant colony algorithm, and then used 3-opt to increase fies the effectiveness of the relevant strategies and compares
the diversity of the algorithm. Although they have improved DBACS with the traditional ant colony algorithm and the
the diversity of algorithms, the convergence speed of the latest improved algorithms. Section V summarizes the paper
algorithm is insufficient. and proposes the future work.
Pang et al. [21] used the idea of clustering to transform
large-scale TSP into small-scale TSP, which improves the II. RELATED ALGORITHM
convergence speed of the algorithm. Yang [22] used an A. ANT COLONY SYSTEM (ACS) FOR TSP
orthogonal method to cluster targets, which improves the 1) PATH SELECTION RULE
efficiency of the algorithm. Du et al. [23] classified data and In the ACS, each ant in the city i will choose its next city
ants, and used different search strategies to find solutions, j according to the pseudo-random ratio, referring to formula
thus increasing the diversity of the solutions. Pang et al. [24] (1).
used clustering to generate the correlation matrix, which
arg max{τij [ηij ]β }, q ≤ q0
(
improves the quality of the solution. These improvements j= (1)
have greatly improved the diversity and convergence speed J, q > q0
of the algorithm, but they still have the problems of slow where q is a random variable, which is evenly distributed in
convergence speed and poor accuracy in solving large-scale the [0,1]; The value range of q0 is [0,1]; j is a variable obtained
TSP. The root cause is that there are too many paths for according to formula (2). β is the expectation heuristic factor.
ant colony to choose due to the large TSP data size, which ηij represents the reciprocal of the distance between cities i
increases the difficulty of finding the high precision solu- and j, and its formula is (3). τij is the pheromone concentration
tion. At the same time, the high concentration of pheromone between city i and j. J is equal to Eq. (2).
also reduces the diversity of the algorithm in the later
[τij (t)α ][ηij (t)β ]

stage. , j ∈ Nik


α ][η (t)β ]
 P
The main purpose of this paper is to improve the conver- k
Pij (t) = [τ is (t) is (2)
s∈Jk (i)
gence speed of the algorithm and the quality of the solution

/ Nik

0, j∈

when dealing with large-scale TSP. A dynamic density clus-
tering ant colony algorithm with a filtering recommendation where α and β are information heuristic factor and expecta-
backtracking mechanism is proposed. A clustering algorithm tion heuristic factor respectively; Nik is the city set that ants
and a collaborative filtering recommendation algorithm are can reach directly and have not visited before; ηij represents
adopted to optimize the ant colony algorithm. The improved the reciprocal of the distance between cities i and j, and its
ant colony algorithm can better help solve the problems formula (3) is as follows:
encountered in the actual production process, such as improv- 1
ηij = (3)
ing the production efficiency of the multi-bridge machining dij
154472 VOLUME 8, 2020
J. Yu et al.: Dynamic Density Clustering Ant Colony Algorithm With Filtering Recommendation Backtracking Mechanism

2) PHEROMONE UPDATE
Local pheromone update: the ant in the city i updates the
pheromone on the current path immediately after selecting
the next city j, and its formula(4) is as follows:

τij = (1 − ρ)τij + ρτ0 (4)

where ρ is the pheromone volatilization coefficient which is


in (0,1); τ0 is the initial value of the path pheromone between
the cities i and j.
Global pheromone update: After the ants in the current iter- FIGURE 1. Pr226 primary clustering.
ation have finished searching for the solutions, the algorithm
updates the global pheromone on the shortest path to speed
up the convergence of the algorithm. The formula (5) is as
follows:

τij = (1 − ξ )τij + ξ 1τij∗ (5)


1
1τij∗ = ∗ (6)
C
where ξ is the global pheromone volatilization coefficient,
and C ∗ is the shortest path length found during this iteration.
1τij∗ is the pheromone added to the globally optimal path FIGURE 2. Pr226 internal solution.
during this iteration. The calculation formula is (6).
III. ALGORITHM IMPROVEMENT (DBACS)
B. DENSITY-BASED SPATIAL CLUSTERING OF
Ant colony algorithm has many problems in the solution
APPLICATIONS WITH NOISE (DBSCAN)
of TSP, especially when solving large-scale TSP, such as
The main capability of the algorithm is to actively find the
slow convergence speed and easy to fall into local optimum.
high-density points, and then connect the nearby high-density
Therefore, this paper proposes a dynamic density cluster-
points to generate a cluster. The concrete implementation
ing strategy and a recommendation backtracking mechanism
process of the algorithm is to set eps as the radius and then
based on collaborative filtering.
draw a circle with each data point as the center of the circle.
The algorithm will calculate the number of points in the
circle, which is the density value of the point. Then, a density A. DYNAMIC DENSITY CLUSTERING STRATEGY
threshold MinPts is selected. For example, the center point 1. DBSCAN classifies the current data set based on density.
with the number of circles less than MinPts is a low-density Firstly, the current data set is clustered for the first time with a
point, while the center point with the number of circles greater suitable radius, in which isolated points form a class of their
than or equal to MinPts is a high-density point. If there is a own. Fig. 1 is a result of the primary clustering of data set
high-density point within the circle of another high-density pr226.
point, the algorithm will connect the two points. If there is a After clustering is completed, each small class is treated
low-density point within the circle of high-density points, it is as a new TSP to be solved, and the traditional ant colony
connected to the nearest high-density point, which is called algorithm has the advantage of high precision in solving the
the boundary point. In this way, all the points that can be small-scale TSP, so that the algorithm can converge in a short
connected form a cluster, and the points that are not in any time, as shown in Fig. 2.
high-density circle are isolated. The formula is shown in (7) Through this method, the algorithm can quickly construct
and (8). the initial differential pheromone distribution of the path in
the early stage, which provides preparation for the connection
N (xj ) = {xi ∈ D|distance(xi ,xj ) ≤ ε} (7) of the following connecting-ants. This can greatly increase
|N (xj )| ≥ MinPts (8) the convergence speed of the algorithm while ensuring the
accuracy of the algorithm.
where D is the sample data set, N (xj ) is the number of sub- 2. After completing the above work, the algorithm enters
sample sets; ε is the set distance, and xj is the core object; the process of dynamic clustering. After the primary clus-
MinPts is the density threshold. tering reach convergence, DBSCAN begins to expand the
The method has the advantages that the number of classes search radius and re-cluster the original data set. The newly
can be automatically determined. Classes of any shape and generated classes are formed based on the original classes and
size can be divided, and the method is not influenced by adjacent classes. As shown in Fig. 3, it is a result of secondary
isolated points. Isolated points can be classified separately. clustering.

VOLUME 8, 2020 154473


J. Yu et al.: Dynamic Density Clustering Ant Colony Algorithm With Filtering Recommendation Backtracking Mechanism

FIGURE 3. Pr226 secondary clustering.

FIGURE 5. Density identification.

FIGURE 4. Pr226 third clustering.

FIGURE 6. Pheromone dynamic backtracking.

After clustering again, the number of classes decreases,


and the size of each class increases, forming a new TSP. increasing pheromones affect ants’ choices of routes, which
Then, ant colony algorithm is used again to find the shortest leads to a decrease in the diversity of the algorithm.
path. Because the newly formed classes are based on the Through experiments, it can be found that ant colony algo-
original ones, most of the paths have high concentrations of rithm has poor ability to find solutions mainly in places with
pheromones. The ant colony is induced by high-concentration dense data points. It is prone to cross-paths and suboptimal-
pheromones on these paths so only a small number of paths paths, which reduces the diversity of the algorithm and results
need to be re-selected. This way can greatly reduce the diffi- in poor solutions or stagnation of the algorithm.
culty of finding the solution of the algorithm. After the con- To solve the above problems, a recommendation back-
vergence of the algorithm is completed, the above operations tracking mechanism based on collaborative filtering is pro-
will continue to be repeated. The number of classes will be posed in combination with the image processing algorithm
reduced by expanding the search range again until a class is (DBSCAN) to increase the diversity of the population. The
obtained. As shown in Fig. 4, pr226 eventually becomes a concentration of pheromones in dense paths will dynamically
large class. go back to a certain state which the algorithm has got before.
Due to the high accuracy of local solutions obtained by 1. The collaborative filtering recommendation algorithm
the primary clustering, the quality of the globally optimal is a common computer algorithm. This strategy uses a clus-
solution obtained by dynamic clustering is improved. tering algorithm to carry out collaborative filtering. First,
Through the aggregation of small classes into large classes, a density threshold MinPts is set, and then DBSCAN is used
the relatively correct distribution of pheromones is realized to to identify the current data set. The following Fig. 5 is the
induce ants to make path selection, so as to avoid blindness result of the density identification of data set eil51. With the
in finding solutions and ensure accuracy. help of the collaborative filtering strategy, the data set eil51 is
filtered out of some data points, leaving only 8 small classes.
B. RECOMMENDATION BACKTRACKING MECHANISM 2. After the collaborative filtering is completed, the strat-
BASED ON COLLABORATIVE FILTERING egy enters the process of recommendation backtracking.
Ant colony algorithm is prone to stagnation when solving From the previous analysis, the dense place is the key to affect
TSP because of its positive feedback characteristic. Espe- the accuracy of the solution. The results of collaborative fil-
cially when dealing with large-scale TSP, the algorithm is tering are the points which are recommended by the algorithm
easy to fall into local optimum in the early stage, thus los- for backtracking. Some parts from the recommended data
ing the ability to find solutions. The traditional optimization points will be backdated randomly, whereas the points not in
method 3-opt takes too long and has a limited effect in solving the recommended list will remain the same. The pheromone
large-scale TSP data sets. It is difficult to help the algorithm of the point where the backtracking is performed will auto-
jump out of the local optimum. The root cause is that the matically go back to a certain state which has got before.

154474 VOLUME 8, 2020


J. Yu et al.: Dynamic Density Clustering Ant Colony Algorithm With Filtering Recommendation Backtracking Mechanism

In Fig. 6, (a) is the pheromone concentration of the data set TABLE 1. Algorithm framework.
eil51 in a certain state, and (b) is the state of pheromone con-
centration after the recommended backtracking mechanism
based on collaborative filtering. It can be found that eil51 has
undergone pheromone backtracking at some dense locations,
which weakens the pheromone concentration.
3. The algorithm will dynamically change the density
threshold according to the running situation, which leads to
different results after each collaborative filtering. Different
recommended data points will lead to different results, thus
greatly increasing the possibility of jumping out of the local
optimum. This strategy can effectively increase the diversity
of the algorithm and reduce the disadvantages brought by the
positive feedback of ant colony algorithm in the later period.
Its advantages are mainly manifested in two aspects. First,
dynamic small-scale backtracking will not affect the conver-
gence speed of the algorithm, especially in solving large-scale
TSP. Local pheromone backtracking gives ants the opportuni-
ties to choose again, which can effectively help the algorithm
get rid of the local optimal solution currently trapped. Second,
the strategy combines the advantages of the collaborative
filtering recommendation algorithm to make the backtracking
mechanism more targeted. It can be found that the algorithm
is most likely to discover the locations of the poor paths in the
current solution searching process. It can dynamically back-
date pheromones in some dense places, greatly improving the
accuracy of backtracking, which increases the possibility of
the algorithm to jump out of the local optimum.

C. ALGORITHM STEPS
Step l: Initialize parameters and pheromone matrices.
Calculate the distance between cities.
Step2: Ants are divided into clustering-ants and
connecting-ants.
Step3: The current data set is clustered by DBSCAN, D. TIME COMPLEXITY ANALYSIS
according to Eq. (7) and Eq. (8). From the flow chart of the algorithm in Table 1 and
Step4: Clustering-ants are placed randomly in different Fig. 7 above, it can be seen that the time complexity of the
cities in a certain class, and connecting-ants are placed ran- algorithm DBACS in this paper is o((c)∗ (n + n∗ )∗ w), where
domly in the entire data set. c is the number of cities; n is the number of clustering-ant;
Step5: Clustering-ants search for the shortest path in each n ∗ is the number of connecting-ant (n+n∗ =H), and w is
class, and update the local and global pheromone in each class the maximum number of iterations. Therefore, the time com-
according to Eq. (4) and Eq. (5). plexity of DBACS is o(c∗ H ∗ w). It shows that the improved
Step6: Connecting-ants connect classes to form a global algorithm in this paper does not increase the complexity of
optimal path according to pheromones left by clustering- the algorithm.
ants and update the local and global pheromone according
to Eq. (4) and Eq. (5). IV. SIMULATION EXPERIMENT AND RESULT ANALYSIS
Step7: Expand the search radius of DBSCAN and re- A. SIMULATION ENVIRONMENT AND PARAMETER
cluster the original data until the algorithm gets a cluster. SETTING
Step8: The recommendation backtracking mechanism In order to verify the effectiveness of the improved algo-
based on collaborative filtering is used to increase the diver- rithm, the experimental environment of this paper is the
sity of the population and help the algorithm jump out of the WIN10 operating system. Matlab2019a is used to simulate
local optimum when the algorithm stagnates. different sizes of TSP in TSPLIB [26]. Moreover, we use
Step9: The number of iterations increases and the proce- the Taguchi’s experimental design method to set parame-
dure goes back to step 4. ters [27]. Each combination of the various parameters was
Step10: When the maximum number of iterations is tested 15 times, and the average value was taken for analysis.
reached, the algorithm outputs the best global solution. We take eil51 as an example to determine the parameter

VOLUME 8, 2020 154475


J. Yu et al.: Dynamic Density Clustering Ant Colony Algorithm With Filtering Recommendation Backtracking Mechanism

TABLE 3. Orthogonal test scheme and test results of ACS.

TABLE 4. Analysis of test results of ACS.

FIGURE 7. DBACS flow chart.

TABLE 2. Experimental factors and levels of ACS.

TABLE 5. Experimental factors and levels of MMAS.

value (the internal operations of the DBACS are based on


ACS, therefore, the parameters of DBACS are equal to ACS).
Table. 2-7 are the optimal parameter settings for the current
algorithm.
Based on the above experiments, it can be concluded that:
in ACS, the best scheme of parameters is that α is equal to 1,
β is equal to 4, and ρ is equal to 0.1, and ξ is equal to 0.3, and
colony algorithm. In order to verify the effectiveness of the
q0 is equal to 0.8; in MMAS, the best scheme of parameters
two strategies, pr107 and pr152 are selected for comparative
is that α is equal to 1, β is equal to 1, and ξ is equal to 0.2,
tests. The maximum number of iterations is 2000, and the
and q0 is equal to 0.7.
three algorithms are run 15 times respectively. DBACS is
B. EFFECTIVENESS ANALYSIS OF IMPROVEMENT the ant colony algorithm optimized in this paper. DBACS-1
STRATEGIES is the improved algorithm without the dynamic clustering
In this paper, the dynamic density clustering strategy and strategy. DBACS-2 is the improved algorithm without the
the recommendation backtracking mechanism based on col- recommendation backtracking mechanism based on collabo-
laborative filtering are used to optimize the traditional ant rative filtering. ACS is the traditional ant colony algorithm,

154476 VOLUME 8, 2020


J. Yu et al.: Dynamic Density Clustering Ant Colony Algorithm With Filtering Recommendation Backtracking Mechanism

TABLE 6. Orthogonal test scheme and test results of MMAS.

FIGURE 8. Pr107 convergence rate comparison.

TABLE 7. Analysis of test results of MMAS.

FIGURE 9. Pr152 convergence rate comparison.

tests, the DBACS integrated with the two strategies has better
performance than DBACS-1 and DBACS-2. The diversity of
and MMAS is the traditional maximum and minimum ant the algorithm is improved and the optimal solution is found.
algorithm. The optimal solution (Best), the worst solution It shows that the DBACS with two strategies has improved
(Worst), the average solution (Mean), the error rate (Er), and the convergence speed and accuracy.
the iteration times of the optimal solution (Convergence) are
summarized in Table 8. C. COMPARATIVE ANALYSIS OF IMPROVED ALGORITHM
Analysis of Table 8, Fig. 8 and Fig. 9 shows that in the data AND TRADITIONAL ALGORITHM
set pr107, the three improved algorithms DBACS, DBACS-1 In order to show the improvement of the algorithm DBACS
and DBACS-2 all find the optimal solution 44303, whereas in this paper, some TSP data in TSPLIB are selected for
the traditional ant colony algorithms ACS and MMAS do experimental analysis. The results are also compared with
not find the optimal solution. In the data set pr152, DBACS traditional ACS, MMAS. In addition, in order to make the
and DBACS-2 find the optimal solution 73682, whereas comparison more convincing, we select the improved ant
DBACS-1 fails to find the optimal solution, but its accuracy colony algorithm in the last two years for comparison, includ-
is higher than that of ACS and MMAS. It is observed that the ing PACO-3Opt (2018) [28], TREEACS (2019) [29], JCACO
dynamic density clustering strategy and the recommendation (2019) [30], and IFACO (2019) [31]. Our algorithms are
backtracking mechanism based on collaborative filtering play respectively carried out 15 times, with the maximum number
a significant role in improving the accuracy and convergence of iterations for each experiment being 2000. The test plat-
speed of the ant colony algorithm. As can be seen from form we used was a laptop computer, and the operating sys-
Fig. 10 and 11, the improved ant colony algorithm with tem was WIN10. The test environment was MATLAB2019,
recommendation backtracking mechanism based on collab- the CPU we used was intel core I7-4710mq, and the size of
orative filtering has better diversity than ACS. In the two the memory was 8G. The optimal solution (Best), the worst

VOLUME 8, 2020 154477


J. Yu et al.: Dynamic Density Clustering Ant Colony Algorithm With Filtering Recommendation Backtracking Mechanism

TABLE 8. Strategy comparison of various algorithms.

FIGURE 11. Pr152 diversity comparison.

FIGURE 10. Pr107 diversity comparison.

solution (Worst), the average solution (Mean), the iteration LACO is the optimal solution obtained by the algorithm and
times (Convergence), the minimum error rate (Er), and the Lmin is the standard optimal solution of the TSP data set.
running time (Time/s) of the optimal solution are summa- The Wilcoxon rank-sum test is implemented to detect
rized in Table 9. The minimum error rate is expressed by whether the difference between every pair of algorithms
equation (9). is significant. We used DBACS to perform rank-sum tests
LACO − Lmin respectively with ACS and MMAS. The results of the
Er = × 100% (9) Wilcoxon rank-sum test are summarized in column P. If the
Lmin
154478 VOLUME 8, 2020
J. Yu et al.: Dynamic Density Clustering Ant Colony Algorithm With Filtering Recommendation Backtracking Mechanism

TABLE 9. Comparison of DBACS, ACS, and MMAS at different TSP.

value of P is smaller than 0.05, there is a significant difference can find the standard optimal solution and the convergence
between the two samples. speed is faster. From (a) to (f) in Fig. 12, it serves to show that
As can be seen from Table 9, the DBACS in this paper the algorithm has already reached convergence in the early
performs well in solving the small-scale TSP. The algorithm stage and has high accuracy.

VOLUME 8, 2020 154479


J. Yu et al.: Dynamic Density Clustering Ant Colony Algorithm With Filtering Recommendation Backtracking Mechanism

FIGURE 13. Stability comparison of different algorithms.

Compared with the traditional Ant Colony System (ACS)


and Maximum and Minimum Ant System (MMAS), DBACS
can complete the initial distribution of pheromone in a short
time and construct a relatively correct path. Relying on the
advantages of dynamic clustering, ant colony algorithm can
be used in a small range to obtain more accurate solutions, and
pheromone induction is helpful to accelerate the convergence
of the algorithm. However, the other two algorithms are blind
in finding the solution in the early stage and need to spend a
lot of time constructing a relatively good initial path. From
(f) to (n) in Fig. 12, the ability of the traditional algorithm
to find the solution begins to decline when solving the large-
scale TSP, and it is easy to fall into local optimum.
It can be noticed from Fig. 12 that the three algorithms
have fallen into a local optimum in the later period. DBACS
with a recommendation backtracking mechanism based on
collaborative filtering plays a role in improving the accuracy
of the solution. A collaborative filtering recommendation
algorithm is used to identify the places where are relatively
dense, and targeted dynamic backtracking is implemented to
improve the possibility that the algorithm jumps out of the
local optimum. However, the other two algorithms are at a
standstill in the later period. Owing to the impact of high-
concentration pheromone, the ability of ant colony algorithm
to find solutions is greatly weakened, and the algorithm
cannot jump out of the local optimum. It is observed that
the recommendation backtracking mechanism based on col-
laborative filtering can effectively help the algorithm jump
out of the local optimum. What’s more, because the range of
backtracking is dynamic and small, the number of iterations
required to reach convergence again after backtracking is
relatively small.
From the result P of the rank-sum tests, we can see that
most P is smaller than 0.05, especially in large-scale TSP.
It means that there is a significant difference in the ability to
solve TSP between the improved algorithm and the traditional
FIGURE 12. Comparison of convergence rates of different algorithms.
algorithms.
In summary, DBACS can significantly improve the
In dealing with large-scale TSP, DBACS has obvious convergence speed and accuracy of the algorithm in
advantages. The first advantage is the fast convergence speed. large-scale TSP.

154480 VOLUME 8, 2020


J. Yu et al.: Dynamic Density Clustering Ant Colony Algorithm With Filtering Recommendation Backtracking Mechanism

FIGURE 14. Comparison of average precision of different algorithms.

FIGURE 15. DBACS shortest path.


In this paper, the standard deviation (Formula 10) is used to
paper has better stability than ACS and MMAS.
reflect the stability of the algorithm. The standard deviation v
calculated from all TSP data (15 times for each test) in the u
u1 X M
experiment is plotted as a histogram. As shown in Fig. 13, dev = t (li − lavg )2 (10)
it can be concluded from the figure that the DBACS in this M
i=1

VOLUME 8, 2020 154481


J. Yu et al.: Dynamic Density Clustering Ant Colony Algorithm With Filtering Recommendation Backtracking Mechanism

TABLE 10. Comparison of DBACS with latest improved algorithms.

TABLE 11. Comparison of DBACS with latest improved algorithms.

where M is the test number of the algorithm in a data set; the 4V3LGA (2017), and 1OGA (2017) are improved genetic
test number in this paper is 15; li is the solution obtained by algorithms [36]. It can be found that compared with
each algorithm in the test; lavg is the average solution of M other algorithms, DBACS has a better performance in
tests in a data set. solving TSP.
In order to further clearly show the improvement of the
improved algorithm in the accuracy of each solution, four data E. OVERALL PERFORMANCE ANALYSIS OF THE
sets of different sizes are selected for comparative analysis. ALGORITHM
The data sets are pr107, pr226, pr439 and p654. Each data In this paper, ants are divided into clustering-ants and
set is run 15 times with three algorithms respectively. The connecting-ants. In each iteration, clustering-ants are
results are sorted from small to large, and a line chart is drawn responsible for clustering, and then connecting-ants connect
in Fig. 14. It can be concluded from the figure that DBACS each small class according to the pheromone distribution to
can obtain better solutions than traditional algorithms when form the final path.
dealing with TSP of different scales, and the stability of the In the early stage of the algorithm, the DBSCAN algorithm
algorithm is excellent. Especially in the solving of large-scale is used to divide the current data set into several small classes
pr439 and p654, the 15 solutions obtained by DBACS have according to the density. In each class, ant colony algorithm
higher accuracy. is used to construct a relatively correct path and form a favor-
The optimal paths obtained by DBACS in the test data sets able initial distribution of pheromones, which can accelerate
have been summarized in Fig. 15. the convergence speed of the algorithm. The traditional ant
colony algorithms blindly search for the solution in the early
D. COMPARATIVE ANALYSIS OF IMPROVED ANT COLONY stage because the difference of pheromone distribution is
ALGORITHM AND LATEST ALGORITHM not obvious. Because of this, when solving large-scale TSP,
In order to verify the performance, the improved ant colony the convergence speed of the algorithm is insufficient.
algorithm DBACS in this paper is compared with other lat- In the middle stage of the algorithm, due to the completion
est improved algorithms, as shown in Table. 10, Table. 11 of the initial path pheromone construction, the dynamic clus-
and Table. 12. The data are from the following papers. tering strategy plays a role in accelerating the convergence.
PSO-ACO-3Opt (2015) is a hybrid algorithm of the ant Relying on the relatively correct pheromone distribution in
colony and particle swarm [20]. HDACO (2018) [32], the early stage, the ant colony is induced to move towards
PACO-3Opt (2018) [28], OMACO (2014) [33], and HMMA the relatively correct paths. Because the range of clustering
(2015) [34] are the improved ant algorithms; DGSATSP is dynamically expanded on the original basis, the newly
(2014) is a discrete gravitational search algorithm [35]; generated classes can obtain a good solution only by slightly

154482 VOLUME 8, 2020


J. Yu et al.: Dynamic Density Clustering Ant Colony Algorithm With Filtering Recommendation Backtracking Mechanism

TABLE 12. Comparison of DBACS with latest improved algorithms.

modifying some paths. The convergence speed and accuracy [2] K. Deb, A. Pratap, S. Agarwal, and T. Meyarivan, ‘‘A fast and elitist
of the algorithm are greatly improved in this way. multiobjective genetic algorithm: NSGA-II,’’ IEEE Trans. Evol. Comput.,
vol. 6, no. 2, pp. 182–197, Apr. 2002.
At the later stage of the algorithm, due to the great dif- [3] C. A. C. Coello, G. T. Pulido, and M. S. Lechuga, ‘‘Handling multiple
ference of pheromone concentration in each path, the ant objectives with particle swarm optimization,’’ IEEE Trans. Evol. Comput.,
colony is seriously disturbed in the selection of paths. How- vol. 8, no. 3, pp. 256–279, Jun. 2004.
[4] Z. Xu, Y. Wang, S. Li, Y. Liu, Y. Todo, and S. Gao, ‘‘Immune algorithm
ever, the recommendation backtracking mechanism based on combined with estimation of distribution for traveling salesman problem,’’
collaborative filtering proposed in this paper can automati- IEEJ Trans. Electr. Electron. Eng., vol. 11, pp. S142–S154, Jun. 2016.
cally find intensive places in the current data and carry out [5] S. Gao, W. Wang, H. Dai, F. Li, and Z. Tang, ‘‘Improved clonal selection
algorithm combined with ant colony optimization,’’ IEICE Trans. Inf. Syst.,
targeted small-scale backtracking of pheromone to get rid of vol. 91, no. 6, pp. 1813–1823, Jun. 2008.
the misleading of high-concentration pheromone and help the [6] H. Dai, Y. Yang, C. Li, J. Shi, S. Gao, and Z. Tang, ‘‘Quantum interference
algorithm jump out of the local optimum. crossover-based clonal selection algorithm and its application to traveling
salesman problem,’’ IEICE Trans. Inf. Syst., vol. 92, no. 1, pp. 78–85,
To sum up, the algorithm in this paper has achieved a Jan. 2009.
better balance in diversity and convergence speed, and can [7] M. Dorigo, V. Maniezzo, and A. Colorni, ‘‘Ant system: Optimization by a
find better solutions in a short time. colony of cooperating agents,’’ IEEE Trans. Syst. Man, Cybern. B, Cybern.,
vol. 26, no. 1, pp. 29–41, Feb. 1996.
[8] M. Dorigo, M. Birattari, and T. Stutzle, ‘‘Ant colony optimization,’’ IEEE
V. CONCLUSION
Comput. Intell. Mag., vol. 1, no. 4, pp. 28–39, Nov. 2006.
This paper proposes a dynamic density clustering ant colony [9] Q. Luo, H. Wang, Y. Zheng, and J. He, ‘‘Research on path planning of
algorithm with a filtering recommendation backtracking mobile robot based on improved ant colony algorithm,’’ Neural Comput.
mechanism. The improved algorithm includes two strategies. Appl., vol. 32, no. 6, pp. 1555–1566, Mar. 2020.
[10] S. Takitou and A. Taneda, ‘‘Ant colony optimization for predicting
The first strategy is the dynamic density clustering strategy, RNA folding pathways,’’ Comput. Biol. Chem., vol. 83, Dec. 2019,
which is used to accelerate the convergence of the algorithm Art. no. 107118.
and improve the accuracy of the solution. The strategy con- [11] Z. Yun, S. Shao, and T. Mai, ‘‘Solving TSP problem in precision agriculture
soil survey,’’ China Rural Water Hydropower, to be published.
verts large-scale TSP into small-scale TSP, and dynamically [12] R. S. Parpinelli, H. S. Lopes, and A. A. Freitas, ‘‘Data mining with an ant
merges adjacent small classes during the process. It uses the colony optimization algorithm,’’ IEEE Trans. Evol. Comput., vol. 6, no. 4,
induction of pheromone to reduce the difficulty of searching pp. 321–332, Aug. 2002.
[13] M. Dorigo and L. M. Gambardella, ‘‘Ant colony system: A cooperative
for better solutions. The second strategy is a recommenda- learning approach to the traveling salesman problem,’’ IEEE Trans. Evol.
tion backtracking mechanism based on collaborative filter- Comput., vol. 1, no. 1, pp. 53–66, Apr. 1997.
ing, which is used to increase population diversity and help [14] T. Stützle and H. H. Hoos, ‘‘MAX-MIN ant system,’’ Future Generat.
Comput. Syst., vol. 16, no. 8, pp. 889–914, Jun. 2000.
the algorithm jump out of the local optimum. This strategy [15] T. Saenphon, S. Phimoltares, and C. Lursinsap, ‘‘Combining new fast
can weaken pheromone dynamically in dense data sets to opposite gradient search with ant colony optimization for solving trav-
reduce the negative impact of positive feedback of ant colony elling salesman problem,’’ Eng. Appl. Artif. Intell., vol. 35, pp. 324–334,
Oct. 2014.
algorithm in the later period, so as to help the algorithm [16] L. Zhang, C. Xiao, and T. Fei, ‘‘Improved ant colony algorithm based on
jump out of the local optimum. The experimental results bacterial foraging,’’ Comput. Eng. Sci., vol. 40, no. 10, pp. 1882–1889,
show that, in large-scale TSP instances, the algorithm can 2018.
[17] M. Starzec, G. Starzec, A. Byrski, and W. Turek, ‘‘Distributed ant colony
accelerate the convergence speed and increase the diversity optimization based on actor model,’’ Parallel Comput., vol. 90, Dec. 2019,
of the population, thus improving the quality of the solution. Art. no. 102573.
Future research directions: [18] D. Gaifang, F. Xueliang, L. Honghui, and X. Pengfei, ‘‘Cooperative ant
colony-genetic algorithm based on spark,’’ Comput. Electr. Eng., vol. 60,
1. We will continue to study the clustering ant colony pp. 66–75, May 2017.
algorithm to solve larger TSP instances. [19] X. Meng, Z. Pian, and Z. Sheng, ‘‘Ant colony algorithm based on
2. Combine Ant Colony Optimization with practical appli- directional pheromone coordination,’’ Control Decis., vol. 28, no. 5,
pp. 782–786, 2013.
cations, such as robot path planning. [20] M. Mahi, Ö. K. Baykan, and H. Kodaz, ‘‘A new hybrid method based on
particle swarm optimization, ant colony optimization and 3-opt algorithms
REFERENCES for traveling salesman problem,’’ Appl. Soft Comput., vol. 30, pp. 484–490,
[1] C. Mu, J. Zhang, Y. Liu, R. Qu, and T. Huang, ‘‘Multi-objective ant colony May 2015.
optimization algorithm based on decomposition for community detection [21] C.-Y. Pang, B.-Q. Hu, J. Zhang, W. Hu, and Z.-C. Shan, ‘‘Applying data
in complex networks,’’ Soft Comput., vol. 23, no. 23, pp. 12683–12709, clustering feature to speed up ant colony optimization,’’ Abstract Appl.
Dec. 2019. Anal., vol. 2014, pp. 1–8, May 2014.

VOLUME 8, 2020 154483


J. Yu et al.: Dynamic Density Clustering Ant Colony Algorithm With Filtering Recommendation Backtracking Mechanism

[22] H. Yang, ‘‘Study on traveling salesman problem based on the improved JIN YU was born in 1996. He is currently pur-
chaos ant colony algorithm,’’ Adv. Mater. Res., vols. 989–994, suing the M.S. degree with the Shanghai Univer-
pp. 2196–2199, Jul. 2014. sity of Engineering Science. His research interests
[23] P. Du, Z. Tang, and Y. Su, ‘‘An object-oriented multi-role ant colony algo- include intelligent algorithms, path planning of
rithm and its TSP solution,’’ Control Decis., vol. 29, no. 10, pp. 1729–1736, mobile robots, and embedded systems.
2014.
[24] Y. Pang, C. Zhong, and K. Cheng, ‘‘Ant colony optimization based on clus-
tering ensemble and TSP algorithm in restricted solution space,’’ J. Univ.
Sci. Technol. China, vol. 46, no. 9, pp. 780–787, 2016.
[25] J. Li, X. Meng, and X. Dai, ‘‘Collision-free scheduling of multi-
bridge machining systems: A colored traveling salesman problem-based
approach,’’ IEEE/CAA J. Automatica Sinica, vol. 5, no. 1, pp. 139–147,
Jan. 2018.
[26] MP-TESTDATA—The TSPLIB Symmetric Traveling Salesman Problem.
[Online]. Available: http://elib.zib.de/pub/mp-testdata/tsp/tsplib/tsp/
[27] S. Gao, M. Zhou, Y. Wang, J. Cheng, H. Yachi, and J. Wang, ‘‘Dendritic
neuron model with effective learning algorithms for classification, approx-
imation, and prediction,’’ IEEE Trans. Neural Netw. Learn. Syst., vol. 30,
no. 2, pp. 601–614, Feb. 2019. XIAOMING YOU received the M.S. degree in
[28] Ş. Gülcü, M. Mahi, Ö. K. Baykan, and H. Kodaz, ‘‘A parallel cooperative computer science from Wuhan University, in 1993,
hybrid method based on ant colony optimization and 3-opt algorithm and the Ph.D. degree in computer science from
for solving traveling salesman problem,’’ Soft Comput., vol. 22, no. 5, the East China University of Science and Tech-
pp. 1669–1685, Mar. 2018. nology, in 2007. She is currently a Professor with
[29] K. Yang, X. You, and S. Liu, ‘‘Self-adaptive double-population ant colony the Shanghai University of Engineering Science.
algorithm with entropy,’’ Comput. Eng. Appl., vol. 55, no. 19, pp. 66–73,
Her research interests include swarm intelligent
2019.
systems, distributed parallel processing, and evo-
[30] D. Zhang, X. You, S. Liu, and K. Yang, ‘‘Multi-colony ant colony optimiza-
tion based on generalized jaccard similarity recommendation strategy,’’ lutionary computing.
IEEE Access, vol. 7, pp. 157303–157317, 2019.
[31] X. Gong, Z. Rong, T. Gao, Y. Pu, and J. Wang, ‘‘An improved ant colony
optimization algorithm based on fractional order memory for traveling
salesman problems,’’ in Proc. IEEE Symp. Series Comput. Intell. (SSCI),
Dec. 2019, pp. 1516–1522.
[32] E. Liao and C. Liu, ‘‘A hierarchical algorithm based on density peaks
clustering and ant colony optimization for traveling salesman problem,’’
IEEE Access, vol. 6, pp. 38921–38933, 2018.
[33] K. Jiang, M. Li, and H. Zhang, ‘‘Improved ant colony algorithm for trav-
SHENG LIU received the M.S. degree in computer
elling salesman problem,’’ J. Comput. Appl., vol. 35, no. S2, pp. 114–117,
science from the Huazhong University of Science
2015.
[34] W. Yong, ‘‘Hybrid Max–Min ant system with four vertices and three lines and Technology, in 1999, and the Ph.D. degree
inequality for traveling salesman problem,’’ Soft Comput., vol. 19, no. 3, in computer science from the East China Univer-
pp. 585–596, Mar. 2015. sity of Science and Technology, in 2008. He is
[35] M. B. Dowlatshahi, H. Nezamabadi-pour, and M. Mashinchi, ‘‘A dis- currently a Professor with the Shanghai Univer-
crete gravitational search algorithm for solving combinatorial optimization sity of Engineering Science. His research interests
problems,’’ Inf. Sci., vol. 258, pp. 94–107, Feb. 2014. include quantum-inspired evolutionary computa-
[36] M. Zheng and M. Zhuo, ‘‘Solution for traveling salesman problem with tion, distributed parallel processing, and evolution-
four vertices and three lines genetic algorithm,’’ Comput. Eng. Appl., ary computing.
vol. 53, no. 14, pp. 148–154, 2017.

154484 VOLUME 8, 2020

You might also like