[ieee 2011 international conference on computational problem-solving (iccp) - chengdu, china...

5
AN IMPROVED NICHE GENETIC ALGORITHM BASED ON SIMULATED ANNEALING: SANGA HUANYANG ZHENG Beijing University of Posts and Telecommunications BEIJING, CHINA [email protected] Abstract-A simulated annealing based niche genetic algorithm (SANGA) has been presented to strength the optimization ability of niche genetic algorithm (NGA). The improved idea is to define niche formation using probability condition rather than simply distance condition. Individuals who only have close neighbors are inclined to build up niche; individuals who only have far neighbors are likely to depart from niche. The feasibility and validity of the proposed method is proved by the contrast between current NGA based on penalty, NGA based on fitness sharing, NGA based on deterministic crowding and SANGA in some simulation experiments and applications of 0-1 knapsack problem. Keywords-niche genetic algorithm, simulated annealing based niche, adaptive mutation, 0-1 knapsack problem I. INTRODUCTION To overcome global optimization problem, genetic algorithm (GA), which simulates biological evolution in the nature, was proposed. This method has been successfully applied in a wide continuum of areas such as planning, design, control, and then many researchers put forward its improved strategy. With the consideration to maintain the group diversity, niche genetic algorithm (NGA) born as the times require. NGA effectively avoids premature convergence and thus obtains better optimization capability. The most famous niche technique includes crowding [1] and fitness sharing [1]. Current popular NGA [2] is based on penalty function: If two individuals are similar and so make up niche, the worse one of them would get greatly punished. However, current NGA need to set a threshold to judge whether niche forms or not, while how to set this parameter does not have a certain criteria, leading to the descending efficiency. And thus it remains to be further studied and improved. Simulated annealing (SA) is another global optimization method, which originate from the simulation of solid annealing [3]. Its core idea is to judge whether the configuration accepts random moves or not by using Boltzmann factor: The worse the moves are, the less probability they have to be accepted. This is a classical thought in solving optimization problems. By combining Boltzmann factor in SA and current niche idea in NGA, a novel definition of niche and its supporting strategies is proposed in this article. Alien from previous niche, the new idea uses probability condition, instead of direct distance condition, to determine whether niche would form or not. Simulations and its application in 0-1 knapsack problem prove the superior of this method. II. PRINCIPLES OF SANGA A. Current NGA and its potential problems The difference between NGA and GA is that NGA have a niche part: After the process of crossover, mutation, and selection, current genetic group may have some similar individuals, leading to the birth of super individuals and group simplification; and then niche algorithm restricts these individuals, keeping group diversity. For current NGA, the distance between two individuals ( , Hamming distance and Euclidean distance are both well) is a measurement for judge whether a niche exists: When this distance is less than a previously assigned threshold ( ԡ൏ ܮ), niche forms and then the worse individual get punished. The following is a typical pseudo code of this NGA: While niche idea put emphasis on group diversity, it is obvious to see that distant threshold (L) has a determinate influence on the performance of niche algorithm: Large L results in that individuals in the same niche are not so similar that the efficient of global search is reduced; small L results in that individuals, which are out of the same niche, are so similar that algorithm traps in local optimization. The ideal case for niche is that there is just only one individual existing Step1. Initialization: initial genetic group ( ܩ ), population size (N), individuals to memorize (M, M<N), crossover probability (typical value 0.9 ), mutation probability (typical value 0.01), niche length (L), and other aided parameters. Step2. Evolution: for current genetic group ( ܩ௧ଵ ), use one-point crossover operation, one-point mutation operation and roulette wheel selection operation to generate ܩ. Step3. Niche: for the N+M individuals (N in current ܩ, and M in memorizer), if the distance between any two individuals is less than L, the worse individual would get a strong penalty function, which reduce its fitness greatly; sort these individuals by fitness; select the best N individuals as ܩ, memorize the best M individuals. Step4. Loop: if termination (for example, max generation has been reached, or genetic group keeps the same by and large) is satisfied, break, show output and then stop; else, back to Step 2. 978-1-4577-0603-5/11/$26.00'2011 IEEE ICCP2011 Proceedings 505

Upload: huanyang

Post on 21-Mar-2017

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: [IEEE 2011 International Conference on Computational Problem-Solving (ICCP) - Chengdu, China (2011.10.21-2011.10.23)] 2011 International Conference on Computational Problem-Solving

AN IMPROVED NICHE GENETIC ALGORITHM BASED ON SIMULATED ANNEALING: SANGA

HUANYANG ZHENG

Beijing University of Posts and Telecommunications BEIJING, CHINA

[email protected]

Abstract-A simulated annealing based niche genetic algorithm

(SANGA) has been presented to strength the optimization ability of niche genetic algorithm (NGA). The improved idea is to define niche formation using probability condition rather than simply distance condition. Individuals who only have close neighbors are inclined to build up niche; individuals who only have far neighbors are likely to depart from niche. The feasibility and validity of the proposed method is proved by the contrast between current NGA based on penalty, NGA based on fitness sharing, NGA based on deterministic crowding and SANGA in some simulation experiments and applications of 0-1 knapsack problem.

Keywords-niche genetic algorithm, simulated annealing based niche, adaptive mutation, 0-1 knapsack problem

I. INTRODUCTION

To overcome global optimization problem, genetic algorithm (GA), which simulates biological evolution in the nature, was proposed. This method has been successfully applied in a wide continuum of areas such as planning, design, control, and then many researchers put forward its improved strategy. With the consideration to maintain the group diversity, niche genetic algorithm (NGA) born as the times require. NGA effectively avoids premature convergence and thus obtains better optimization capability. The most famous niche technique includes crowding [1] and fitness sharing [1]. Current popular NGA [2] is based on penalty function: If two individuals are similar and so make up niche, the worse one of them would get greatly punished. However, current NGA need to set a threshold to judge whether niche forms or not, while how to set this parameter does not have a certain criteria, leading to the descending efficiency. And thus it remains to be further studied and improved.

Simulated annealing (SA) is another global optimization method, which originate from the simulation of solid annealing [3]. Its core idea is to judge whether the configuration accepts random moves or not by using Boltzmann factor: The worse the moves are, the less probability they have to be accepted. This is a classical thought in solving optimization problems.

By combining Boltzmann factor in SA and current niche idea in NGA, a novel definition of niche and its supporting strategies is proposed in this article. Alien from previous niche, the new idea uses probability condition, instead of direct distance condition, to determine whether niche would form or

not. Simulations and its application in 0-1 knapsack problem prove the superior of this method.

II. PRINCIPLES OF SANGA

A. Current NGA and its potential problems The difference between NGA and GA is that NGA have a

niche part: After the process of crossover, mutation, and selection, current genetic group may have some similar individuals, leading to the birth of super individuals and group simplification; and then niche algorithm restricts these individuals, keeping group diversity. For current NGA, the distance between two individuals ( , Hamming distance and Euclidean distance are both well) is a measurement for judge whether a niche exists: When this distance is less than a previously assigned threshold (

), niche forms and then the worse individual get punished. The following is a typical pseudo code of this NGA:

While niche idea put emphasis on group diversity, it is obvious to see that distant threshold (L) has a determinate influence on the performance of niche algorithm: Large L results in that individuals in the same niche are not so similar that the efficient of global search is reduced; small L results in that individuals, which are out of the same niche, are so similar that algorithm traps in local optimization. The ideal case for niche is that there is just only one individual existing

Step1. Initialization: initial genetic group ( ), population size (N), individuals to memorize (M, M<N), crossover probability (typical value 0.9 ), mutation probability (typical value 0.01), niche length (L), and other aided parameters.

Step2. Evolution: for current genetic group ( ), use one-point crossover operation, one-point mutation operation and roulette wheel selection operation to generate .

Step3. Niche: for the N+M individuals (N in current , and M in memorizer), if the distance between any two individuals is less than L, the worse individual would get a strong penalty function, which reduce its fitness greatly; sort these individuals by fitness; select the best N individuals as , memorize the best M individuals.

Step4. Loop: if termination (for example, max generation has been reached, or genetic group keeps the same by and large) is satisfied, break, show output and then stop; else, back to Step 2.

978-1-4577-0603-5/11/$26.00©2011 IEEE ICCP2011 Proceedings505

Page 2: [IEEE 2011 International Conference on Computational Problem-Solving (ICCP) - Chengdu, China (2011.10.21-2011.10.23)] 2011 International Conference on Computational Problem-Solving

in every local peak. From this point of view, a niche may form even if two individuals are far from each other, as the right part showed in Fig. 1; a niche may not form even if two individuals are near, as the left part showed in figure 1. These conditions show simply using distance to decide niche formation is unreasonable and unconvincing.

To avoid setting L, some methods have been put forward, such as self-adaption and so on. However, these strategies may be complex in some way, bringing extra time consuming. As for this circumstance, following put forward a new niche method.

B. The improved niche based on simulated annealing In view of SA, all changes in configuration are available for

optimization, and the difference is their probability: A better move is sure to be accepted; a worse move has an acceptance probability, which is nonlinear inversely proportional to how worse it is. In the improved niche, it is similar to judge niche formation as whether moves are accepted in simulated annealing.

For common function, this article models that a niche is highly possible when two individuals are similar, while niche formation is a small probability event when they are not similar. For the individual X , a probability ( ), which is nonlinear inversely proportional to the distance between this individual and its nearest neighbor, is used to decide whether this individual belongs to a niche and is to be punished. While Boltzmann factor ( / ) is right for embodying this change in probability, it is revised and then utilized. Assuming represents the distance between individual and its nearest neighbor (Hamming distance and Euclidean distance are both well), then the probability whether belongs to a niche is firstly considered as :

However, this setting turns to be poor when are approximately equal, leading to the

decreasing difference between individuals. To reflect relativity between individuals, the minimum value in is taken as the reference value. And so is finally revised as:

As for punishing method, it is the same as what it is in

current NGA: Diminish the fitness of individuals to a very small value, resulting in natural selection.

This setting means the nearest two individual are sure to be punished (they make up niche and the probability for being punished is 100%), completely eradicating identical individuals to keep group diversity. Compared to current NGA, all individuals in SANGA are likely to be punished, other than using simply distance condition to judge so.

At the same time, it is important to note that this method just bring just a little extra computational time consuming than previous niche idea, and its time complexity remains to be

(assuming N to be the group population size), due to the computation of distance between individuals. The strategy is not too complex to use.

C. Adaptive mutation SANGA uses adaptive mutation to improve the

optimization performance further. While niche based on simulated annealing may keep some similar individual and memorizer has already save some fine individuals, leading to the decreasing group diversity, greatly increased mutation probability is an obvious method to resist this condition. To make SANGA as a whole is toward optimization, eliminating unordered evolution, the mutation should be adaptive: The better the individual is, the less probability it has to mutation. To sum up, mutation probability is finally set as: . 21 2

In the formula above, is the population size of the group.

And is the usual mutation probability in GA and NGA (typical value 0.01). Letter means that the fitness of the given individual ranks ith in the total group (assuming that the individuals in population are ordered from low fitness to high fitness), while is its mutation probability in SANGA. The half worse group are forced to mutation, and the half better group are more inclined to mutation than before. By and large, this setting perfectly takes care of both group diversity and ordered evolution.

D. The process of SANGA SANGA differs from current NGA in only two aspects:

Niche (in the view of input and output, they are alike but for that individuals get different treatments) and mutation (SANGA use adaptive mutation). It is recommended that SANGA use one-point crossover and one-point mutation as what they are in current NGA. And in the niche algorithm is recommended to use arithmetic mean value. Generally

Figure 1. Two circumstances in optimization problem

Individuals

506

Page 3: [IEEE 2011 International Conference on Computational Problem-Solving (ICCP) - Chengdu, China (2011.10.21-2011.10.23)] 2011 International Conference on Computational Problem-Solving

speaking, the pseudo code of SANGA is described as the follows:

III. SIMULATION

A. Overview In this part, four algorithms are tested in two optimization

problems to check their global optimization capability. Algorithm 1 is current NGA based on penalty function; Algorithm 2 is NGA based on fitness sharing, the FSNGA; Algorithm 3 is NGA based on deterministic crowding [4], the DCNGA; Algorithm 4 is the improved SANGA. To eliminate the randomness of these algorithms, the outcome is an average of 100 results. And the GA parts in them are the same, including: Population size ( 100); initial genetic group, relative fitness setting ( | | ), one-point cross over ( 0.9), one-point mutation (0.01 ) and roulette wheel selection. Especially, the niche distance (Euclidean distance) in NGA and FSNGA is set as 0.2 , crowding factor in DCNGA is set as CF=3.

In addition, entropy diversity are used to measure the diversity in genetic programming [5], and it is defined as:

While a partition p is assumed as the probability of each

different fitness value, it is easy to see entropy diversity represents the information included in the genetic groups: Higher value means there are more unique individuals existing, and lower value means there are more identical individuals existing. Therefore, maximum value of entropy diversity for a group which has 100 individuals (N=100) would be 2.

B. Schaffer function [6] 0.5 0.51 0.0001 10 , 10 : 0, , 0,0 Above are the definition and optimization of Schaffer

function and Fig. 2 shows the performance of four algorithms in it. SANGA has the best convergence speed, and in the view

Figure 2. Four algorithms in Schaffer function

Figure 3. Four algorithms in Bohachevsky function

of entropy diversity, SANGA performs well.

C. Bohachevsky function [7] 2 0.3 3 0.4 4 0.7 100 , 100 : 0, , 0,0 Above are the definition and optimization of Bohachevsky

function, and the following Fig. 3 shows the performance of four algorithms in it. SANGA has the best optimization ability (better outcome), and the entropy diversity of SANGA remains high.

Simulations prove that SANGA performs better than current NGA, FSNGA and DCNGA, showing better convergence speed and optimization ability. In view of group diversity, SANGA is likely to remain the highest (every individual is unique). While SANGA is not designed for some special problems, it can be generally used in many fields, and following is an example, its application in 0-1 knapsack problem.

IV. APPLICATION

Step1. Initialization: initial genetic group ( ), population size ( ), individuals to memorize ( ), crossover probability (typical value 0.9), basal mutation probability (typical value 0.01), and other aided parameters.

Step2. Evolution: for current , use crossover operation, mutation operation (for the ith individuals, . / ) and selection operation to generate .

Step3. Niche: for the individuals, compute their distance between their nearest neighbors, calculate / to decide whether they are punished or not; then sort these individuals by fitness; select the better individuals as , memorize the better individuals.

Step4. Loop: if termination is satisfied, break, show output and then stop; else, back to Step 2.

507

Page 4: [IEEE 2011 International Conference on Computational Problem-Solving (ICCP) - Chengdu, China (2011.10.21-2011.10.23)] 2011 International Conference on Computational Problem-Solving

A. 0-1 knapsack problem 0-1 knapsack problem [8] is well-known as a NP-hard

problem, which is produced in real application problem such as project selection, portfolio, resource allocation, cargo loading and so on. As famous optimization algorithm, NGA is applied in it to get satisfied outcome. How to improve the performance of NGA is under study all the time.

B. mathematical model 0-1 knapsack problem aims at fill a knapsack, which has

fixed limited capacity , with several items, while each item has a weight and profit , to maximize the total profit. Assuming there are n items in total and (bool value) means whether the ith item is selected, its mathematical model can be set as:

. .

C. Genetic coding For 0-1 knapsack problem, its input parameters are series of

bool variables other than several continuous variables. To adapt this feature, the process of genetic coding is changed (the ith gene chip directly represents whether the ith item is select or not. For example, individual 1001110 means the 1th, 4th, 5th and 6th item are put into the knapsack, while the 2th, 3th and 7th item are not. That is to say, an individual directly represents ). Death penalty is used to discern individuals which don’t satisfy capacity restriction. Other things are alike what have been done in the simulation part. Especially, the niche length (Hamming distance) in NGA and FSNGA is set as 1/10 of the total item numbers.

D. Experiments Two experiments are taken to test SANGA and NGA, the

data and outcome comes from [9]. Experiment 1, 10 items, C=269,

W={95,4,60,32,23,72,80,62,65,46}, V={55,10,47,5,4,50,8,61,85,87}. : 295

Fig. 4 shows that SANGA quickly converges at the optimization in just about 6 to 8 generation, while NGA, FSNGA and DCNGA keep varying in less than 20 generation. It can be also seen that SANGA steadily gives out best solutions.

Experiment 2, 20 items, C =878, W=

{92,4,43,83,84,68,92,82,6,44,32,18,56,83,25,96,70,48,14,5}, V=

{44,46,90,72,91,40,75,35,8,54,78,40,77,15,61,17,75,29,75,}. : 1024 In Fig. 5, the process is alike what it is in experiment 1. This

means SANGA is strongly and swiftly adaptable to the changes of items. SANGA exhibit its superior in this

Figure 4. Four algorithms in 0-1 knapsack problem (10 items)

Figure 5. Four algorithms in 0-1 knapsack problem (20 items)

application. As for SANGA keeps effective in both simulations and application experiments, it can be seen SANGA has great adaptability to the variety of optimization problems.

V. DISCUSSION AND CONCLUSION

This paper put forward a novel niche idea: Niche based on simulated annealing. The core idea is to assume that any two individuals may make up niche, while its probability is nonlinearly inversely proportional to the distance between these individuals, instead of employing simply distance condition to judge niche formation. In simulations and 0-1 knapsack problem, SANGA indeed shows superior, compared with fitness sharing, deterministic crowding and current niche genetic algorithm: Better convergence speed and optimization ability, only a little extra time consuming. As a novel improved method, SANGA can be popularized in a wide field of optimization problems.

REFERENCES [1] B. L. MILLER AND M. J. SHAW, "GENETIC ALGORITHMS WITH DYNAMIC

NICHE SHARING FOR MULTIMODAL FUNCTION OPTIMIZATION," IN

508

Page 5: [IEEE 2011 International Conference on Computational Problem-Solving (ICCP) - Chengdu, China (2011.10.21-2011.10.23)] 2011 International Conference on Computational Problem-Solving

EVOLUTIONARY COMPUTATION, 1996., PROCEEDINGS OF IEEE INTERNATIONAL CONFERENCE ON, 1996, PP. 786-791.

[2] M. HUANG, N. LIU, AND X. LIANG, "AN IMPROVED NICHE GENETIC ALGORITHM," IN INTELLIGENT COMPUTING AND INTELLIGENT SYSTEMS, 2009. ICIS 2009. IEEE INTERNATIONAL CONFERENCE ON, 2009, PP. 291-293.

[3] R. A. RUTENBAR, "SIMULATED ANNEALING ALGORITHMS: AN OVERVIEW," CIRCUITS AND DEVICES MAGAZINE, IEEE, VOL. 5, PP. 19-26, 1989.

[4] Y. BO, "DETERMINISTIC CROWDING, RECOMBINATION AND SELF-SIMILARITY," IN EVOLUTIONARY COMPUTATION, 2002. CEC '02. PROCEEDINGS OF THE 2002 CONGRESS ON, 2002, PP. 1516-1521.

[5] E. K. BURKE, S. GUSTAFSON, AND G. KENDALL, "DIVERSITY IN GENETIC PROGRAMMING: AN ANALYSIS OF MEASURES AND CORRELATION WITH FITNESS," EVOLUTIONARY COMPUTATION, IEEE TRANSACTIONS ON, VOL. 8, PP. 47-62, 2004.

[6] Q. XIAOHONG AND L. JUN, "A NOVEL ADAPTIVE PSO ALGORITHM ON SCHAFFER'S F6 FUNCTION," IN HYBRID INTELLIGENT SYSTEMS, 2009. HIS '09. NINTH INTERNATIONAL CONFERENCE ON, 2009, PP. 94-98.

[7] L. MENGWEI, L. XIA, L. TAO, L. DAN, AND L. ZHENG, "A GENE EXPRESSION PROGRAMMING ALGORITHM FOR MULTIOBJECTIVE SITE-SEARCH PROBLEM," IN NATURAL COMPUTATION (ICNC), 2010 SIXTH INTERNATIONAL CONFERENCE ON, 2010, PP. 14-18.

[8] R. MERKLE AND M. HELLMAN, "HIDING INFORMATION AND SIGNATURES IN TRAPDOOR KNAPSACKS," INFORMATION THEORY, IEEE TRANSACTIONS ON, VOL. 24, PP. 525-530, 1978.

[9] S. YUXIANG, X. HONGWEN, AND Y. WEIMING, "SOLVE ZERO-ONE KNAPSACK PROBLEM BY GREEDY GENETIC ALGORITHM," IN INTELLIGENT SYSTEMS AND APPLICATIONS, 2009. ISA 2009. INTERNATIONAL WORKSHOP ON, 2009, PP. 1-4.

509