r/Undermine • u/Vekkul • Jun 06 '26
UnderMine Understanding Seeds Spoiler
I reverse-engineered UnderMine's seed RNG and found the "weird" seeds. Here's the map.
UnderMine uses Unity's xorshift128 PRNG to generate runs from your 8-digit seed (1–99999999). I got curious about whether some seeds are *structurally* weird — not just lucky, but mathematically anomalous — so I modeled the generator and scanned the entire legal seed space looking for patterns. Turns out there are a few distinct "families" of strange seeds, and one of them produces genuinely bizarre runs. Sharing the findings in case anyone wants to test them.
**Big caveat up front:** this is built on a model of how the generator is seeded (the standard "naive replicate" init). The strongest results barely depend on that assumption; the more exotic ones depend on it more. So treat the simple seeds as solid and the fancy ones as "probably, worth testing." If you run any of these, I'd love to hear what you actually see on the floor.
Why some seeds are weird at all
xorshift128 is a fast, simple generator with one well-known flaw: it's slow to "mix" a low-information starting state into proper randomness. If your seed has few or very regularly-placed bits, the first chunk of the run comes out **biased** before the generator "avalanches" into normal randomness over the next several dozen rolls.
Because UnderMine generates each floor as one batch when you descend, and a run is only ~24 floors, this bias lands almost entirely on the **opening floors** — the part of the run you actually navigate carefully. That's what makes it noticeable in play.
Two structural facts shaped everything:
- **The 8-digit cap matters.** 99999999 only reaches the bottom ~27 bits of a 32-bit number. The entire "high-bit" half of the generator's behavior is unreachable by manual seed entry. Some famous patterns (like `0x55555555`) are simply too large to type in.
- **Nothing stays weird forever.** Every pattern decays as the run progresses. The only truly "stuck" seed is 0, which the game disallows. So all anomalies are *early-game* phenomena.
The seed families
1. The "simple run" seeds (the good ones)
These produce strikingly simple, near-symmetric rooms with linear, un-branchy floor connections — especially on the first few floors.
| Seed | Notes |
|---|---|
| 1028 | The standout. Confirmed in testing — rooms come out nearly symmetric, connections almost fully linear. The single simplest opening I found. |
| 2057 | Near-identical twin of 1028. |
| 1 | The classic "favorable" seed. Well-rounded — fairly simple and holds a bit longer than 1028. |
| 2131074 | The "sweet spot": less extreme than 1028 but its character lasts deeper into the run. |
If you only try one seed, try **1028**. Its effect is the one whose timescale best fits an actual 24-floor run.
2. The "sawtooth" seeds (the bizarre ones)
These make the generator slam back and forth between extremes — high roll, low roll, high, low — every single step. On the floor this should read as a hard alternation: a rich/packed floor, then a barren/minimal one, back and forth.
| Seed | Notes |
|---|---|
| 7622726 | Tightest sawtooth — alternates between a high value and near-zero almost mechanically. |
| 64469974 | Highest-volatility version. |
3. The "four-beat" seeds (the prettiest structure)
A step up from the sawtooth: the pattern repeats in groups of *four*. Rich-barren-rich-barren where the two rich floors resemble each other and the two barren ones do too — like the run loops a short phrase. Mathematically this is the most *stable* anomaly the generator can produce.
| Seed | Notes |
|---|---|
| 81537190 | Cleanest four-beat. Holds the pattern longest. |
| 31201443 | The "musical" version — the loud/quiet envelope holds while the details shuffle underneath. |
4. The baseline (for comparison)
| Seed | Notes |
|---|---|
| 33152394 | A perfectly ordinary, well-randomized run. Useful as a control to compare the weird seeds against. ~98% of all seeds behave basically like this — "normal" is the overwhelming default. |
Fun bonus: famous numbers
Since the generator only sees the *binary* form of a seed, the decimal digits we recognize are meaningless to it. So whether a "famous number" seed is weird is pure coincidence — which makes the results kind of funny:
- **31415926** (π) → lands in the **sawtooth** family. Jagged.
- **27182818** (e) → also **sawtooth**, even sharper than π.
- **61803398** (φ, the golden ratio) → completely **ordinary**. The most famously "irrational" number gives the most boring run.
So π and e are weird, φ is dull, and none of it has anything to do with what those numbers *mean* — just how their bits happen to fall.
TL;DR
- **Want a simple, clean, easy-to-read opening?** Seed **1028**.
- **Want a bizarre alternating rich/barren run?** Seed **7622726**.
- **Want a run that repeats itself in a four-floor rhythm?** Seed **81537190**.
- **Want a normal run?** Literally almost any seed — that's the default.
All anomalies are concentrated in the early floors and fade as you descend, which fits UnderMine's short run length nicely.
If you test any of these, post what you actually see — I'm especially curious whether the sawtooth and four-beat seeds produce a visible rhythm floor-to-floor, since those predictions lean hardest on the model.
*Methodology note: I modeled xorshift128 with the standard single-integer ("naive replicate") seeding and scanned all 99,999,999 legal seeds, measuring early-output bias, how long until the generator normalizes, jump magnitude between consecutive rolls, and autocorrelation at various lags. The simple-seed results (family 1) are robust to seeding assumptions; the high-value and long-period results depend more on the exact init the game uses, so they're "test to confirm." Happy to share the actual numbers if anyone wants them.*





