DISCLAIMER
These publications are for educational purposes only. They
are provided "as is." Neither Klimasauskas Group, nor Advanced Technology
for Developers, nor its contributors and advisors make any claims for the
content, accuracy, correct operation, fitness, or suitability of the material.
Individuals who download articles and software are specifically prohibited
from using code or programs from any of these publications in any way which
could directly or indirectly cause financial or physical loss, harm or damage
to persons or property. The downloading of any of the material on this web
site does not constitute a license to use. Use at your own risk.
If you do download one or more articles. Please let us know
through the feedback
page. Thank you!
Not Knowing Your Random Number Generator Could Be Costly
Casey Klimasauskas, Senior Partner, Klimasauskas Group
Have you played a video game lately? Purchased something on the web?
Played an electronic slot machine? Trained a Neural Network? Used a
Genetic Algorithm for optimization? Run software from Microsoft? Applied
textures to a photograph? Played the stock market? If the answer is
"yes" to any of these questions, you have had a close encounter
with a random number generator (RNG). This article describes the basic
classes of RNGs, how they are tested, and provides some basic insights
into how they work. This article appeared in the May/June 2003 issue
of PC AI Magazine.
Copyright © 2002, PC AI Magazine. All Rights Reserved. Available
by special arrangement with PC AI, for personal use only. Download
a free copy now! (File size: 430KB)
Testing Your Random Number Generator
Casey Klimasauskas, Senior Partner, Klimasauskas Group
Random Number Generators (RNGs) pervade our lives. Some of the areas
include graphic rendering, video games, simulation, stochastic optimization,
and data encryption. Little seen and less noticed, they are often taken
for granted. However, they can have a substantial impact on our lives
and business. This article looks at how they are used, and describes
a basic series of tests that can be used as a baseline for selecting
an RNG for any application. Ultimately, the right RNG for an application
is the one that produces the “best quality” results. A DLL
based on a C++ class for testing random numbers is integrated into Excel
to provide an easy way to test a new generator. DLL, source code, and
example test sheet included in the supplemental materials. Original
publication September 2002. Download
393KB ZIP file now.
Implementing Matsumoto's Mersenne Twister in Visual Basic
Casey Klimasauskas, Senior Partner, Klimasauskas Group
The Makto Matsumoto's Mersenne is one of the higher quality random
number generators available. Building on the original implementation
in C, it has been translated into C++, C#, Java, Fortran, FORTH and
several other languages. This article looks at a native Visual Basic
implementation. The motivation for this was to provide a high quality
random number generator that could be packaged as a module in an Excel
macro without the need to include a DLL. This article includes a complete
functioning Excel add-in which can be called either from Visual Basic
or directly from an Excel worksheet. Download
183KB ZIP file now.
Back to Publication Index |