Live data from Hacker News

How random can you be? (2019)

expunctis.com

1–10 of 60 posts

Re: How random can you be? (2019)

#4

What's the easiest pseudo-random sequence one can calculate mentally in order to beat this?

No need for pseudo-random; a 6-bit binary counter ought to do it.

(assuming this has the same Achilles' Heel as Shannon's 3-bit machine: https://this1that1whatever.com/miscellany/mind-reader/Shanno... )

Re: How random can you be? (2019)

#6

What's the easiest pseudo-random sequence one can calculate mentally in order to beat this?

No need for pseudo-random; a 6-bit binary counter ought to do it. (assuming this has the same Achilles' Heel as Shannon's 3-bit machine: https://this1that1whatever.com/miscellany/mind-reader/Shanno... )

If you have an access to the developer console, it is pretty easy to verify:

    (async () => {
        for (let i = 0; i > j & 1 ? captureBtnLeftFunc : captureBtnRightFunc)({ preventDefault() {} });
            await new Promise(r => requestAnimationFrame(r));
        }
    })()
This resulted in 34% correct guess rate after 384 simulated presses.

Re: How random can you be? (2019)

#9

What's the easiest pseudo-random sequence one can calculate mentally in order to beat this?

This one doesn't really "beat" this, but here is a simple PRNG that you can trivially compute using mental arithmetics proposed by George Marsaglia [1]:

1. Select an initial random number (seed) between 1 and 58. (This is accomplished by mentally collecting entropy from the environment, e.g. counting a group of objects you don't knew the count of before)

2. Multiply the least significant digit by 6, add the most significant digit to the result, and use the new result as the next seed/state.

3. The second digit of the state is your generated pseudorandom number.

4. Goto 2.

                         Sequence generated by 42:

    42 -> 2*6+4=16 -> 6*6+1=37 -> ...

    42|16|37|45|34|27|44|28|50|05|03|18|49|58|53|23|20|02|12|13|19|55|35|33|21
     2| 6| 7| 5| 4| 7| 4| 8| 0| 5| 3| 8| 9| 8| 3| 3| 0| 2| 2| 3| 9| 5| 5| 3| 1
[1] "Multiply with carry", George Marsaglia (1994): https://groups.google.com/g/sci.math/c/6BIYd0cafQo/m/Ucipn_5...

Edit: Thanks to lifthrasiir you can try it out your self:

    (async () => {
        let x = 42;
        for (let i = 0; i  requestAnimationFrame(r));
        }
    })()
Edit2: fixed *'s

Re: How random can you be? (2019)

#10

What's the easiest pseudo-random sequence one can calculate mentally in order to beat this?

This one doesn't really "beat" this, but here is a simple PRNG that you can trivially compute using mental arithmetics proposed by George Marsaglia [1]: 1. Select an initial random number (seed) between 1 and 58. (This is accomplished by mentally collecting entropy from the environment, e.g. counting a group of objects you don't knew the count of before) 2. Multiply the least significant digit by 6, add the most sign…

Ahh, George Marsaglia was one of the great OG's of random ..

For any that like such things and haven't yet seen them, his Ziggurat algorithm family for generating target random distributions dates back to the 60's and was written up ~ 2000; the classic is the ZA for a random binomial distribution.

Good approach for the bulk rapid generation of large amounts of distributed random values.

[7] https://www.jstatsoft.org/article/view/v005i08

[2] https://en.wikipedia.org/wiki/Ziggurat_algorithm

Post reply on HN