Factorio's "Random" Quality Is a Predictable LFSR You Can Reverse
Reversing Factorio's RNG
Factorio's quality mechanic isn't truly random—it uses the taus88 PRNG, a combination of three linear feedback shift registers. By decompiling the game's binary with Ghidra and Binary Ninja, the author confirms the RNG's implementation and shows how its linearity makes it trivially breakable. Knowing the internal state lets you predict future quality upgrades, turning a game of chance into a deterministic calculation. This only works in Factorio 2.0; version 2.1 changes the RNG usage.
What happens if we know the exact algorithm and its internal state? Then we could just run the same algorithm on the state and obtain the same outputs, which will also be seen by the game internally.