A Novel Genetic Algorithm with Orthogonal ... - Semantic Scholar

Report 0 Downloads 62 Views
A Novel Genetic Algorithm with Orthogonal Prediction for Global Numerical Optimization Jun Zhang*, Jing-hui Zhong, and Xiao-Min Hu Department of Computer Science, SUN Yat-sen University, 510275 Guangzhou, China [email protected]

Abstract. This paper proposes a novel orthogonal predictive local search (OPLS) to enhance the performance of the conventional genetic algorithms. OPLS operation predicts the most promising direction for the individuals to explore their neighborhood. It uses the orthogonal design method to sample orthogonal combinations to make the prediction. The resulting algorithm is termed the orthogonal predictive genetic algorithm (OPGA). OPGA has been tested on eleven numerical optimization functions in comparison with some typical algorithms. The results demonstrate the effectiveness of the proposed algorithm for achieving better solutions with a faster convergence speed. Keywords: Genetic algorithm, orthogonal design method, local search, evolutionary algorithm, numerical optimization.

1 Introduction Genetic algorithms (GAs) [1] are search techniques which simulate the biological evolution in the nature, using genetic operations such as selection, crossover (recombination), and mutation to train the population of individuals (chromosomes or candidate solutions) from generation to generation. Individuals with high fitness values have higher probability to survive in the next generation. As GAs do not require extensive knowledge of the search space, such as functional derivatives, to search for the optimal solution of the problem instances, they have been widely applied in engineering [2][3], scheduling [4][5], network and routing design [6][7], and numerical optimization [8][9], etc. However, the convergence speed of the classical GA (CGA) is slow and the solution quality is undesirable. In order to enhance the performance of GAs, various methods have been proposed. Instead of using the traditional binary encoding, the real encoding method has been widely used in global numerical optimization to obtain solutions with higher precision. Different selection, crossover, and mutation operators have also been proposed. Adding a local search operation to GAs is a straightforward way to introduce local refinement processes into a GA cycle. The Gaussian mutation is a well-known local search operator for choosing a different point in the neighborhood of a solution. Yao and Liu [9] further improved the operator by using the Cauchy mutation to replace the *

Corresponding author.

X. Li et al. (Eds.): SEAL 2008, LNCS 5361, pp. 31–40, 2008. © Springer-Verlag Berlin Heidelberg 2008

32

J. Zhang, J.-h. Zhong, and X.-M. Hu

Gaussian mutation. The basic idea of local search is to explore the neighborhood of solutions for better results. However, most of the existing local search operations are stochastic and lack an effective method to guide the search. This paper proposes a novel orthogonal prediction method in the local search operation of GA. The resulting algorithm is termed the orthogonal predictive genetic algorithm (OPGA). The orthogonal predictive local search (OPLS) is based on the orthogonal design method [10][11] to predict the promising direction for moving the individual. By considering each variable in the numerical optimization problem as a factor, and the movements of the candidate solution as levels, the orthogonal design method selects some orthogonal points in the neighborhood of the individual according to an orthogonal array. Although the number of the orthogonal points is small, these points locate orthogonally with each other, reflecting the optimization condition of the neighborhood. After the orthogonal points are evaluated, the importance of different levels of variables is analyzed. The combination of the most important levels of each variable represents the predicted best direction for the individual to explore further. This paper is different from the previous work in [12], which did not have the prediction step and only used the orthogonal array to find a delegate for representing the surrounding regions. Using the orthogonal design method to predict the potential enhancement for an individual is groundbreaking. First, the orthogonal design method is an effective multifactor experimental method, which finds a high-quality multifactor combination with small effort. Second, the prediction-based local search not only reduces the blindness of the traditional local search, but also provides more chances for the quick approach to the global optimum. Third, the proposed prediction strategy has addressed the common problem that exists in most of the numerical optimization algorithms. It has wide future applications in the other optimization fields. Numerical experiments have been made to evaluate the performance of the proposed algorithm in solving some benchmark unimodal and multimodal numerical functions. The rest of the paper is organized as follows. Section 2 defines the numerical optimization and then briefly introduces the concepts of the orthogonal design method. Section 3 presents the proposed orthogonal predictive genetic algorithm. The numerical experiments are made in Section 4. Finally, Section 5 draws the conclusion.

