I am using the boost mt19937 implementation for simulation.
Simulation must be reproducible, and this means conservation and potential reuse of RNG seeds. I use windows crypto api to generate seed values because I need an external source for seeds, and not because of any specific guarantees of randomness. The result of any simulation run will contain a note that includes the RNG seed, so the seed should be short enough . On the other hand, as part of the simulation analysis, I will compare several runs, but to be sure that these runs are actually different, I will need to use different seeds, so the seed should be long enough to avoid accidental collisions .
I determined that 64-bit seeding should be enough; the chance of collision will reach 50% after about 2 ^ 32 mileage - the probability that the average error caused by this is negligible for me. Using only 32-bit seeds is difficult; the probability of collision reaches 50% after 2 ^ 16 runs; and this is too likely for my tastes.
Unfortunately, the accelerated implementation of either seeds with a full state vector that is too long, or one 32-bit unsigned long is not ideal.
How can I sow a generator more than 32 bits, but less than a full state vector? I tried just filling the vector or repeating the seeds to fill the state vector, but even a quick look at the results shows that this leads to poor results.
c ++ boost boost-random
Eamon nerbonne
source share