I wrote a Matlab program whose algorithm is like:
for epoch = 1:1000, rng('shuffle') %seed based on time for generation = 1:100, % solve the puzzle using the random number to shuffle values in the puzzle end end
rng seeds the random number generator based on the current system time. I’m using Matlab’s default random number generator, and the reason I put
rng within the epoch loop, is because I wanted to make sure the puzzle got solved differently each time.
But, one of the conference reviewers wrote a review comment that said:
“One normally seeds a PRNG (pseudo random number generator” once
during initialisation. Changing the seed repeatedly REDUCES the
randomness of results!!!! Move this out of your algorithm. Low
diversity in a PRNG can actually improve results!”
Is this actually true? Would my program have produced better randomness if the seed was initialized like this?
rng('shuffle') %seed based on time for epoch = 1:1000, for generation = 1:100, % solve the puzzle using the random number to shuffle values in the puzzle end end
When I thought through it, I realized he may have meant that changing the random seed within an epoch may result in one or more epochs starting from the same random seed, and that’s why it may reduce the randomness. Is there any other explanation or is the reviewer’s understanding flawed?