Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Qbasic RND
#11
Quote:Only if you use RANDOMIZE TIMER, which seeds the random function with the internal timer's reading of how many seconds have passed since midnight.


As I said, it seeds it, but then then the timer is never used after that. It just uses the seed given to generate a bunch of numbers that seem random. But for each seed, the list of numbers it will generate are identical.
Reply
#12
Oh, yeah I have experienced that =(.
Reply
#13
Quote:The craziest thing about that function is that they used a number between 0 and 1, causing an extra devide for them, and multiply for you.

To get rid of that, an RND generator would have to be reduced to straightforward operations on the bits themselves, which can then be transferred to INTEGER, LONG, SINGLE, DOUBLE, etc. for a specific RND.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#14
Is there any algorithm that has been invented yet that is truely random? Or is that a mathematical impossibility?
Reply
#15
There is no RND algorithm that can generate *truly* random numbers because a truly random number has no pattern. A pattern is something that can be replicated. An algorithm can be run twice with the same results: it generates a "pattern".
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#16
The best you can get is a very complex pattern I suppose. I think this vulnerability was used to predict the outcome of many of the games in casinos in Los vegas.
Reply
#17
Quote:Is there any algorithm that has been invented yet that is truely random? Or is that a mathematical impossibility?

There were some studies a while back using lavalamps to produce random numbers. Digital cameras were used to take photos of a lavalamp an the data from the resulting image was used to calculate a random number. The researches believe that the numbers are truely random because lavalamps are an unpredictable chaotic source. You can read about the project and even get source code for the generator here: http://www.lavarnd.org
esus saves.... Passes to Moses, shoots, he scores!
Reply
#18
I tried to get Glenn to record some static and generate random numbers from it, but he never did... it's in a thread on this forum somewhere... surely static is about as close to "true randomness" as it can get?
Reply
#19
Yes, but not recorded static.
Reply
#20
True. Perhaps a program that got a tiny, quick sample of static when it had to seed the generator (or make any random number) would be feasable in the future?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)