Random function calculation

How does the random function calculation depend on the seed? What If I used seed=1 and now I want different values, does it matter whether I choose seed=2 or seed=300 next?

If you’re not too worried over the quality of randomness, you could just use seed = 2 etc.
If you run it sequentially, one way to be sure is to save the last seed(s) and continue from them. Or you could estimate the number of random calls and do them as warm up. It is really easy to make mistakes when trying to be clever, and I must admit that I’ve certainly come close to making the mistake described there thinking that it looks like a good idea at first sight.

Best regards

Thomas

I meant, is there a difference between choosing seed=2 and seed=300 after seed=1? For example, maybe seed=2 somehow generate numbers that are close to the ones generated when seed=1.

In answering a question, John Cook writes:

So as far as we know, it’s OK for CPU and without looking into it, I would guess that the GPU RNG also qualifies.

Best regards

Thomas

1 Like

Great, thank you! :slight_smile: