Random numbers
Newzed
Posts: 2,503
I have been playing around with the RANDOM command for a few days, trying to come up with a long list of psuedo-random numbers without a major repitition.· I finally came up with a code that will give me 900 random numbers with no major sequential repeats.· There may be repeats of 2, 3 or even 4 numbers within the overall sequence - that is all.· The user enters a seed value to start and when 900 numbers have been generated, the program goes back to start and waits for a new seed.
I have attached the program in case anyone finds themseleves bored and has nothing else to do.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
New Combo LCD Backpack
http://hometown.aol.com/newzed/index.html
I have attached the program in case anyone finds themseleves bored and has nothing else to do.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
New Combo LCD Backpack
http://hometown.aol.com/newzed/index.html
bs2
1K
Comments
This is a really interesting subject and you seem to have worked out quite al lot.
The only big question I have how did you verify the randomness of your routine. Which methods did you use to do the checks and to optimize your routine?
Regards,
Klaus
First, I used Hypertermimal to capture the data to Excel, then I kept graphing consecutive portions of the number list to see if I could see the same pattern.· Each graph looked like radon audio waves.
Then I wrote:
if div = 325 then
debug dec div, "· ", dec result, cr
After I finished changing and rechanging the program, I got to the point where each dec div produced a different dec result.· From this I assumed that there were no major repititions in the numerical sequence.
Would you agree?
Sid
I don't know much about random numbers, I only know that it is very hard to generate really random numbers with a computer device. One of the problems is that after some numbers the sequence repeats in excactly the same form.
It would be interesting to put your sequence into a loudspeaker, it then should sound like 'white noise' all frequencies being present at the same level. It should sound a bit like the sea.
What are you going to do with these (pseudo) random numbers ??
Klaus
What am I going to do with it?· Beats me - I was just bored
Sid