[1] https://www3.nd.edu/~busiforc/handouts/cryptography/letterfr...
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 < 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 *'sFor 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.
42 -> 2*6+4=16 -> 6*6+1=37 -> ...(assuming this has the same Achilles' Heel as Shannon's 3-bit machine: https://this1that1whatever.com/miscellany/mind-reader/Shanno... )
(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. - 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...```
for(let j=0; j<5; j++){
window.captureBtnLeftFunc({preventDefault: () => {}})
for(let i=0; i<200; i++){
if (window.prediction == window.lastKey) {
window.captureBtnRightFunc({preventDefault: () => {}})
} else {
window.captureBtnLeftFunc({preventDefault: () => {}})
}
}
}```
actually got me a pretty linear upward win line for thousands of simulated clicks
I used http://combos.org/bruijn and pressed left for zero and right for one.
Using rule Grandmama creates close to a perfectly straight line up and to the right when you start from the first 1 in the sequence.
Try: 1001000101010011010000110010110110001110101110011110111111000000
where 1 is right and 0 is left.
> Since it looks to follow whichever pattern already exists, and de bruijn sequences minimize existing patterns, it always beats the game.
I'm pretty sure this isn't true though. A de bruin sequence doesn't guarantee that the order of the n-patterns is random, only that the number of unique n-length patterns is maximized.
Indeed, the algorithm you mention puts n-subsequences with many 0's in the front, and subsequences with many 1's in the back. Sure, every n-length subsequence appears only once, but because the order of the subsequences does follow a predictable pattern, your total sequence is still pretty predictable.
This disparity isn't noticeable when n is small (you chose n=6), so you can comfortably beat the game. But pick a large n and your sequence becomes rather predictable.
Try n=20. In that case, the generated sequence S has length |S|=32,768=2^15. In the first half, there are 9098 0's and 7286 1's. In the second half these numbers are exactly the opposite. Throw this sequence into the game, and you end up with a prediction accuracy of 50%. Not worse than random, but you didn't beat the game either.
Also this sequence seems to work better: 0000001001000101010011010000110010110110001110101110011110111111
That's how random I can be!
And now to 200 with 49%. Feeling not so subtley smug.
And now to 400 with 50%. Admit I'm getting bored now.
Now the question I have to answer, is that because of my professional experience and history, something inherent in my mind, or was it...just random?
edit: just consciously trying to be random, not using any deliberate or external tricks.
Second question: what percentage of the population behaves like me and is it qualitatively different from the population that doesn't?
I don't believe I actually am random, but whatever it is i'm doing the results are somewhat statistically unlikely. Is knowledge/experience with randomness itself sufficient to defeat this method?
With just tapping "randomly", it was looking good until I got 52% at 250 inputs. From there on it went steep downward: 59% at 500 but 57% again at 1000 (I changed how I tapped at the 500 mark; else it would have declined even more).
It appears that the guessing output is deterministic using your inputs as it’s inputs and you could figure out as many consecutive inputs you felt like to produce a specific outcome. For instance 6R1L3R inputs forces the game to “guess” wrong each time. It’s not guessing. This isn’t a random input, but it’s perfectly within a reasonable random distribution. Equally random is 10L, which the guesser will guess right each time.
Losing to the guesser doesn’t indicate a lack of random input, nor does guessing the opposite of the guesser indicate randomness.
We can’t really generate randomness. Only outcomes consistent with some distribution. It’s more of a philosophical point. If you made it it’s not random.
Yet when faced with the task of actually generating random numbers, humans fail miserably. Some how the failure to generate random numbers isn't seen as a lack of free will by anyone.
But in the context of quantum physics, the experimenters "freedom" to do something most humans can't actually do is a given, and denying it is "super determinism" and anti science.
It's funny that physicist take the freedom of their random choices as a given when a simple experiment shows they don't have such freedom.
[1]. https://demonstrations.wolfram.com/RockPaperScissorsWithAIPl... [2]. https://blog.wolfram.com/2014/01/20/how-to-win-at-rock-paper...
left
right
right left
right right
right left left
right left right
right right left
right right right
right left left left
etc.