An improved genetic algorithm with variable population size and a ...

1 downloads 0 Views 332KB Size Report
Nov 5, 2003 - developed by Kennedy and Elberhart who have been inspired by the ..... 303-310,1997. [6] Maurice Clerc and James Kennedy, The particle.
Proceedings of the Second International Conference on Machine Learning and Cybernetics, Wan, 2-5 November 2003

AN IMPROVED GENETIC ALGORITHM WITH’VARIABLEPOPULATIONSIZE AND A PSO-GA BASED HYBRID EVOLUTIONARY ALGORITHM X. H. SHI’, L. M. WAN’, H. P. LEE’, X. W. YANG‘, L. M. WANG’, Y. C. LIANG”’

’ College of Computer Science and Technology, Jilin University, Changchun 130012, P. R. China ’The 8th Research Institute of Air Force, Beijing 100076, P. R. China High Performance Computing, Singapore I 17528, Singapore Department of Applied Mathematics, South.China University of Technology, Guangzhou 5 10640, P. R. China E-MAIL: [email protected] 3 Institute of

Abstract: This paper presents an improved genetic algorithm with variable popnlation-sim (VPGA) inspired by the natural features of the variable size of the population. Based on the VPGA and the particle swarm optimization (F‘SO)algorithms, this paper also proposes a novel hybrid approach called PSOCA based hybrid evolutionary algorithm (F‘GBAEA). Simulationsshow tbat both VPGA and PGBHEA are effective for the optimization problem. Keywords: Genetic algorithm; Particle swarm

optimization; Hybrid

evolutionary algorithm; Optimization 1

Introduction

Genetic algorithms (GAS) are a family of computational models developed by Holland who is inspired by evolution [1,2]. These algorithms encode a potential solution to a specific problem on a simple chromosomelike data structure and apply recombination operators to these structures so as to preserve critical information. GAS are often viewed as function optimizers, although the range of problems to which GAS have been applied is quite broad. The traditional GAS often fix the population size, and the altemation between generations is simple. This paper develops a novel approach determining the population size and the alternation between generations according to the features of the evolution of the populations, called improved genetic algorithm with variable population-size (VPGA). Particle swarm optimization (PSO) is an evolutionq computational model based on swarm intelligence. PSO is developed by Kennedy and Elberhart who have been inspired by the research of the artificial livings [3]. Similar to GAS, PSO is also an optimizer based on population. The system is initialized firstly in a set of randomly generated

potential solutions, and then performs the search for the optimum one iteratively. Whereas the PSO does not possess the crossover and mutation processes used in GAS. It finds the optimum solution by swarms following the best particle. Compared to GAS, the PSO has much more profound intelligent background and could be performed more easily. According to its advantages, the PSO is not only suitable for science research, but also engineering applications. Presently the PSO has attracted broad attention in the fields of evolutionq computing, optimization and many others [4-81. In recent years there have been a lot of reported works focused on the PSO. The PSO has been applied widely in the function optimization, artificial neural networks’ training, pattern recognition, fuuy control and some other fields. Some improved PSO algorithms have been developed. A hybrid PSO algorithm is proposed by adding GAS’ idea in [9]. After a hybrid probability is assigned to each particle, the algorithm selects a certain number of particles into a pool according to the hybrid ‘probabilities at each stage of iteration. The particles in the pool are randomly separated into couples. Each couple reproduces two children by crossover. . n e n the children are used to replace their parents of the previous particles to keep the number of particles unchanged. This paper proposes a novel hybrid approach through crossing over the PSO and GA algorithms, called PSO-GA based hybrid evolutionary algorithm (PGBHEA). The proposed algorithm executes the two systems simultaneously and selects P individuals from each system for exchanging after a designated N iterations. The individual with larger fitness has more opportunities of being selected. Simulations for a series of benchmark test functions show that the proposed PGBHEA method possesses better ability of finding the global optimum compared to the GA and PSO algorithms.

0-7803-786C2/03/$17.0002003 IEEE 1735

,

Proceedings of the Second International Conference on Machine Learning and Cybernetics; Wan, 2-5 November 2003 2

met, and the best chromosome of the last generation is reported as the final solution. The flow chart of the standard genetic algorithm (SGA) is shown in Fig. 1.

Improved GA with.Variable Population-size and Its Application

Standard Genetic Algorithms , . The GAS have been applied successfully to problems in many fields such as optimization design, fuzzy logic control, neural networks, expeh systems, scheduling, and many others [Il-131. For a specific problem, the GA codes a solution as an individual chromosome. It then defines an initial population of those individuals that represent a part of the solution space of the problem. The search space therefore, is defined as the solution space in which each feasible solution is represented by a distinct chromosome. Before the search starts, a set of chromosomes is randomly chosen from the search space to form the initial population. Next, through computations the individuals are selected in a competitive manner, based on their fitness as measured by a specific objective function. The genetic search'operators such as selection, mutation and crossover are then applied one after the other to obtain a new. generation of chromosomes in which the expected quality over all the chromosomes is better than that of the previous generation. This process is repeated until the termination criterion is 2.1.

[Generation of initial population

I

1 / 1 Evaluation of each individual

I O

',

Crossover

Mutation

Final solution Figure.1 Flow chart oESGA

2.2

Improved GA with Variable Population-size

There are two approaches to determine the altemation between generations in sbndard GAS. For the first approach, the new individuals in the reproductive population are all put into the next population to replace the previous population wholly or partly. The other approach is that the better individuals are put into the next population through comparing individuals in the previous and new reproductive populations. In these two approaches the former has the advantage of keeping the variety but with poorer continuity whereas the latter has better continuity but poorer variety. In other words, the former has better global searching ability but slow speed of convergence and the latter converges quickly but is easy to get into the local optimum. In general, it is difficult to balance the variety and continuity. According to the natural features, especially, the population-size-changing rule on human beings, this paper presents a novel improved GA with variable population-size (VF'GA) which obtains a better balance between the variety and continuity. The main idea of the VF'GA is described as follows. Of most feature species, parents are neither dead after their reproduction right away, nor living forever. In fact, the individual is apt to die when it is old. In VPGA each individual is designated a dying probability according to its living generations. Define DIE-PROBABILITY[k] as the dying probability of those individuals living k generations. For example, considering the expected max living generations is 3, we could set the DIE-PROBABILITY [0,1,2,3] to be 0, 0.3, 0.7 and 1 respectively. AAer the performance of the traditional genetic operations, the individual should undergo a dying process. In the dying process, each individual is determined whether to die according to its DIE-PROBABILITY. On the other hand, the size of features' population always increases, until there is a contagious disease or a war breaking out among the population. In general, the disease or the war will reduce the size of the population sharply. In the VF'GA, we reduce the size of the population to the initial sue when it reaches the given limitation, those individuals with higher fitness have more opportunities to survive. The W G A approach is summarized as follows: Generate initial population: sizeofgoplation = POP INITIAL: create randomlv vouulation [sizeGfgopulation], diegrobabilify [sizeif- population] = DIE-~ PROBABILITY roi. Evaluate the indi;idual to obtain the max fitness and .

1736

I

Proceedings of the Second International Conference on Machine Learning and Cybernetics, Wan, 2-5 November 2003 the least fitness of the population: value-max and value-

min. Memorize the best solution and stop if value-max >VALMAX or m u > GAP. Select SELECTION-POP individuals into the reproducing pool randomly according to their fimess. Divide individuals in the reproduction pool into couples randomly. All the couples perform the crossover and mutation operations. If the fitness of one child is larger than value-min, then put it into the population, else determine whether it should be 'put into the population according to the pre-defined probability; sizeofqopulationt+. 6. Perform die process. For each individual, according to its die probability determine whether it will die.If the individual should die then sizeofqopulation-; else if diegrobabilig = DE-PROBABILITY [kl then diejmbabili6y = DIE-PROBABILITY [kc+]. I. Perform the waddisease process: if sizeofqopulation > POP-MAX then select POP-INITIAL individuals randomly into the new population according to their fitness. Go to step 2. The flow chait of the VPGA is shown in Fig 2 The symbols used in VPGA are explained as follows: POP-lNITIA is the initial population size, POP-MAX the max size of the population, SELECTION-POP the number of individuals selected into the reproducing pool in each iteration, sizeofgopulation the size of the current population, DIE-PROBABILITY [k] the pre-defined probability to those individuals lived for A generations, diegmbability the probability of the current individual, VALMAX the designated max fitness to determine whether the algorithm should be stopped, value-max the max fitness of the current population, and value-min the least fitness of the current papulation.

the final classification where the slanting line is the boundary between the two classes. It can be seen that there are only few points which are near the boundary for the wrong classification.

I Generation of initial population I

U Evaiuation of each individual

Termination criterion met?

Selection

Crossover

I

Mutation

I

c

I

Die process

I

Populafion cxploaion?

2.3 Applications of the VPGA To verify the effectiveness of the VPGA, we use the standard GA and the VPGA to train a 3-layer BP network. The network has 2 input-layer nodes, 4 hidden-layer nodes and I output-layer node. The sigmoid function is used in the hidden layer and output layer. The network is used to classify 100 data generated randomly located in [OJ] X [O,l] into two classes. Iff(x,,y = x+y 4then the point (x, y) belongs to the first class, else the second one. Fig. 3 shows the comparison of the training error using statistical results for ten-time running. From Fig. 3 it can be seen that the VPGA is superior to the SGA in both speed of convergence and the accuracy. The trained neural network using the VPGA is applied to test a set of 100 data generated randomly. Fig. 4 shows

1737

--I

WarDkease

I

Final solution

Figure2 Flow chart of VPGA

I I+--

Proceedings of the Second International Conference on Machine Learning and Cybernetics, Wan, 2-5 November 2003 its position into a designated objective function. When the fitness is higher, the corresponding X, is “better”. The ith particle’s “flying” velocity is also a D-dimensional vector, denoted as K = (vjl,vj2 ,...,viD)(i=1,2, ...,m).Denote the best position of the ith particle as Pi = (pjl,pi2,...,pjD),and the best position of the colony as [email protected],...&D), respectively. The PSO algorithm could be performed by the following eqs.: ’id

= ‘id + cirl

(Pid - xid

) + ‘2‘2

( P g d - xgd

)

= Xid + Vid where i=1,2,__., m,, d=1,2,...,D, cI and are leaming rates, rl and r2 are generated randomly in intervals [O, I], vid~ F V , , , , , v J , and v,,,, is a designated value. The termination criterion for the iterations is determined according to whether the max generation or a designated value of the fitness of Pg is reached. Xid

0 01

25

0

1M

75

50

150

125

Time(second)

Figure 3 Comparison of training errors using SGA and VPGA

3.2

Y

0.2

. - ,

o.07 0.0

0.2

,

~

0.1

.

, 0.6

.

,

.

0.8

,

1

.o

-.x

Figure.4 Classification for the two classes. 3

3.1

PSO-GA Based Hybrid Evolutionary Algorithm and Its Application Standard PSO Algorithm

Suppose that the searching space is D-dimensional and m particles form the colony. The ith particle represents a Ddimensional vector X.(i=1,2,..., m). It means that the ith particle locates at X = (xjl, xj2,...AD) (i=1,2, ...,m) in the searching space. The position of each particle is a potential result. We could calculate the particle’s fitness by putting

PSO-GA Based Hybrid Algorithm

GAS and PSO are much similar in their inherent parallel characteristics, whereas experiments show that they have their specific advantages when solving different problems. What we would like to do is to obtain both their excellent features by synthesizing the two algorithms. This paper proposes a novel approach called PSO-GA based hybrid evolutionary algorithm (PGBEHE). The performance of the algorithm is described as follows: Initialize GA and PSO sub-systems respectively. Execute GA and PSO simultaneously. Memorize the best solution as the final solution and stop if the best individual in one of the two sub-systems satisfies the termination criterion. Perform hybrid process if generations could be divided exactly by the designated iterative times N. Select P individuals from both sub-systems randomly according to their fitness and exchange. Go to step 2. The flow chart of the PGBEHE is shown in Fig 5. 3.3

Applications of the Hybrid Algorithm

The proposed PGBEHE is tested using 6 benchmark functions. To examine the efficiency of the algorithm, the comparisons are made with the VF’GA and PSO algorithms. Simulations are performed in C++ with a 1.99GHZ Pentium PC. Six benchmark test functions varying from two to ten dimensions are listed in Tablel. The simulation results are shown in Table 2. When the calculated result for the optimal function satisfies I(F-j)/fl

Suggest Documents