Study on the Effects of Pseudorandom Generation Quality on the ...

Report 3 Downloads 124 Views
Study on the Effects of Pseudorandom Generation Quality on the Performance of Differential Evolution ¨ am¨o, and Matthieu Weber Ville Tirronen, Sami Ayr¨ University of Jyv¨ askyl¨ a, Mattilanniemi 2, 40100 Jyv¨ askyl¨ a, Finland {ville.tirronen,sami.ayramo,matthieu.weber}@jyu.fi

Abstract. Experiences in the field of Monte Carlo methods indicate that the quality of a random number generator is exceedingly significant for obtaining good results. This result has not been demonstrated in the field of evolutionary optimization, and many practitioners of the field assume that the choice of the generator is superfluous and fail to document this aspect of their algorithm. In this paper, we demonstrate empirically that the requirement of high quality generator does not hold in the case of Differential Evolution. Keywords: Differential Evolution, Pseudorandom number generation, Optimization.

1

Introduction

Most publications that detail a new evolutionary algorithm include the following sentence: “The random number generator rand(0,1) returns a uniformly distributed value in the range [0, 1).” In this work we try to look deeper into this mysterious rand(0,1) and the pseudorandom number generators (hereafter abbreviated as PRNGs) producing these values. It is widely known that Monte Carlo simulations require high quality random numbers. In [3], for instance, it was found that otherwise well-behaving generators fail in Monte Carlo studies. The besides the obvious algorithmic qualities, there are important differences between the PRNGs, such as computational cost, ease of use in parallel computations ([6]), and different programming strategies that can be used. These are important factors in building embedded systems and applying high performance computing systems, such as computational clusters or GPU processing, which results in a need to know if their empirical performance is stable. The issue of random number quality is largely ignored in the practical work of evolutionary algorithm design and testing, often by using the most elaborate algorithm available. However, studies done with Genetic Algorithms (GA) do ˇ A. Dobnikar, U. Lotriˇ c, and B. Ster (Eds.): ICANNGA 2011, Part I, LNCS 6593, pp. 361–370, 2011. c Springer-Verlag Berlin Heidelberg 2011 

362

¨ am¨ V. Tirronen, S. Ayr¨ o, and M. Weber

not show correlation between high quality of the PRNG and high quality optimization results. In the article [15], Meysenburg and Foster demonstrate that driving standard GA with twelve different PRNGs have no significant statistical effect on the performance of GA on many common test functions. In the follow up research [16] a much more sophisticated testing took place, but instead of finding positive correlation between respective qualities of PRNG and GA, the study uncovered a fact that in some cases a very poor PRNG was achieving better results than more sophisticated ones. Similar conclusion has also been reached in [2], where the effect of PRNGs to different components of GA is studied. The study concludes that, though there is no correlation between quality of PRNG and GA runs, the initial sampling is most affected by different PRNGs. In this work, we perform a similar study by driving a more modern optimization method, Differential Evolution[18] (DE) by various PRNGs in an attempt to confirm the previous study in context of different methods and real-valued optimization. In this paper we present evidence that strongly indicates that, counterintuitively, most PRNGs perform equally in optimization. This is done by empirically evaluating different pseudo-random number generators (PRNGs) in the context of the Differential Evolution. The result is an important discovery, since it is consistent with the assumption on which the majority of evolutionary optimization papers are based. More precisely, we study whether – the generator quality affects the speed of evolution, (no) – the generator quality affects the quality of final solution, (no) – the use of inferior generators can cause higher incidence of stagnation or premature convergence. (no) – computation can be saved by using a simpler generator. (yes, about 15%).

2

Pseudorandom Number Generation in Evolutionary Methods

Today, the most used random number generators seem to be either simple generators like Linear Congruential Generators (LCG), shift-register generators, or complex generators, such as the Mersenne twister. Requirements for a proper PRNG include properties like uniformity of the random number distribution, independence of subsequences, the length of the period, repeatability, portability, disjointness of subsequences generated for several machines, and efficiency [1]. Use of a proper PRNG is considered to be vital for many modern applications such as Monte Carlo simulations and encryption schemes [11], and many standard PRNGs, such as the venerable LCG, are not up to this task. For example, Marsaglia shows that all the linear congruential generators generalize poorly to high-dimensional problems [10]. Moreover, modern computing environments often require generators that have specific properties, such as the ability to run them in parallel, which is not given even for otherwise excellent generators[6]. The tests used for evaluating PRNGs have grown more stringent and show spectacular differences in quality between the generators. The testing procedures

Study on the Effects of Pseudorandom Generation Quality

363

range from simulating some process for which a result is known, such as playing a game of craps in DIEHARD test by G. Marsaglia, to complex spectral and theoretical tests (for a survey, see [8]). The trends like the above cast serious doubt over the field of evolutionary optimization (EO). EO methods are often likened to Monte Carlo simulations. Moreover, the basic testing procedure for the algorithms is also a Monte Carlo simulation. In this light, the choice of the PRNG seems especially relevant.

3

Empirical Framework

Differential evolution is a modern real valued optimization algorithm with characteristic versatility and reliability. DE can be characterized as a population based evolutionary method with a steady state logic. In this paper we use a variant called DE/rand/1/exp that is used as the benchmark case in [9] after substantial tuning efforts. i  iDEi is ai steady  state algorithm updating population of candidate vectors P = i p1 , p2 , p3 . . . pn according to equation (1). First, candidate vectors are derived by applying scaled distance between two random points pib and pic to a third random point pia , and part of the vector resulting from this operation is used to update the indevidual we are seeking to replace:    oj = Crossover pj , pia + F pib − pic . (1) The crossover operator samples a random value from the exponential distribution with parameter λ = Cr and swaps that many consecutive elements from the candidate vector to the original vector starting from an uniformly picked index, wrapping around the end of the vector if necessary. Finally, the original indevidual is replaced if the resulting vector oj is better than original vector pij . The main novelty of DE is in its way of generating the candidate offspring by sampling direction vectors contained in the population depicted as in Figure 1 and formalized in equation (1). This allows the algorithm to employ the shape

Fig. 1. Differential evolution schematic

364

¨ am¨ V. Tirronen, S. Ayr¨ o, and M. Weber

of the population to guide the search over the fitness landscape by exploiting promising exploration directions. To study the effect of PRNGs, we construct, using different PRNGs, several variants of the Differential Evolution algorithm. We consider the six generators in the following list. Implementation in C is given for the first five and omitted, due to length, for Mersenne Twister. Reference implementations for MT are available from the homepage of the original author, M. Matsumoto. 1. RANDU uint32 t RANDU(void) { return (randu x=((65539∗randu x+362437)%2147483648)); } 2. Linear Congruential Generator (LCG)[7] uint32 t cong(void) { return (seed=69069∗seed+362437);} 3. Xorshift (XOR)[12] //x,y,z,w,v are seed values uint32 t xorshift(void) { t=(xˆ(x>>7)); x=y; y=z; z=w; w=v; v=(vˆ(v32); x=t+c; if(x