For an scientific experiment I need to generate 10 random, fixed-size, subsets of a list. For the experiment to be repeatable I want to initialize 10 different instances of random.Random() with a known seed.
How different do random seeds need to be? seems to suggest that using seeds 1 to 10 might be a bad idea, as the results could be linear dependent.
If it is a bad practice to pick seeds 1 to 10 for this case, what would be a good strategy for selecting seeds in a repeatable manner?
Clarification: it is important that always the same seeds are used when the program is run (with a specific dataset)! In the end my program must be deterministic.
Using random.org, I generated 10 random numbers from 2**0 to 2**28
, giving as seeds:
187372311
204110176
129995678
6155814
22612812
61168821
21228945
146764631
94412880
117623077
Using a linear sequence of seeds can be problematic as noted in the comments. The numbers from random.org:
[...] come from atmospheric noise, which for many purposes is better than the pseudo-random number algorithms typically used in computer programs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With