mardi 1 novembre 2016

Achieve same random number sequence on different OS with same seed

Is there any way to achieve same random int numbers sequence in different operating system with same seed? I have tried this code:

std::default_random_engine engine(seed);
std::uniform_int_distribution<int> dist(0, N-1);

If I ran this code on one machine multiple times with same seed, sequence of dist(engine) is the same, but on different operating system sequence is different.




Aucun commentaire:

Enregistrer un commentaire