Assuming I am generating 10,000 random numbers using random.randrange
, would changing the seed part way through the generation loop have any meaningful difference on the distribution of values generated compared to using the same seed for all 10,000 random numbers?
import random
epoch = int(0)
while True:
if epoch%100 == 0: #every 100 epochs, generate a new seed
random.seed()
random.randrange(1,1000,1)
epoch += 1
My initial thought is that it wouldn't because even though we know python random is deterministic, each successive run of random.randrange(1,1000,1)
would still have equal weighting to be any of the 1000 possible values each epoch. Thoughts?
Aucun commentaire:
Enregistrer un commentaire