vpnovice
vpnovice
  • Threads: 1
  • Posts: 1
Joined: Dec 24, 2012
December 24th, 2012 at 9:13:08 AM permalink
This question was intended for the Wiz on the wizardofodds.com site but...... As all random generators will repeat their sequences, when do you typically reseed the generators you use when trying to simulate a large number of random events (tens of thousands to tens of millions) and what means do you use to arrive at the new seed number? I like to write my own simulations but don't know if I'm reseeding too often, too little or using a ridiculous number to reseed by. Being an old COBOL programmer, I use WinBatch scripting which is easy for me to code and depending, I typically reseed every few hundred, thousand or ten thousand random numbers or events (like a hand of Blackjack or Baccarat) using a random number selected between the numbers of 100,000 and 900,000 inclusive. Thanks in advance for any insight.
odiousgambit
odiousgambit
  • Threads: 326
  • Posts: 9579
Joined: Nov 9, 2009
December 24th, 2012 at 10:51:58 AM permalink
I have an interest in this but am hopelessly ignorant of the answer. I occurs to me, though, that anyone who would answer would need to know what RNG you are using. It probably has a known length before it repeats. You say you use Winbatch scripting, does that in intself tell us the RNG?
the next time Dame Fortune toys with your heart, your soul and your wallet, raise your glass and praise her thus: “Thanks for nothing, you cold-hearted, evil, damnable, nefarious, low-life, malicious monster from Hell!”   She is, after all, stone deaf. ... Arnold Snyder
bigfoot66
bigfoot66
  • Threads: 54
  • Posts: 1582
Joined: Feb 5, 2010
December 24th, 2012 at 11:07:41 AM permalink
Isn't there a website that will generate truly random numbers for you?
random.org
Vote for Nobody 2020!
sodawater
sodawater
  • Threads: 64
  • Posts: 3321
Joined: May 14, 2012
December 24th, 2012 at 11:27:05 AM permalink
deleted
Last edited by: sodawater on Oct 1, 2018
Boney526
Boney526
  • Threads: 8
  • Posts: 366
Joined: Sep 25, 2011
December 24th, 2012 at 11:30:35 AM permalink
Yeah, Random.org uses "atmospheric noise" as a means to (according to them) generate truly random numbers rather than Psuedo RNGs.
odiousgambit
odiousgambit
  • Threads: 326
  • Posts: 9579
Joined: Nov 9, 2009
December 24th, 2012 at 12:06:23 PM permalink
Quote: Boney526

Yeah, Random.org uses "atmospheric noise" as a means to (according to them) generate truly random numbers rather than Psuedo RNGs.



No computer generates true random numbers. The white noise allows a frequent reseeding from a random source. Not the same. They should watch their language!
the next time Dame Fortune toys with your heart, your soul and your wallet, raise your glass and praise her thus: “Thanks for nothing, you cold-hearted, evil, damnable, nefarious, low-life, malicious monster from Hell!”   She is, after all, stone deaf. ... Arnold Snyder
Boney526
Boney526
  • Threads: 8
  • Posts: 366
Joined: Sep 25, 2011
December 24th, 2012 at 1:30:17 PM permalink
Quote: odiousgambit

No computer generates true random numbers. The white noise allows a frequent reseeding from a random source. Not the same. They should watch their language!



I didn't go back and read it, that was off the top of my head, so they may have specified it the same way as you.

The effect is probably the closest thing to true randomness we have, if the white noise allows for trillions or more possible frequencies. I know very little about physics and stuff, so of course my voice has no credibility here....
MangoJ
MangoJ
  • Threads: 10
  • Posts: 905
Joined: Mar 12, 2011
December 24th, 2012 at 4:42:44 PM permalink
Tens of thousands (<1e5) are no problem for basic PRNGs (i.e. the rand() from the C llib). The periodicity is about 1e9 or 1e10. Tens of million (<1e8) is also not much of a problem. However then one should consider using a more advanced PRNG like Mersenne Twister (periodicity is about 1e7000 !)

You should never reseed your PRNG unless you have a good reason to (i.e. parallel programming, you want reproduceable results).
The problem is: finding a new seed which is uncorrelated to the previous seeds is as difficult as implementing a new PRNG. So if your seed space is much smaller than the periodicity of the PRNG (i.e. you use time information for reseeding), its much better to not reseed the PRNG.

Edit: Okay, using true physical noise sources as a reseed for a PRNG is a good idea if the noise source is too "slow".
Ardent1
Ardent1
  • Threads: 5
  • Posts: 168
Joined: Dec 19, 2012
December 24th, 2012 at 8:10:08 PM permalink
Quote: odiousgambit

No computer generates true random numbers.



That is correct -- the (Class III) slot machines use psuedo-random generators that are deemed sufficiently random by the gaming regulators. I think this past summer, the Indian casinos were addresing "serial correlation" and "runs test" as part of the non-randomness test for Class II machines. Many of the old Class II were already tested for non-randomness under the Chi-Square tests.

It's hard to discern random numbers (if it's truly random, it could be anything per se), but it is easy to discern non-random numbers.
kubikulann
kubikulann
  • Threads: 27
  • Posts: 905
Joined: Jun 28, 2011
January 7th, 2013 at 7:09:41 AM permalink
Quote: Ardent1

slot machines use psuedo-random generators.

Pseudo.
Reperiet qui quaesiverit
odiousgambit
odiousgambit
  • Threads: 326
  • Posts: 9579
Joined: Nov 9, 2009
January 7th, 2013 at 11:58:19 AM permalink
btw I believe I am correct in saying that the first computers simply had a list of numbers known to be randomly generated, which means the computer didn't make them. 10,000 or so. To re-seed, a different point in the list was the starting point on each seed. In this way a fairly reasonable ability to see random results was possible.

Obviously, this is so simple that anyone could do it. It seems to me, though, that it is instructive for the concept of seeding, for anyone having trouble with imagining what seeding is.

I have to assume that fancier methods are employed today. But using Wincraps, for example, I have nothing to go by to tell me different, so I keep imagining this is all that is going on! It certainly would work.
the next time Dame Fortune toys with your heart, your soul and your wallet, raise your glass and praise her thus: “Thanks for nothing, you cold-hearted, evil, damnable, nefarious, low-life, malicious monster from Hell!”   She is, after all, stone deaf. ... Arnold Snyder
Ardent1
Ardent1
  • Threads: 5
  • Posts: 168
Joined: Dec 19, 2012
January 7th, 2013 at 12:29:25 PM permalink
Quote: kubikulann

Pseudo.



It is considered bad form to correct someone's spelling. If you are going to correct my typos, please don't stop at pseudo -- I also mis-spelled "addressing" since there are two "s" in that word.
  • Jump to: