[Tool] Brute-forcing RNG Tree seeds with Node.js. Methodology + best seeds found so far

Been meaning to write this one up properly. I built a Node.js script that walks every possible seed and scores it, rather than relying on manually rerolling and eyeballing results. Wanted to share how it works in case anyone wants to run their own search or push on the approach. This is for https://jacorb90.me/RNG-Tree/ btw.

The basic idea

The game’s seed generation (layers.jscreateLayers()) is fully deterministic, every layer’s color, requirements, upgrades, and buyable slots fall out of a sine-based PRNG seeded once at tree creation. That means you don’t need to actually load the game to know what a seed produces you can simply re-derive the entire tree structure in plain JS, as long as you port the generation math faithfully. So the script re-implements createLayers()'s row/layer generation logic directly, then runs it against every seed in a range and scores the result.

Structure (I ran this in PopOS! Linux)

  • lib/rng-core.js — the actual ported generation + scoring logic

  • worker.js — a worker-thread wrapper that chews through a chunk of seed-space and reports back the top candidates it found

  • search.js — the orchestrator: splits the full range into chunks, spins up workers, merges their results, checkpoints progress to disk (so a run can be killed and resumed without starting over)

  • inspect.js — takes a single seed and prints out its full generated tree (every layer, upgrade, buyable slot) plus a breakdown of why it scored what it scored

Generation vs. scoring is an important distinction

The generation side (what letters/colors/requirements/upgrade grids/buyable grids a seed produces) is a direct, exact port of the game’s own arithmetic. No guesswork there, it’s the same formulas the game runs.

The scoring side is different: it’s a heuristic I built to rank seeds against each other (weighted mix of things like upgrade exponent strength, buyable stacking potential, requirement reachability, cascade depth, etc.), not a value that exists in the actual game. It’s a best-effort proxy for “will this seed let me progress further, faster”, useful for filtering a billion seeds down to a shortlist, but not gospel. Worth actually playing out a shortlisted seed before fully trusting the ranking.

One gap I only caught partway through the search: the original scorer only accounted for one-time upgrades and completely missed repeat-buyable slots (the other big lever in layers.js). A seed with mediocre upgrades but a cheap, deep buyable grid can out-scale a seed with great upgrades and no buyables to lean on so I went back and added buyable-grid generation and a buyable-stacking-potential score component. That’s why some of the seeds below are scored under the old upgrades-only version and some under the updated version, noted per seed.

Seeds found so far

  • Best score by point count, upgrade types, cheap layers, etc. balance in the first three layers, excluding buyables (arguably better): 467039205 — score 59.46, reachability 0.17.

  • Best score with the same balance, but including buyables (volatile), first three layers: 748147658 — score 60.61, reachability 0.17.

  • Best total upgrade exponent, first three layers: 336523916 — exponentProduct 4.495e+5.

  • Best collective buyable potency, first three layers: 239050813 — buyablePotencyProduct 1.176e+3.

Search is ongoing. I will update as better candidates turn up. Happy to share the script itself if people want to poke at their own configs (target letters, target color, row count, weight tuning) or run their own sweep. It takes around 5 hours to score every seed on an i5-10400F.

Pathing for 467039205 - layer n is pretty good to begin with but then dump all points toward L. Then when you reach 1e+24 reset for m and repeat 4 times, to get the second upgrade (skip the first). By then, unlocking upgrades in the rest of the 3rd layer is easy - and advance on to layer 4. Layer 5 isn’t possible to reach in a reasonable timeframe though.

Uhhhhh what

What dont you understand? I thought i explained it pretty clearly

Would it be possible to change the weights and find a seed that’s possibly better? You said you just made up the weight values, is there an unknown, optimal weight that would return the true best seed?

I would assume no. The game only has 1 billion possible seeds, and the mathematical chance of pulling the best possible upgrades is probably a lot bigger since combinations are factorial growth

Yes there could possibly be a marginally better seed out there found with different score weight. But each scan takes hours even on good hardware. And the values i picked are probably close to the best ones. Even if there are better seeds, they probably arent better by much, (what Edgar said.)

i did not understand anything, anyways i will play a tree