Random numbers generator test

Danya

Fledgling Freddie
Joined
Dec 23, 2003
Messages
2,466
Oidche said:
I know.

I meant that if you set up a PRNG, number N and number N+1 will never be the same. Ofcourse this depends on the implementation, but most PRGNs give a pretty homogenous distribution of values.
Why not? If the PRNG is at all reasonable then getting the same number twice in a row is not only valid, but should happen reasonably often. A generator that never emits the same number twice in a row is not even close to random. A homogenous distribution does not imply that you can't have the same number twice running.

Consider if you are generating integers in the range [1,2]. If the generator never emits the same number twice in a row you'd get 1, 2, 1, 2, ... which is clearly not random in the least. Thinks it's a meaningless example? What if you're simulating flipping a coin, or deciding between two alternatives, it happens all the time.
 

Jay76

Fledgling Freddie
Joined
Sep 10, 2004
Messages
4
/Random 100=100 test brought to you by Honza

Testing phase 1 (nonrandomized random), please wait

Result:
Attempts made to get 1M random 100=100 : 101051566
Probability : 0.9896%

Testing phase 2 (randomized random), please wait

Result:
Attempts made to get 1M random 100=100 : 101029764
Probability : 0.9898%

End of test. Press any key to close application.

Specs:
Old athlon 1.336GHz
1024mb ram
 

Alan

Fledgling Freddie
Joined
Aug 3, 2004
Messages
3,972
Honza said:
I can give .pas, but don't think many pple would be able to compile it.
Also, everyone can use his antivirus software to be sure my piece is clear.

Just to add, file is 7824 bytes, if you get any other size, kick it off.


I could write a pascal program that scanned your HDD and registery for passwords then emailed them to a hotmail account.... thats not classed as a virus and wouldnt be detected (until the AV companies wrote a sig for it)

Downloading an EXE from an untrusted source is pretty bad.

A better solution is to ask people within DAOC to
/macro random /random 100

Then turn on logging - whack the button a hell of a lot and email you the log, least that doesnt use 3rd party untrusted apps.
 

Users who are viewing this thread

Top Bottom