Hi @slipperypete ,
Since you posted the link to your seed finder utility here for GD Stash users and since this is seed related which GD Stash heavily utilizes, I figured this would be the best thread to share some feedback. If there is a more dedicated discussion thread for the tool, please feel free to move this post!
I’ve been running a search for a specific item combo over the last ~3 days (screenshot attached below), and it got me thinking about the underlying mathematics of the search. I wanted to ask a couple of questions and propose an idea, though please forgive me if I am missing something obvious about the game’s engine or your implementation!
I noticed my search reached 23.5 Trillion seeds tried at a blazing fast 73.7M/sec. Since a 32-bit hex seed pool maxes out at exactly 4,294,967,296 unique possibilities (16⁸ or max unsigned integer), is it true to assume that the tool is running a non-deterministic or pseudo-random check? Which by definition would naturally allow overlapping and re-testing seeds across the worker threads (assuming you are using worker threads) over time?
Because the tool shows a “1 in 2.7B seeds match” probability, I initially expected it to hit a result quickly. But seeing it loop through the equivalent of the entire seed pool thousands of times over makes me wonder if the specific stat combination I am hunting for is simply mathematically impossible due to how Grim Dawn’s internal logic handles stat calculations (which results in some stat distributions reoccurring and being more common than others whereas others are simply left out due to the hard cap of seed counts?).
If certain perfect combinations don’t exist, the random loop unfortunately turns into an infinite processing loop for the user. So I was wondering if it might be feasible to change the search strategy to a deterministic, linear sweep instead?
If the total 4.29 Billion search space were cleanly split into equal, non-overlapping blocks based on the user’s available CPU threads (e.g., Thread 1 checks 0 to 536M, Thread 2 checks 536M to 1.07B, etc.), a sequential sweep could exhaustively check every single existing seed in the entire game in under 60 seconds. This way, if the threads complete their assigned slices and find zero matches, the tool could definitively tell the user something like - “Search complete. A combination for this stat range does not exist. Please modify your search and try again.” clearly communicating to the user that no further searching can be made and that the combination simply does not exist.
This also means that combinations that are assessed to be something like 1 in 29.5B are likely to not even exist in the first place, which could be worth mentioning (which is something I’ve originally never taken into consideration before taking a look into what seeds actually are).
I might completely be misunderstanding how the tool interacts with the browser, how Grim Dawn handles stat distributions altogether or why a sequential brute-force isn’t ideal here, so please take this with a grain of salt! I just wanted to share the observation in case it helps optimize an already awesome tool.
Thank you for all your hard work on this!