0
0
I'm using Excel and VBA to simulate a large number of dice rolls.
The problem I'm having is after a certain period of time, the rolls start repeating, and I start getting results that are anything but random.
I'm using INT = RND() * 6 +.5 for each of the dice.
Is there any way of making it a couple orders of magnitude more random?
I do use Randomize before hand to prevent starting the same way every time.
1What research have you done so far? How have you established that the sequence is being repeated? What code are you using? – James Snell – 2013-11-14T21:12:07.037
Humans don't have a good feel for true randomness. I wrote a script to select and play a random ep of startrek, but noticed it replaying a few eps too often. I decided to test it by generating a batch of 200 eps, and analyzed the stats. my algorithm was actually 'better' than random because it selected 77% of the possible eps, and never repeated any one more than twice. a truly random algorithm would cover about 67% of the range. in the end I determined that I didn't actually want random, and added a history/blacklisting feature to prevent replays. hope that anecdote helps. – Frank Thomas – 2013-11-14T21:33:16.350
How did you determine the output is "not random enough"? Have you done a chi-squared test? I'm just curious. Also, it would help to see your code. – Excellll – 2013-11-14T21:48:04.383
Do you use
– nixda – 2013-11-16T14:57:03.047RandomizeorRandomize Timerlike its explained on SO?