r/AskComputerScience • • Jul 01 '26

Since computer can only generate pseudo random numbers

can't you do really cool trick with the fact that if you were to roll a dice 5 times and all the previous rolls were the number 3 normally with true random ness the 6th roll only gets a 1/6 chance of rolling any number. Is that still true with pseudo randomness ? and if so can you prove it

0 Upvotes

33 comments sorted by

View all comments

Show parent comment

1

u/otac0n Jul 01 '26

Practically speaking, it is possible to attack Mersenne twister.

https://github.com/kmyk/mersenne-twister-predictor

I am not sure if you can say “no statistical analysis” given this only needs about ~600 sequential outputs.

6

u/UncleMeat11 Jul 01 '26

Mersenne Twister isn't a CSPRNG.

1

u/otac0n Jul 01 '26

Ah, fair. I did miss that you said CSPRNG.

1

u/thaynem Jul 01 '26

It isn't even all that good of a non-cryptographic PRNG.  It isn't particularly bad, but I think there are others with more uniform distribution.

1

u/Forsaken-Job-7126 Jul 12 '26

ill look into this thanks