2 Preliminary This paper proposed a novel genetic algorithm to solve global numerical optimization problems. Here the optimization problem is formally defined. Then a brief introduction to the orthogonal design method is presented. 2.1 Problem Definition The formal definition of the global numerical optimization problem is as follows maximize f (x) (1) subject to l ≤ x ≤ u where x = (x1, x2,…, xn) is the variable vector of the problem, n is the number of variables, l = (l1, l2,…, ln) is the lower boundary vector of the variables, and u = (u1, u2,…, un) is the upper boundary vector of the variables. The maximization problem is to find

A Novel GA with Orthogonal Prediction for Global Numerical Optimization

33

the maximum result in the solution space. If the problem is a minimization one, we can use −f(x) to change it into the equivalent maximization problem. 2.2 Orthogonal Design Method The orthogonal design method [10][11] is one of the most widely used experimental design methods in agricultural experiments, science research, manufacturing industries and quality management, etc. It provides an efficient way to find a good sample for the experiment with multifactors. Each factor in the experiment has some test values which are called levels. Generally, for an experiment with k factors, if each factor has s levels, the total number of combinations is sk. To test the entire sk combinations may be prohibitively infeasible when the evaluation of each combination costs heavily and the value of k or s is large. The orthogonal design method can be used to achieve a high-quality combination with a much smaller number of tests. It uses an orthogonal array to design the experiment. We use OA(N, k, s) to denote an orthogonal array with N rows, k factors, and s levels for each factor. The value N is the number of combinations to be tested in the experiment. The method for generating an orthogonal array is shown in the Appendix. The orthogonal design method is composed of two steps. „ Step 1: Use an orthogonal array to evaluate the orthogonal combinations. Here is an example of using an orthogonal array OA(9, 4, 3), which is illustrated in Table 1. Suppose there are three factors x1, x2, x3 to be tested. According to the first three columns in Table 1, each combination can be presented as a node in Fig. 1. The three dimensional coordinates of the cube stand for the three factors. Each factor has three levels, which are symbolized as ‘F(i)’, ‘S(i)’, ‘B(i)’, where i=1,2,3 are the indexes of the factors. In a full-scale experiment, there are 33=27 combinations to be tested, whereas the orthogonal design method reduces the number of combinations to be only nine. As each edge and each face of the cube have the same number of orthogonal points respectively, these nine points distribute uniformly and orthogonally in the cube. „ Step 2: Generate the orthogonal design combination. Using the first three columns of the orthogonal array in Table 1, the experiment can be implemented as the upper part of Table 2. Each orthogonal combination is evaluated by f, the results are shown in the fifth column of Table 2. For each factor, the sums of evaluation values to each of the three levels are calculated and the level with the largest Table 1. An orthogonal array OA(9, 4, 3) Factor Combination

C1 C2 C3 C4 C5 C6 C7 C8 C9

F(3) B(2) 4

3

1

2

3

4

1 1 1 2 2 2 3 3 3

1 2 3 1 2 3 1 2 3

1 2 3 2 3 1 3 1 2

1 2 3 3 1 2 2 3 1

7

5 x3

S

2

F(1)

B(1) F

1 6

9

(2)

B(3)

8 x1

x2

Fig. 1. The orthogonal illustration according to the first three columns in Table 1. The level 1 is moving backward (B). The level 2 is keeping stationary (S). The level 3 is moving forward (F).

34

J. Zhang, J.-h. Zhong, and X.-M. Hu Table 2. The orthogonal design plan Factor Combination C1 C2 C3 C4 C5 C6 C7 C8 C9 L1 L2 L3 Orthogonal Design Result D

x1

x2

x3

1 1 1 2 2 2 3 3 3

1 2 3 1 2 3 1 2 3

1 2 3 2 3 1 3 1 2

Sums of Evaluations f(1)+f(2)+f(3)=10 f(1)+f(4)+f(7)=7 f(4)+f(5)+f(6)=7.7 f(2)+f(5)+f(8)=6.7 f(7)+f(8)+f(9)=9 f(3)+f(6)+f(9)=13 1

Evaluation Value f(1)=5 f(2)=3 f(3)=2 f(4)=1 f(5)=0.7 f(6)=6 f(7)=1 f(8)=3 f(9)=5

