Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Training a 4B model to produce 81% faster query plans than Postgres(rohanbansal.com ↗)
    46comments
  2. Breaking the 1.58-bit Barrier for Ternary LLMs(arxiv.org ↗)
    discuss
  3. Xiaomi Mimo 2.6 live post-training dashboard(xiaomi.com ↗)
    38comments
  4. Small programming tricks(will-keleher.com ↗)
    160comments
  5. Reversing Factorio's RNG(gegell.github.io ↗)
    9comments
  6. AWS says it can't restore some data from mideast facilities struck by Iran(wsj.com ↗)
    65comments
  7. Performance Improvements in .NET 11(devblogs.microsoft.com/dotnet ↗)
    3comments
  8. Accurate Models of AMD Matrix Cores(arxiv.org ↗)
    5comments
  9. macOS 27 Golden Gate – Review(arstechnica.com ↗)
    69comments
  10. How good are frontier models at physics?(arxiv.org ↗)
    16comments
  11. Vectorized and performance-portable Quicksort (2022)(googleblog.com ↗)
    24comments
  12. Anatomy of a Texture(agentlien.github.io ↗)
    10comments
  13. Dream-RSI: Recursive Self-Improvement through Evolving Worlds(arxiv.org ↗)
    48comments
  14. Japan's book scene is moving from bookstores to libraries(untranslatedjp.substack.com ↗)
    7comments
  15. Mistral X Mozilla: Private, Multilingual AI Browsing(mistral.ai ↗)
    178comments
  16. Show HN: An e-ink frame that hears birds and draws them as 1800s illustrations(github.com/arnegiacomo ↗)
    235comments
  17. Anecdotally, programmers dislike "reduce"(evanhahn.com ↗)
    92comments
  18. The Siberian Ice Maiden and the Scythian World(patrickwyman.substack.com ↗)
    3comments
  19. Tell the speakers that you liked their talks(ohhelloana.blog ↗)
    72comments
  20. WalShadow: Sub-second Postgres replication to ClickHouse from physical WAL(clickhouse.com ↗)
    4comments
  21. Training Text-to-Image Models 3.6× Faster(linum.ai ↗)
    1comments
  22. The DeepMind Institute(deepmind.com ↗)
    37comments
  23. A warning about 'model welfare'(mustafa-suleyman.ai ↗)
    449comments
  24. Show HN: AttaLambda: a language where types and data are made of untyped lambdas(attalambda.com ↗)
    discuss
  25. Show HN: Restarted – a 2026 remake of the classic 2015 startup generator(restarted.io ↗)
    2comments
  26. Kyber (YC W23) Is Hiring a Forward Deployed Engineer(ycombinator.com ↗)
    discuss
  27. Reverse-engineered Jev-like model(github.com/vinnylarouge ↗)
    4comments
  28. How big are factorials?(thegreenplace.net ↗)
    31comments
  29. Douglas Adams and the exterminated Doctor Who adventure(bbc.co.uk ↗)
    68comments
  30. Claude Cowork and chat are now one Claude(claude.com ↗)
    196comments

Reversing Factorio's RNG

73 pointsby 4d agogegell.github.io
9 comments
1h agoHN ↗

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.

1h agoHN ↗

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.

54m agoHN ↗

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.

40m agoHN ↗

From the article:

Sampling the current RNG through observations,

Computing the current internal RNG state,

Predicting the future internal states,

Calculating corresponding quality levels for each future call, and finally

Making use of the predicted levels with some adapters.

The entropy->seeds (internal RNG state) step took more math of course. Frankly, I wouldn’t be surprised if they could have extracted the seeds without the math with a bit of RE and memory inspection.

The version I did wasn’t predicting quality of course, it was predicting tie breakers

22m agoHN ↗

Stardew Valley has two random number seeds. One is the normal character seed. The other, your multiplayer ID, can be determined by analyzing the save file.

Except! On the Switch, you can't easily access the save file AND the random number generator is different than on PC. There is a seed cracker that looks at your traveling cart listing and calculates the character seed. Maybe because it's less important and harder to observe, I haven't found any tool to crack the other seed and don't have time to attempt writing it myself.

By inspecting cracked geode contents, you should be able to isolate your multiplayer ID and then predict random events on Nintendo just as PC players have done for the last decade with access to the save file.

The C# code for the game is online and the Switch RNG is known, so you never have to work in the dark. It's three steps: ensure your Switch RNG implementation works by testing against the normal seed, ensure your geode RNG implementation works by testing against the PC RNG, and then apply the Switch RNG to the geode function enough times that only one seed could create your observed sequence.

-----

Two semi-related open questions: Are you able to solve as quickly while starting at ANY geode as you'd be solving from the first geode? Does the RNG eventually repeat, so it actually doesn't matter what your multiplayer ID is as long as you observe a unique sequence, since there will only be one continuation of that sequence?

4m agoHN ↗

by far the blackest magic I ever saw for that game.

I'm an upper intermediate at Factorio, resorting to someone else's blueprints only for belt balancers and rail intersections, and I can't even begin to figure out how it's done.