Choosing a seed for Generator (what is a good seed value?)

In the Generator class under the manual_seed function, it says “It is recommended to set a large seed, i.e. a number that has a good balance of 0 and 1 bits. Avoid having many 0 bits in the seed.”

Does anyone have an answer or intuition as to why this is the case? Why does the seed need to be a large number, have a good balance of 0 and 1 bits, and not have many 0 bits?

1 Like

Hi,

I had never thought about your question and I usually run my programs with single digit natural numbers since I wanted to experiments be repeatable.
But after your question I read the following article and got the idea why you need high entropy numbers to reduce predictability of sequence.

GoodPracticeRNG.pdf (ucl.ac.uk)

Following sections seems can represent the topic:

  1. Rule 3: Properly seed your generator
  2. Unbiased Shuffling
  3. Warm up your generator first

Bests