f(1)+f(6)+f(8)=14 f(2)+f(4)+f(9)=9 f(3)+f(5)+f(7)=3.7

3

1

f(x(D))=9

sum is selected to generate a new combination. For example, to x1, the sums of evaluation values of levels 1, 2, and 3 are 10, 7.7, and 9 respectively. The level 1 is chosen because it has the largest sum. The evaluation value of the new combination D=(1, 3, 1) is compared with the nine orthogonal combinations. The combination with the maximum evaluation value is chosen as the final result of the orthogonal experiment. In the above example, the fourth factor in OA(9, 4, 3) is not used. Moreover, if we rotate the variables from x1, x2, x3 to x3, x1, x2, the orthogonal combinations may be different. These nine combinations are still orthogonal with each other in the solution space. Therefore, different columns in the orthogonal table can be chosen in the experiment. Although the best combination in these sampled experiments may not be the best one in the full-scale experiment, it is always a high-quality solution.

3 Orthogonal Predictive Genetic Algorithm The orthogonal design method can be used to predict the most promising direction for GA to explore. In this section, the proposed orthogonal predictive genetic algorithm (OPGA) is presented. We firstly describe the orthogonal predictive local search (OPLS), including the movement prediction and the realization of the moving action. The overall implementation of OPGA is finally presented. 3.1 The Orthogonal Predictive Local Search According to the orthogonal design method, we can regard each variable in the problem as a factor. To search for a better local solution, we attempt to slightly move a selected individual from its original location to see if there is any improvement. To a

A Novel GA with Orthogonal Prediction for Global Numerical Optimization

35

real-coded individual x=(x1,x2,…,xn) in the GA, such a small movement is realized by increasing or decreasing the values of variables. So we set the levels for each variable to be the three movements – moving forward (F), keeping stationary (S), and moving backward (B). The OA(N, k, s) used here must satisfy s = 3 and k ≥ n. Step 1: Randomly choose n columns from an OA(N, k, s), and record the indexes of the columns as qj, j=1,2,…,n. Mind that the columns must not be duplicated. Step 2: According to an orthogonal array OA(N, k, s), the orthogonal points x(c)=( x1( c ) , x 2( c ) ,…, x n(c ) ) (c=1,2,…,N) for the current individual x=(x1, x2, …,

xn) are generated as

where Acq j

⎡ 2( Acq j − 1) ⎤ x (jc ) = x j + ⎢ − 1⎥δ j (2) ⎥⎦ ⎣⎢ s − 1 ∈{1,2,3} stands for the level in row c and column qj of the or-

thogonal array, δ j is the movement length, j=1,2,…,n. If x (cj ) violates the domain [lj, uj], the value of x (cj ) is reset to the nearest boundary value.

Step 3: Evaluate the fitness value of the orthogonal neighboring points x ( c ) (c=1,2,…,N). Step 4: Calculate the sums of fitness value for each level of each factor. Step 5: Select the levels with the largest sums of fitness values to form a new orthogonal combination D. A new point x ( D ) = ( x1( D ) , x 2( D ) ,..., x n( D ) ) is then generated as ⎡ 2( D j − 1) ⎤ − 1⎥δ j x (j D ) = x j + ⎢ ⎣ s −1 ⎦ where D j ∈{1,2,3} , j=1,2,…,n.

(3)

Step 6: Evaluate the fitness value of x(D). Compare its fitness value with the orthogonal point x(c) (c=1,2,…,N). If f(x(D)) is bigger than all f(x(c)) (c=1,2,…,N), go to Step 7. Otherwise, go to Step 8. Step 7: The orthogonal combination D is the predicted promising moving direction. One more xˆ ( D ) is generated as (4) to explore the neighborhood in the direction further. ⎡ 2( D j − 1) ⎤ xˆ (j D ) = x j + ⎢ − 1⎥ (δ j + δ j ⋅ rand j ) (4) ⎣ s −1 ⎦ where randj is a uniform random value in [0,1], j=1,2,…,n. Step 8: The best result in {x(D), x(1),…, x(N), xˆ ( D ) } is recorded as x(E). Step 9: If x(E) is better than the original individual x, use x(E) to replace the value of x and extend the movement length as (5). Otherwise reduce the movement length as (6). δ j ← δ j ve (5) δ j ← δ j vs (6)

36

J. Zhang, J.-h. Zhong, and X.-M. Hu

(a) Step 1 ~ Step 3

(c) Step 7 ~ Step 9 Peak Original individual x

(b) Step 4 ~ Step 6

(d) Another case Step 7 ~ Step 9 Orthogonal predicted individual xˆ(D) Best local individual x(E)

Fig. 2. Illustration of the orthogonal predictive local search (OPLS)

where ve ≥ 1 is the expansion rate of the movement length, 0 < v s ≤ 1 is the shrinking rate of the movement length. Fig. 2 illustrates the procedure of OPLS. Step 1 to Step 3 use the orthogonal array to sample the orthogonal points. Step 4 to Step 6 generate the orthogonal predictive moving direction. Step 7 to Step 9 explore the direction and update the individual and the movement length. Note that the best local individual is the orthogonal predicted individual in Fig. 2 (c). Fig. 2 (d) presents a case when the movement length is too big to find a better point in the direction. 3.2 Implementation of the Proposed OPGA

The genetic algorithm in this paper follows the basic structure of the classical genetic algorithm. The flowchart of the proposed OPGA is shown in Fig. 3. Step 1: Initialize the parameters. Randomly generate m individuals in the solution space. Step 2: Evaluate the individuals with the fitness function. Record the best individual and the corresponding fitness value. Set the generation=1. Step 3: If the termination condition is not met, go to Step 4. Otherwise, the algorithm is terminated. Step 4: Select a new population using a roulette wheel selection method. Step 5: Perform crossover on the individuals with the crossover rate px. Step 6: Perform mutation on the genes of individuals with the mutation rate pm. Step 7: Evaluate the individuals with the fitness function. Step 8: If the best individual generated in the current generation is better than the recorded best-so-far individual, perform OPLS to the best individual and then update the best-so-far individual. Otherwise, perform OPLS to the recorded best-so-far individual and then use the new best-so-far individual to replace the worst individual in the population. Step 9: generation = generation + 1. Go to Step 3.

A Novel GA with Orthogonal Prediction for Global Numerical Optimization

37

Yes

Start

Finished?

End

No

Initialize the parameters

Selection Randomly generate a population with m individuals

Crossover

Evaluate the population

Mutation

Record the best individual as the best-so-far individual

Evaluate the population Elitist and orthogonal predictive local search

generation = 1

generation=generation+1

Fig. 3. Flowchart of the proposed orthogonal predictive genetic algorithm (OPGA) Table 3. A list of the numerical functions (Domain=variable ranges, Minimum=minimal function value) Test Functions 30

Domain

