Reversing Factorio's RNG

(gegell.github.io)

44 points | by jheitmann 4 days ago

3 comments

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

  • pema99 3 days ago
    Super cool
    • jvanderbot 42 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.

  • lowbloodsugar 38 minutes ago
    Madman. Brilliant.