Reversing Factorio's RNG

(gegell.github.io)

56 points | by jheitmann 4 days ago ago

5 comments

  • strstr 37 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.

    • rogueaine 13 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.

  • pema99 4 days ago

    Super cool

    • jvanderbot an hour 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.

  • lowbloodsugar an hour ago

    Madman. Brilliant.