4 ms·
What's the easiest pseudo-random sequence one can calculate mentally in order to beat this?
by FartyMcFarter 4y ago
What's the easiest pseudo-random sequence one can calculate mentally in order to beat this?
- 082349872349872 4y agoNo 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/Shannon-Mind-Reading.pdf https://this1that1whatever.com/miscellany/mind-reader/Shanno... )
- lifthrasiir 4y agoIf you have an access to the developer console, it is pretty easy to verify: (async () => { for (let i = 0; i < 64; ++i) for (let j = 0; j < 6; ++j) { (i >> j & 1 ? captureBtnLeftFunc : captureBtnRightFunc)({ preventDefault() {} }); await new Promise(r => requestAnimationFrame(r)); } })() This resulted in 34% correct guess rate after 384 simulated presses.
- camel-cdr 4y agoThis 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_5T_TMJ 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 < 10; ++i) { for (let j = 0; j < 10; ++j) { x = (x / 10) + (x % 10) * 6; (x & 1 ? captureBtnLeftFunc : captureBtnRightFunc)({ preventDefault() {} }); } await new Promise(r => requestAnimationFrame(r)); } })() Edit2: fixed *'s
- defrost 4y agoAhh, 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 https://www.jstatsoft.org/article/view/v005i08 [2] https://en.wikipedia.org/wiki/Ziggurat_algorithm https://en.wikipedia.org/wiki/Ziggurat_algorithm
- silvestrov 4y agoYou need to escape the * in the formula or indent it as code: 42 -> 2*6+4=16 -> 6*6+1=37 -> ...
- variaga 4y agoThere's a deterministic sequence that will beat it every time, which you can calculate as follows. - it assumes your first selection was preceeded by 5 consecutive 'left's - each press, look at the last 5 bits you selected (for your 1st 5 selections, include those 'virtual' 5 lefts at the beginning). If you have not entered that sequence of 5 before, select 'right'. If you have entered that sequence before, pick the opposite of whatever you selected last time as your next press. RRRRRRLRRRLRLRLLRRRRLLRRLRRLRLLLRRRLLLRLRRLLRLRLRRRRRRLRRRLRLRLLRLL...