Random numbers:Lottery

misi

Growing Little Guru
My random number generator has been improved dramatically.
For testing purposes I have created a little program to generate numbers between 1 and 45.

The numbers drawn are influenced:
Which keys are you hitting and how long it takes to hit a key.

Check with your AV before you use it.
(Norton does not let it download.)
 

Attachments

  • lottery.exe
    276 KB · Views: 4
Last edited:

misi

Growing Little Guru
This compiler is killing me.
With the good old MS VS 6 C++ Compiler I just had to choose between Debug and Release and that was all.
With this shiny new 2010 I'm having problems with the options.
It just does not want to compile AND link with Release.
I can run the exe file because the .dll file is on my PC.
 

aye-aye-Chris

Famous Word Swap Guru
Staff member
Runs without error. :happy

Now for numbers, keeping in mind that the generation of random numbers is far too important to be left to chance...

Where I worked (Defence Signals) the programmers had to write a true random number generator program which fit a very complex criteria. The hardware used to do it was, in itself, quite a complex little critter, not just a processor and m/b but a whole 18" cabinet. Each day it had to be manually tested by 8 toggle switches through the whole binary pattern and readouts noted against a output chart.

Have a read here --> http://www.boallen.com/random-numbers.html

All of this to get random numbers between 0 and 1 :rolleyes
 

misi

Growing Little Guru
Please don't say that again when you are helping me! :mad
I'll read all of them!
Thank you a million times.

My generator is generating REAL random numbers such as(dice) 2 1 5 3 2 6 4 4 3 2 1 5
I believe it would not satisfy the testers because the numbers are not equally distributed in the short term.
On the long run:
No. 1: 65500 times
No. 2: 65530 times
No. 3: 65700 times

Just as in real life.
 

aye-aye-Chris

Famous Word Swap Guru
Staff member
Hopefully a bit more random, sorry Misi...

Out of 12 tests, most with a 'pattern' of double-up, this was the worse...

34923-6357.jpg
 

misi

Growing Little Guru
Hopefully a bit more random, sorry Misi...

Out of 12 tests, most with a 'pattern' of double-up, this was the worse...

Thanks Chris,I'll test it and improve it(If I can).

I'm testing the generator with my own program.
It draws 1000*65536 nums between 0-65535.
Then it checks a certain range for the distribution of them.
Repeat.
On the long run the nums should be distributed evenly about 99.5%+.
They are.
What's wrong with the small nums?
I'll see.
 

misi

Growing Little Guru
Thanks Chris,two of them found:

BugsLifeWallpaper800.jpg



Going to remove the exe file. (Don't worry there are only bugs in it, without viruses)
 
Back
Top