-
Notifications
You must be signed in to change notification settings - Fork 0
Pseudorandom Number Generators
Implementations of several well tested PRNGs are included in libcea for use by genetic operators. The PRNGs are implemented as classes derived from the CeaPrng abstract class. This allows them to be used through pointers of type CeaPrng* - delicious polymorphism. User-defined PRNGs should also derive from the CeaPrng base class to make them compatible with the rest of the framework.
Below is a rough outline of the four generators to be included with libcea. Before release the implementations will be thoroughly tested and documented for speed, memory usage and quality.
Linear Congruential Generator (LCG)
CeaPrngLCG
The lowest quality and highest speed generator included with libcea. Not recommended for use in anything but the quickest and dirtiest EAs.
CeaPrngMWC
Improvement on LCG without too much loss of speed. This generator will probably come with the ability to lag the output, producing a complementary MWC (CMWC). CMWCs exhibit better fairness in the MSB and more easily calculated periods, at the expense of slightly slower iterations and higher memory use (proportional to the lag). Supposedly faster and having a longer period than MT19937 without loss of quality.
CeaPrngMT19937
Implementation of the well known Mersenne Twister algorithm. High quality, Good performance and low memory usage (less than CMWC).
CeaPrngISAAC
An implementation of the ISAAC (Indirection, Shift, Accumulate, Add, Count) PRNG. ISAAC is actually cryptographically secure, but is fast enough to be competitive with the other PRNGs given in libcea (which are not cryptographically secure).