Hacker News new | ask | show | jobs
by rohanprabhu 3627 days ago
So, I tried a simple python one-liner:

[os.urandom(1)[0] < 128 for x in xrange(0, 100)]

and typed 'd' for True and 'f' for False in the array, bringing the accuracy of the predictor down to 53%. Theoretically, I'm guessing doing it for large enough numbers should make it exactly 50%.

1 comments

If it doesn't come down to 50% for sufficiently large numbers, you've found a break in your OS's urandom and someone is about to be famous!