lundi 6 décembre 2021

Generating random sequences that are harder to crack

I am building a simple mobile game where players play rock paper scissors agains a computer. I am using Unity, and am looking to use the Random.Range function to determine which hand the computer plays against the player.

I see in Unity's documentation that they use an Xorshift 128 algorithm for the Random.Range function, which, according to this blog post and several other sources, can be easily cracked.

I'm wondering if there are ways to make it more "random" - I understand that true randomness cannot be achieved, but am wanting to learn ways to make harder to crack the pattern.

Any ideas will be appreciated! Thanks.




Aucun commentaire:

Enregistrer un commentaire