vendredi 29 avril 2016

Seeding many PRNGs, then having to seed them again, what is a good quality approach?

I have many particles that follow an stochastic process in parallel. For each particle, there is a PRNG associated to it. The simulation must go through many repetitions to get average results. For each repetition, an exclusive PRNG seed should be chosen for each particle before the simulation begins.

For the first time I just get the seed = time(NULL) as seed for particle1. For the rest I just do particle2 = seed + 1, particle3 = seed + 2, etc.. , so all particles end up having a different seed.

At each repetition, the plan is to add an offset to that initial seed obtained from time(NULL), such as seed = seed + all_particles_offset; and then assign a different seed to each particle using the approach described earlier. My question is if this approach will lead to acceptable randomness quality? I am not concerned with security, just the quality of the random numbers running in parallel and the fact that the process is re-seeding from time to time.

By the way, the PRNG used is the PCG.




Aucun commentaire:

Enregistrer un commentaire