¦ x F2 = ¦ | x | + ∏ |x | F3 = ¦ (¦ x ) F4 = ¦ ( ¬x + 0.5¼) F5 = ¦ − x sin( | x | ) F6 = ¦ [ x − 10 cos( 2πx ) + 10] 1 1 F7 = −20 exp( −0.2 x ) − exp( cos(2πx )) + 20 + exp(1) 30 ¦ 30 ¦ x 1 F8 = ) +1 x − ∏ cos( 4000 ¦ i π F9 = {10 sin (πy ) + ¦ ( y − 1) [1 + sin (πy )] + ( y − 1) } 30 + ¦ u ( x ,10,100,4) F1 =

i =1

2 i

30

30

i

i =1

i =1

30

i

i =1

j =1

30

2

2

i

i =1

j

i

30

i

i =1 30

i

30

i =1

30

i =1

2 i

i

i =1 29

2

i

i =1

30

1

i

i =1

30

i =1

30

2 i

2

2

i +1

30

[-100,100]30

0

[-10,10]30

0

[-100,100]30

0

[-100,100]30

0

[-500,500]30 -12569.5

i

2 i

i =1

Minimum

[-5.12,5.12]30

0

[-100,100]30

0

[-600,600]30

0

[-50,50]30

0

[-50,50]30

0

[-5,5]4

3.075e-4

2

i

yi = 1 + ( xi + 1) / 4 , i = 1,2,...,30

­k ( x − a ) , xi > a i ° u ( xi , a, k , m) = ®0, − a ≤ xi ≤ a °k ( − x − a ) m , x < a i i ¯ m

F10 =

1 {10 sin 2 (3πx1 ) + 10 30

¦ F11 = ¦ +

i =1

11 i =1

¦

29

i =1

( xi − 1) 2 [1 + sin 2 (3πxi +1 )] + ( x30 − 1) 2 [1 + sin 2 ( 2πx30 )]}

u ( xi ,5,100,4)

[ ai −

x1 (bi2 + bi x2 ) 2 ] bi2 + bi x3 + x4

ai = { 0.1957 0.1947 0.1735 0.16 0.0844 0.0627 0.0456 0.0342 0.0323 0.0235 0.0246}

bi−1 = { 0.25

0.5

1

2

4

6

8

10

12

14

16

}

38

J. Zhang, J.-h. Zhong, and X.-M. Hu

4 Numerical Experiments Eleven numerical functions are tested in this paper, including unimodal and multimodal functions. Table 3 lists the definitions of the functions. OPGA is compared with CGA and the fast evolutionary programming (FEP) [9]. The population size used in OPGA and CGA is m=20. The crossover rate is px=0.7, whereas the mutation rate is pm=0.07. The initial movement length δ j is (u j − l j ) / m / 2 , j=1,2,…,n. The shrinking rate of the movement length is vs =0.5 for F1, F2, F3, F4, F6, F8, and F9, whereas vs=0.9 for F5, F7, F10, and F11. We have ve= 1/vs in the experiment. The parameters settings of FEP can be referred to [9]. Table 4. Means and standard deviations. All results were averaged over 100 runs. F

maxE

1 2 3 4 5 6 7 8 9 10 11

150000 150000 500000 100000 500000 500000 500000 500000 500000 500000 400000

CGA FEP OPGA mean St. dev mean St. dev mean St. dev 3.88E-01 1.62E-01 4.39E-04 6.01E-05 1.48E-288 0 2.89E-01 5.17E-02 7.84E-02 5.30E-03 0 0 4.00E+02 1.58E+02 9.56E-03 8.49E-03 3.93E-57 1.78E-56 0 0 0 0 0 0 -12569.38 4.31E-02 -11033.14 3.58E+02 -12569.49 9.16E-12 1.83E-02 8.44E-03 3.57E-02 5.06E-03 0 0 5.41E-02 1.13E-02 9.19E-03 5.55E-04 5.35E-15 1.69E-15 9.07E-02 3.30E-02 1.79E-02 2.30E-02 0 0 4.94E-04 5.69E-04 1.42E-06 1.66E-07 1.57E-32 2.75E-47 3.89E-03 4.09E-03 2.04E-05 2.92E-06 1.35E-32 2.48E-47 6.76E-04 1.57E-04 5.27E-04 3.93E-04 4.04E-04 3.04E-04

Function Value

Function Value

10

10

8

F1

6

CGA FEP OPGA

F2

6

CGA FEP OPGA

CGA FEP OPGA

F3

20000 15000

6

4

10000

4

2

2

5000

2

0

0

0

-8000

0

-9000

70000

F5

-10000

140000 CGA FEP OPGA

20

0

70000

16

F6

12

140000 CGA FEP OPGA

10

200000

8

400000

10 0

CGA FEP OPGA

F7

6

8

4

4

-12000

4

2

2

0

0

10 8

F9

6

400000 CGA FEP OPGA

0 10 8 4

2

2

0

0 200000

400000

Function Evaluations

F10

6

4

0

200000

400000 CGA FEP OPGA

40000

F8

6

8

200000

CGA FEP OPGA

0 0

-11000

0

F4

8

4

-13000

Function Value

10

25000

8

80000 CGA FEP OPGA

0

0 0.005

200000

0.004

400000

F11

0.003

0

CGA FEP OPGA

200000

400000

Function Evaluations

0.002 0.001 0.000 0

200000

400000

Function Evaluations

0

200000

400000

Function Evaluations

Fig. 4. Comparison among CGA, FEP, and OPGA on functions F1 to F11. All results were averaged over 100 runs.

A Novel GA with Orthogonal Prediction for Global Numerical Optimization

39

Table 4 tabulates the means and standard deviations of the 100 independent runs to the test functions by CGA, FEP, and OPGA. Using the same maximum function evaluations (maxE) as termination conditions, the proposed OPGA outperforms CGA and FEP by achieving much better solutions and smaller standard deviations. Fig. 4 shows the convergence curves among CGA, FEP, and OPGA on the functions. The results present that OPGA can always find better results quicker than CGA and FEP.

5 Conclusion This paper proposed a novel orthogonal predictive genetic algorithm (OPGA), which utilizes the orthogonal design method to predict the most promising direction for the best individual in GA to explore better results. The performance of the algorithm has been compared with the conventional genetic algorithm (CGA) and the fast evolutionary programming (FEP). The proposed OPGA outperforms the above two algorithms in both accuracy and convergence speed. Acknowledgments. This work was supported by the National Science Foundation (NSF) of China (60573066) and the NSF of Guangdong (5003346), and SRF for ROCS, SEM, China.

References 1. Holland, J.H.: Adaptation in Natural and Artificial Systems, 2nd edn. MIT Press, Cambridge (1992) 2. Wang, W.Y., Li, Y.H.: Evolutionary Learning of BMF Fuzzy-neural Networks Using a Reduced-form Genetic Algorithm. IEEE Trans. Syst. Man Cybern. Part B Cybern. 33, 966–976 (2003) 3. Miller, J.A., Potter, W.D., Gandham, R.V., Lapena, C.N.: An Evaluation of Local Improvement Operators for Genetic Algorithms. IEEE Trans. Syst. Man Cybern. 23, 1340– 1351 (1993) 4. Ishibuchi, H., Yoshida, T., Murata, T.: Balance Between Genetic Search and Local Search in Memetic Algorithms for Multiobjective Permutation Flowshop Scheduling. IEEE Trans. Evol. Comput. 7, 204–223 (2003) 5. Burke, E.K., Smith, A.J.: Hybrid Evolutionary Techniques for the Maintenance Scheduling Problem. IEEE Trans. Power Syst. 15, 122–128 (2000) 6. Denqiz, B., Altiparmak, F., Smith, A.E.: Local Search Genetic Algorithm for Optimal Design of Reliable Networks. IEEE Trans. Evol. Comput. 1, 179–188 (1997) 7. Baraglia, R., Hidalgo, J.I., Perego, R.: A Hybrid Heuristic for the Traveling Salesman Problem. IEEE Trans. Evol. Comput. 5, 613–622 (2001) 8. Tu, Z.G., Lu, Y.: A Robust Stochastic Genetic Algorithm (StGA) for Global Numerical Optimization. IEEE Trans. Evol. Comput. 8, 456–470 (2004) 9. Yao, X., Liu, Y.: Evolutionary Programming Made Faster. IEEE Trans. Evol. Comput. 3, 82–102 (1999) 10. Hedayat, A.S., Sloane, N.J.A., Stufken, J.: Orthogonal Arrays: Theory and Applications. Springer, New York (1999)

40

J. Zhang, J.-h. Zhong, and X.-M. Hu

11. Montgomery, D.C.: Design and Analysis of Experiments, 5th edn. Wiley, New York (2000) 12. Hu, X.M., Zhang, J., Zhong, J.H.: An Enhanced Genetic Algorithm with Orthogonal Design. In: 2006 IEEE Congress on Evolutionary Computation, pp. 3174–3181. IEEE Press, New York (2006)

Appendix: Construction of the Orthogonal Array [10][11] Step 1: Given an odd number s. Determine the smallest integer value of J satisfying sJ −1 (A.1) k= ≥n s −1 Step 2: We have N = sJ. Construct the basic columns as follows ⎢ i −1 ⎥ Aij = ⎢ J − p ⎥ mod s (A.2) ⎣s ⎦ s p −1 − 1 + 1 , and p = 1,2,…, J. s −1 Step 3: Construct the non-basic columns as follows v v v A j + ( s −1)(t −1) + u = (uAt + A j ) mod s

where i = 1,2,..., N , j =

(A.3)

p −1

−1 + 1 , p = 2,3,…, J, t = 1,2,..., j − 1 , u = 1,2,..., s − 1 . s −1 Step 4: Increase Aij by one where j =

s

Aij ← Aij + 1

where i = 1,2,…, N, j = 1,2,…, k.

(A.4)