Wednesday, January 26, 2005

 

Two pseudo-random number generators for use in GEC

Here are two good and scalable pseudo-random number generators that I use in my GA code, which might be useful for other GEC members as well.
The pLab webpage is a good source for information on different RNGs.

Comments:
SPRNG keeps giving me problems while working with gpm libarary in Linux. One of the strength of SPRNG is the support of parallel platforms. However, if you don't use that parallel feature, I would recommend you to go with MT instead. It's small, neat, and easy to use.
 
I use MT in my code, too. It is tiny and easier to be used in code than SPRNG.
 
I use a much simpler generator but I've never encountered big differences when changing the generator in my code. I must say though that I didn't try enough and there were papers that claimed that random generators can influence the results of genetic and evolutionary algorithms A LOT. Furthermore, parallel code with random numbers is also an issue and that's where SPRNG comes into play.

The only thing I can think of adding is to mention the GNU Scientific Library and Boost C++ Libraries, which both implement a number of interesting random generators (and lot of other stuff, too). Some people I know that work with big MCMC simulations and need good and fast random numbers use these.
 
Actually, this topic brings up an interesting issue. There were papers written on the influence of random number generators on the performance of standard genetic and evolutionary algorithms (e.g. GAs). However, there are now methods that should be much more dependent on random number generators---estimation of distribution algorithms (EDAs). It'd be interesting to see how the performance of advanced EDAs such as the Bayesian optimization algorithm (BOA) or the extended compact GA (ecGA) changes with the choice of the random number generator.
 
A few years ago someone posted a question to a newsgroup or mailing list asking about the influence of RNGs on evolutionary algorithms. I happened to remember some of the work that explored this and hacked a simple test to demonstrate to myself that this was not a terribly important issue. After all, choosing an adequate population size, an encoding that matches the problem, or even fiddling around with other parameters should have a much higher impact on the results than the choice of RNGs.

To my surprise, the choice of RNG made a huge difference. Using a poor RNG can hace either disastrous effects on the search or could, as some had reported, help you find solutions of high quality. Better quality than with an MT or with a TRUE source of randomness!

The problem is that to get the really good solutions with the poor RNG you had to find the "right" seed for the RNG. I rather look into the entrails of goats to divine the future than spend my time finding "good" seeds for poor RNGs.

I published a paper in GECCO-2002 about this, which you can find hereThe bottom line is that you should stop fiddling around with RNGs, choose a GOOD random number generator, such as the MT, initialize it with long random seeds (see random.org for a source of true random numbers to initialize pseudo-RNGs), and write one line in your papers specifying which pseudo-RNG you are using.

As an aside, Fernando Lobo was making some runs with ECGA a few years ago and manage to exhaust the period of one RNG that was floating the lab around that time.
 
Erick, good comment. I agree with that.

Just on a side, I just did some small experiments comparing hBOA with my simple random number generator and hBOA with MT, and it seems to perform just about the same (about 2% difference, 10 runs with optimal pop size). But it's just one simple problem (60-bit 3-deceptive). I'll try to use MT from now on and see what happens.
 
While we are at it, here is a good free book for generating non-uniform random numbers. Besides, a simple pseudorandom number sequence test problem may be in order, too.
 
I was reading your blog and thought i would mention this free blog hosting site.

Free blog hosting using wordpress. The top blogging tols online and many free templates to choose from. Free hosting. Get your free blog code now!

GET FREE BLOG NOW
 
Hello, your blog is informative. I have a linux server related website, please visit and hope that it is helpful to you
 
Want more clicks to your Adsense Ads on your Blog?

Then you have to check out my blog. I have found a FREE and Legitimate way that will increase your earnings.

Come Check us out. How to Boost Your AdSense Revenue
 
I am about to show you a way that you can generate thousands of keyword targeted links back to your web site starting today!
 
I enjoyed reading your blog. There is a lot of useful information about canadian web hosting in it. We offer Turnkey Websites and Reliable Hosting. We also provide a blogging service that will help your site get indexed fast and keep the search engines visiting your site. Click here for more information about canadian web hosting.
Thank you
TWP Admin
 
I love your ftp hosting blog.
I will have to put this in my favorites.
I have a site about ftp hosting
also. I welcome new vistitors.
 
I enjoyed reading your blog. There is a lot of useful information about computer home based business in it. We offer Turnkey Websites and Reliable Hosting. We also provide a blogging service that will help your site get indexed fast and keep the search engines visiting your site. Click here for more information about computer home based business.
Thank you
TWP Admin
 
I enjoyed reading your blog. There is a lot of useful information about linux web hosting in it. We offer Turnkey Websites and Reliable Hosting. We also provide a blogging service that will help your site get indexed fast and keep the search engines visiting your site. Click here for more information about linux web hosting.
Thank you
TWP Admin
 
Hello everyone! ... sorry I'm a newbie, how does this blog thing work? I bought some products from this store: www.eBookLovers.com but too dumb to figure out. Any help would be greatly appreciated!
 
Hey, you have a great blog here! I'm definitely going to bookmark you!

I have a linux web hosting site/blog. It pretty much covers linux web hosting related stuff.

Come and check it out if you get time :-)
 
What a wonderful invention it is, this thing we call the Internet!
 
Hi, thanks for this very informative blog. I'm a fan of making my residual income from home. I'm thankful for every information that would increase my sales...Thanks again! residual profits
 
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?