The random number generator (RNG) is a core component of any evolutionary simulation. It is
used for selection, for cross-over and for mutation. A slow random number generator can be
a bottleneck. Most programming languages provide a mechanism to generate random numbers.
Unfortunately, few of them are ideal. The Java standard library includes two RNGs,
java.util.Random
and java.security.SecureRandom
.
These should be avoided for statistical and performance reasons respectively.
The Watchmaker Framework comes bundled with three high-quality RNGs provided by the Uncommons
Maths project. Of these, the org.uncommons.maths.random.MersenneTwisterRNG
is the most suitable for the majority of evolutionary programs. Alternatively, you can use any
third party RNG that is a sub-class of java.util.Random
.