Reversing Factorio's RNG

(gegell.github.io)

52 points | by jheitmann 4 days ago

3 comments

  • strstr 25 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 0 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 3 days ago
    Super cool
    • jvanderbot 52 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 48 minutes ago
    Madman. Brilliant.