SIBR:Random number generator

From Blaseball Wiki

Revision as of 12:55, 15 August 2021 by Pokeylope (talk | contribs) (Created page with "The Blaseball backend uses a pseudorandom number generator called XorShift128+ to generate rando...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The Blaseball backend uses a pseudorandom number generator called XorShift128+ to generate random values. These values are used for a variety of purposes, including attributes for newly-hatched players and determining event outcomes during games.

XorShift128+ is not cryptographically secure. With three known consecutive outputs, the RNG state can be fully reconstructed,[1] allowing us to determine what all subsequent values would be. Furthermore, the algorithm is fully reversible so we can determine all preceding values as well.[2] Using this technique, we can select a player whose earliest recorded stats were unchanged since generation, recover the RNG state from when that player was created, and examine the surrounding values to find stats for other players that were created at the same time.