proomt

Search

Search posts, papers, and topics

All posts

Hacker News front page61 min readintermediate

Reversing Factorio's RNG

Summary

The author reverse‑engineers Factorio’s RNG, confirms it’s the Boost taus88 generator (a 3‑LFSR XOR combo), proves equivalence with the game’s compiled code via decompilation and symbolic Python checks, and explains how the weak LFSR structure lets you predict future “random” quality outcomes.

  • Factorio uses Boost’s `taus88` PRNG (three 32‑bit LFSRs XORed together).
  • Decompiling the game binary (via Ghidra/Binary Ninja) shows the same three‑seed state and equivalent update logic after compiler optimizations.
  • A Python/Sympy notebook demonstrates step‑by‑step equivalence between the Boost implementation and the decompiled code.
  • Because LFSRs are linear over GF(2), the combined generator is trivially breakable: given a few outputs you can reconstruct the internal state and predict all future RNG calls.

Predicting the RNG lets players deterministically obtain high‑quality items in Factorio, turning a probabilistic mechanic into a guaranteed outcome. The work also showcases a practical workflow for verifying PRNG implementations in closed‑source games.

6/10

Related reading

  1. Reverse-engineered Jev-like model

    Jevlike is an open‑source starter model that scores a list of text options in a single forward pass. It provides a minimal architecture (option queries, shared dot‑product scorer), synthetic data generation, training/evaluation CLI, and examples on Doom and chess. The repo supports a byte‑level encoder or a frozen Hugging‑Face encoder (e.g., Qwen2.5‑0.5B), runs on CPU/MPS/CUDA, and reports benchm…

    Hacker News front pagegithub.com4 minreleaseHN16224
  2. Reflect, Revise, Reuse: Training-Free Skill Evolution for GUI Agents

    EvoSkill‑GUI lets GUI agents revise their procedural skills on‑the‑fly without extra training by using a reflect‑revise‑reuse loop that edits skill packages during execution. The approach yields up to +16.2% improvement on MobileWorld and similar gains on AndroidWorld and OSWorld, and the evolved skills transfer to related tasks.

    Hugging Face Daily Papersarxiv.org1 minpaper
  3. Worker Backpressure (Part 1)

    Canva added a lightweight, local backpressure loop to its queue worker library that monitors per‑message success/failure, computes a backoff factor against a configurable failure‑rate set‑point, and throttles the worker’s concurrency. In two real incidents the mechanism kept failure rates under 2 % fleet‑wide, limited DLQ growth to a handful of messages, and maintained throughput without manual i…

    Canvacanva.dev10 min
  4. Grounded Skill Synthesis from Code at Scale for Agentic Intelligence

    Code2Skill is an automated pipeline that mines popular GitHub repositories to extract verifiable, implementation‑anchored procedural “skills”. It builds a bank of ~1 M skill records (atomic ops, workflows, patterns) with provenance metadata, verifies each via blind reconstruction, and shows that augmenting LLM‑based agents with these skills yields an average 11.7% performance lift across 72 proto…

    Hugging Face Daily Papersarxiv.org1 minpaper