Reversing Factorio's RNG
52 points by jheitmann 5 days ago | 5 comments

strstr 29 minutes ago
I did an easier version of this in my college intro class. There was a class competition that involved rock paper scissors as a subcomponent, and ties were broken with randomness. You could rig Java’s prng so you would win all ties.

The prng was seeded with usec time at first call. I called the rng a bunch of times to harvest entropy, and scanned the plausible usec times to find the seed. Then I primed the prng so I would win ties.

Frankly, I assume I implemented this wrong, but the theory was there lol.

reply
rogueaine 4 minutes ago
That’s not at all what the article proposed. The author constructed and transpose to the linear shift register coefficients and built a circuit network based on this to predict the next state (in the sandbox) and direct recipes.
reply
pema99 4 days ago
Super cool
reply
jvanderbot 55 minutes ago
Yeah, no notes. It's remarkable.

TL;DR: Wired up an in-game predictor of RNG output and used it to only craft legendary items when RNG would line up to roll legendary.

From base to legendary at a suprisingly high rate. Look very closely at the video at the top of the post - what I was seeing didn't sink in until I had finished the article. Amazing.

reply
lowbloodsugar 51 minutes ago
Madman. Brilliant.
reply