Neural Information Processing – Letters and Reviews
Vol. 11, No. 7, July 2007
LETTER
A Simulated Annealing PolyClonal Selection Algorithm and Its Application to Traveling Salesman Problems Shangce Gao, Zheng Tang, Hongwei Dai and Gang Yang Faculty of Engineering, Toyama University 3190 Gofuku, Toyama, 930-8555, Japan E-mail:
[email protected], E-mail:
[email protected] (Submitted on June. 1, 2007) Abstract − In this paper, we propose a Simulated Annealing PolyClonal Selection Algorithm (SAPCSA) for Traveling Salesman Problems (TSP). By introducing a simulated annealing (SA) strategy to the PolyClonal Selection Algorithm (PCSA), the SAPCSA integrate the characteristics of both SA and PCSA. Numerous instances have been simulated to verify the proposed algorithm. Keywords − Simulated Annealing, PolyClonal Selection Algorithm, Traveling Salesman Problems
1. Introduction The area of artificial immune system (AIS) has been experiencing an increasing development in the last few years, with application in pattern recognition, network security and optimization, amongst other fields of research. There are some works in which new algorithms are presented, discussed and tested against analytical problems, showing very promising results [1]. In particular, one of the famous immune algorithms, Clonal Selection Algorithm (CLONALG), which designed based on the Clonal Selection principle of adaptive immunity have shown considerable success in solving a variety of pattern recognition, multi-model and combinatorial problems [2] [3]. Although CLONALG has demonstrated its great values, few applications are reported because there are some problems of CLONALG, for example, its convergence behavior. To improve the performance of CLONALG, several heuristic strategies are incorporated into the original algorithm. Du et al. [4] proposed an adaptive polyclonal programming algorithm which added a clonal recombination operator in order to realize the cooperation and communication among different antibodies and thus obtain the diversity and high convergence speed. Recently, Zhong et al. [5] applied clonal selection algorithm to perform multispectral remote sensing image classification task by incorporating the simulated annealing algorithm. In this paper, by adding a clonal recombination operator and incorporating the simulated annealing (SA) strategy into the CLONALG algorithm, the proposed hybrid algorithm, named Simulated Annealing PolyClonal Selection Algorithm (SAPCSA) can avoid the premature convergence and have powerful ability of searching the globally optimal or near-optimum solution for the Traveling Salesman Problems (TSP). Simulation results are evaluated by applying several known algorithms: Kohonen Networks [6] [7], a conventional genetic algorithm using a greedy crossover operator [8] [9]. It is demonstrated that SAPCSA is superior to these traditional algorithms.
2. Clonal Selection Theory In order to explain the essential features which contain sufficient diversity, discrimination of self and nonself and long-lasting immunologic memory, clonal selection theory is been developed [10]. When an animal is exposed to an antigen, some subpopulation of its bone marrow derived cells (B lymphocytes) can recognize the antigen with a certain affinity (degree of match), the B lymphocytes will be stimulated to proliferate (divide) and eventually mature into terminal (non-dividing) antibody secreting cells, called plasma cells. Proliferation of the
159
A Simulated Annealing PolyClonal Selection Algorithm
Shangce Gao, Zheng Tang, Hongwei Dai and Gang Yang
B lymphocytes is a mitotic process whereby the cells divide themselves, creating a set of clones identical to the parent cell. The proliferation rate is directly proportional to the affinity level, i.e. the higher affinity levels of B lymphocytes, the more of them will be readily selected for cloning and cloned in larger numbers. More specifically, during asexual reproduction, the repertoire of antigen-activated B cells is diversified basically by two mechanisms: somatic hypermutation and receptor editing. About 5-8% of the least stimulated lymphocytes is replaced per cell generation by newcomer cells from the bone marrow and joins the pool of available antigen recognizing cells to maintain the diversity of the population. Besides, the immune system also possesses memory properties as a portion of B-cells will differentiate into memory cells, which do not produce antibodies but instead remembers the antigenic pattern in anticipation of further re-infections. These memory cells circulate through the blood, lymph and tissues. When exposed to a second antigenic stimulus, they commence to differentiate into plasma cells capable of producing high-affinity antibodies, preselected for the specific antigen that had stimulated the primary response.
3. Simulated Annealing PolyClonal Selection Algorithm 3.1 Traveling Salesman Problem (TSP) Traveling salesman problem is a typical case of a combinatorial optimization problem and arises in numerous applications, from VLSI circuit design to fast food delivery. The simplest TSP involves finding an optimal route for visiting n cities and returning to the point of origin, where the inter-city distances are symmetric and known. Other variations of the TSP have also aroused interest. Its appeal is in its simplicity and because many other practical problems of interest can be reduced to a TSP. One of the key problems for TSP is the encoding scheme. In our approach to TSP, the SAPCSA model is organized by the 1 × N vector V , such that Vi = k if city k is in position i in the tour. Then, a solution V = ( v1 ,...,v k ,...,v N ) represents that the first city to be visited is the value of v1 and the k -th city to be visited is the value of v k . The last city to be visited before going back to the city v1 is the city v N . Since a valid tour is represented by a permutation of M = 1,2,...,N , the number of neural states corresponding to feasible tours is ( N − 1 )! if we consider a fixed first city. Notice that with this representation the direction is not arbitrary. For instance, although the neural state ( A, B ,C , D ) is different from the neural state ( A, D ,C , B ) , they represent the same tour. Instead of applying a penalty method (as it is usual in Hopfield-type networks), we decide to consider the search space as the set of valid tours in order to obtain a high speed of convergence. Therefore, since the only possible states for the network are the permutations of M , the TSP can be solved by minimizing the simple energy function: N
E = ∑ D( vi , vi +1 ) i =1
(1)
where D is the distance function defined as D( vi ,v j ) = d ij (where dij denotes the distance between city i and city j ) and the subscript are cyclic, such that v N +1 = v1 . And the affinity of the solution in SAPCSA is in opposition to the energy function E .
3.2 SAPCSA As the original CLOANLG algorithm often premature during the course of computation and decrease the diversity of antibody population, we propose a hybrid polyclonal selection algorithm by incorporating the simulated annealing and applied to the traveling salesman problems. Simulated annealing [11] is based on thermodynamics and can be considered as an algorithm that generates a sequence of Markov chains controlled by gradually decreasing temperature of the system. The algorithm employs a random search which not only accepts changes that decrease objective function, but also some changes that increase it with a probability. Its major advantage over other methods is an ability to obtain improvements also into the late phase of the process [5] and thus can avoid becoming trapped at local minima. Shape-space model [12] is a useful mathematical tool to quantitatively describe the interaction among antigens and immune cells. Mathematically, either an antigen or an immune cell can be represented by a set of coordinates in a N-dimensional shape-space. So we can express the immune cell's receptor gene sequence as R = (r1, r2 ,..., rN ) . 160
Neural Information Processing – Letters and Reviews
Vol. 11, No. 7, July 2007
1
Initialize Population
2
Compute Energy Function
3
8
Select n Best Antibodies
New nc random antibodies
Elite Pool 1
Elite Pool n
Clone p1 Antibodies
Clone p n Antibodies
Hypermutation
Receptor Editing
Hypermutation
5
Receptor Editing
6
Greedy Cross
Antibodies Reselect
4
Antibodies Reselect
Simulated Annealing 7
Cells Update Pepeat/End
9
Figure 1. The flowchart of the simulated annealing polyclonal selection algorithm In order to account for the enormous number of antigens, immune cells possess the unique ability to acquire large numbers of somatic hypermutation. For example, gene position i and j are selected randomly, the antibody ( r1 ,..ri −1 , ri , ri+1 ,...r j −1 ,r j ,r j +1 ...,rN ) can be changed to ( r1 ,..ri−1 , r j ,ri+1 ,...r j −1 ,ri r j +1 ...,rN ) through the hypermutaion affinity maturation process. As to the receptor editing, the editing on heavy chains occurs mostly by deletion of the intervening gene sequence while in the case of light chain receptor gene editing can occur either by deletion or by inversion of the intervening gene fragment. If receptor gene position i and j are selected, then the novel gene sequences based on inversion can be illustrated in the following: ( r1 ,..ri−1 ,ri ,ri +1 ,...r j −1 ,r j ,r j +1 ...,rN ) → ( r1 ,...,ri−1 ,r j ,r j −1, ...,ri +1 ,ri ,r j+1 ,...,rN ) For the purpose of realizing the cooperation and communication among different antibodies and thus obtaining the diversity and high convergence speed, we add a greedy crossover operator [9] into the algorithm. Greedy crossover selects the first city of one parent, compares the cities leaving that city in both parents and chooses the closer one to extend the tour. If one city has already appeared in the tour, we choose the other city. If both cities have already appeared, we choose the non-selected city which is the closest to the current city. In figure 1, we illustrate the SAPCSA algorithm which consists of two-stage cycle, the polyclonal selection stage and the simulated annealing stage. In the former stage, the antibodies in population are selected, cloned and mutated by polyclonal selection operations while in the latter stage via the Markov chain generation process, the population of the mutated antibodies search for better candidates. Generally, the proposed model can be described as follows: 161
A Simulated Annealing PolyClonal Selection Algorithm
Shangce Gao, Zheng Tang, Hongwei Dai and Gang Yang
Step 1. Create an initial pool of m antibodies (candidate solutions ( Ab1 , Ab2 ,..., Abm ) ). Step 2. Compute the affinity of all antibodies ( D( Ab1 ), D( Ab2 ),...,D( Abm )) , where D(⋅) is the function of compute the affinity. Step 3. Select n ( n < m ) best (fittest) individuals based on their affinities from the m original antibodies. These antibodies will be referred to as the elites. Step 4. Place each of the n selected elites in n separate and distinct pools in ascending order (Ab1 , Ab2 ,..., Abn). They will be referred to as the elite pools. Step 5. Clone the elites in each elite pool with a rate proportional to its fitness, i.e., the fitter the antibody, the more clones it will have. The amount of clone generated for these antibodies is given by (2): n−i Pi = round ( × NN ) (2) n where i is the ordinal number of the elite pools, NN is a multiplying factor which determining the scope of the clone and round (⋅) is the operator that rounds its argument towards the closest integer. After this step, we can obtain n ⋅ ∑ pi antibodies just as: ( Ab1,1 , Ab1,2 ,..., A1, p1 ;...; Abn ,1 , Abn ,2 ,..., Abn , pn )
(3)
Step 6. Subject the clones in each pool through either hypermutation or receptor editing processes. The mutation rate Phm and Pre for hypermutaion and receptor editing, respectively for both cases is inversely proportional to the fitness of the parent antibody. And computationally, the length of a given tour after any of the two operations can be computed from the tour length before the operation, rather than needing to be recomputed. That is, the operations of hypermutation and receptor editing represent cutting the tour at 2 or 4 places. To update the tour length, we need to do only 2 or 4 additionsubtraction pairs respectively. Then recombine the genic fragments of the Abi and Abi +1 antibodies according to the Greedy Crossover operator [9]. Step 7. Update the parent antibodies in each elite pool with the progenies according to the simulated annealing strategy. At each temperature T , if the affinity of the best offspring is large than the affinity of the parents, accept the offspring into the elite pools; else accept it with probability p = exp((Doffspring − D parent ) / T ). And the cooling scheme is defined as follows: T (t + 1) = T (t ) * (1 − β ). Step 8. Replace the worst nc ( α = nc / n ) elite pools with new random antibodies once every k generations to introduce diversity and prevent the search from being trapped in local optima. Step 9. Determine if the maximum number of generation G max to evolve is reached. If it has, terminate and return the best antibody; if it has not, return to Step 3.
4. Simulation Results In order to evaluate the effectiveness of the proposed algorithm, extensive simulations are implemented in C++ on a Pentium4 2.8GHz (512 Hz). The parameters used in our algorithm are set as follows: G max = 1000; m = 150; n = 100; NN = 50; Phm : Pre = 0.5 : 0.5; T0 = 100; β = 0.02; α = 20%; k = 50. By incorporating the simulated annealing strategy into the PolyClonal Selection Algorithm (PCSA), the proposed algorithm (SAPCSA) reasonably combines the searching ability of PCSA and annealing searching behavior. For the purpose of investigating how the simulated annealing works, we compare the convergence performance of the SAPCSA and the PCSA. From Figure 1, we illustrate the average convergence performance of 10 runs with four typical problems and can clearly find that the simulated annealing approach help the PolyClonal Selection Algorithm avoid premature convergence and can find a better solution for the traveling salesman problems. To qualify how much better our proposed algorithm is making shorter routes than the traditional approaches, we have tested all of the algorithms with a large number of Traveling Salesman Problems up to 532 cities and all the simulations are run 10 times, and then compared to several known algorithms: Kohonen Networks [6] [7], a conventional genetic algorithm using a greedy crossover operator [8] [9]. The results of these simulations are summarized in Table 1. The first three columns indicate the problem type, sizes and the optimal solutions which taken form the TSPLIB [13]. The next three columns list the results 162
Neural Information Processing – Letters and Reviews
Vol. 11, No. 7, July 2007
Figure 1. The comparison of convergence performance between the PCSA and the SAPCSA of the Kohonen Networks which contains the Pure Kohonen Network [6] and two improved Kohonen Networks (KNIES-TSP and KNIES-TSP-Global) [7]. In the other columns, we list the simulation results using the conventional genetic algorithm [8] with a greedy crossover operator [9] and the proposed algorithm, respectively. Here, the “Best” and “AV.” indicate the best and average results during the 10 runs. All the results listed in the table are the percentage of the optimal solutions. And the symbol “-” means no convergence. From Table 1, we can see that the proposed algorithm has superior ability to search the shortest routes and cost less computation times.
5. Conclusion In this paper, we extended the traditional CLONALG algorithm by incorporating the greed crossover operator and the simulated annealing strategy, named SAPCSA. The performance of the proposed algorithm was evaluated by simulating a number of traveling salesman problems and compared to several traditional algorithms. The simulation results indicated that the proposed algorithm can avoid the premature convergence and has superior ability of searching the global optimal or near-optimum solutions.
References [1] D. Dasgupta and F. González, “Artificial immune systems (AIS) research in the last five years,” in Proc. Conf. Evolutionary Computation, pp. 123-130, Dec.2003. [2] L.de Castro , F.Von Zuben, “Learning and Optimization Using the Clonal Selection Principle”, IEEE Transactions on Evolutionary Computation, Special Issue on Artificial Immune Systems, vol. 6(3), pp. 239251, 2002.
163
A Simulated Annealing PolyClonal Selection Algorithm
Shangce Gao, Zheng Tang, Hongwei Dai and Gang Yang
Table 1. Simulation Results on Traveling Salesman Problems Problem
Size
Dopt
eil51 st70 eil76 rd100 eil101 lin105 pr107 pr124 bier127 pr136 pr152 rat195 kroA200 pcb442 att532
51 70 76 100 101 105 107 124 127 136 152 195 200 442 532
426 675 538 7910 629 14379 44303 59030 118282 96772 73682 2323 29368 50778 27686
Kohonen Networks PKN KL KG 4.20 2.86 2.86 2.64 1.51 2.33 6.17 4.98 5.48 2.88 2.09 3.38 9.49 4.65 5.63 6.92 1.98 1.29 0.45 0.73 0.42 0.99 0.07 0.49 3.32 2.76 3.08 7.34 4.53 5.15 1.52 0.97 1.29 —— 12.24 11.92 8.26 5.72 6.57 —— 11.07 10.45 —— 6.74 6.80
Genetic Algorithm Best Av. Times(s) 1.26 2.58 45.26 1.54 2.35 65.23 2.15 3.21 68.95 3.14 5.27 100.52 4.24 6.21 122.84 1.06 1.98 98.48 2.38 3.59 119.57 1.96 2.74 152.65 3.51 6.51 157.29 2.68 4.32 148.65 1.35 2.65 256.32 2.35 6.68 369.28 5.96 10.36 403.36 10.25 16.35 1523.56 6.25 13.27 3653.25
Proposed Algorithm Best Av. Times(s) 0 0.23 13.67 0 0.29 23.97 0.56 1.45 28.63 1.72 3.07 45.02 2.86 4.35 59.06 0.23 0.78 36.88 1.08 1.49 52.96 0.11 0.80 42.49 2.47 4.39 102.22 2.56 3.77 98.7 0.34 0.67 67.78 1.29 2.28 142.90 2.46 4.58 194.52 4.25 5.64 756.25 5.21 6.84 1036.56
[3] N.C. Cortés, C. A. C. Coello, “Multiobjective Optimization Using Ideas from the Clonal Selection Principle”, Lecture Notes in Computer Science, Computer Science, vol.2723, pp.158-170, 2003. [4] H.F. Du, L.C. Jiao, R.C. Liu, “Adaptive polyclonal programming algorithm with applications", ICCIMA, pp.350-355, 2003. [5] Y.F. Zhong, L.P. Zhang, P.X. Li, “Multispectral remote sensing image classification based on simulated annealing clonal selection algorithm”, IGARSS’05, vol.6, pp.3745-3748, 2005. [6] T.Kohonen, “Self-Organization and Associative Memory”, 2nd Ed., Berlin: Springer-Verlag, 1987. [7] N.Aras, B.J.Oommen and I.K.Altinel, “The Kohonen network incorporating explicit statistics and its applications to the traveling salesman problem”, Neural Networks, vol.12, pp.1273-1284, 1999. [8] D.E. Goldberg, Genetic Algorithms in Serach, Optimization, and Machine Learning, Addison-Wesley, Reading, MA, 1989. [9] J. Grefenstette, R. Gopal, R. Rosamaita, D. Gucht, Genetic algorithms for the traveling salesman problem, in: Proceedings of the Second International Conference on Genetic Algorithm,. Lawerence Eribaum Associates, Mahwah, NJ, 1985. [10] F.M. Burnet, "The Clonal Selection Theory of Acquired Immunity", Cambridge Press, 1959. [11] S. Kirkpatrick, C. D. Gelatt and M. P. Vecchi, “Optimization by Simulated Annealing,” in Science, vol.220, pp. 671–680. 1983. [12] A.S. Perelson, "Immune network theory", Immunological Review, vol.110, pp.5-36, 1993. [13] http://www.iwr.uni-heidelberg.de/groups/comopt/software/TSPLIB95/ (Last access: Dec. 2006)
164