r/AskComputerScience • u/FlakyLion5449 • Nov 13 '25
Is it reasonably possible to determine a Minecraft seed number based on the features of the world?
The seed number is the starting value for the games PRNG that creates the features of the world. Given enough information about the features of the world could you determine the original seed number?
1
Upvotes
29
u/teraflop Nov 13 '25
In principle, yes. But because the seed is used to generate a lot of different random numbers that affect the world in complicated ways, you can't really work backwards from the world to the seed. You more or less have to brute-force all possible seeds.
A few years ago, there was a big collaborative effort to find the seed for the world that was depicted in Minecraft's original "pack.png" icon. It took months of work and thousands of volunteers' computers.
https://minecraftathome.com/projects/packpng.html
https://packpng.com/method/
6
u/mxldevs Nov 13 '25
If the world was procedurally generated, then we know that there exists some seed that would generate that world. From there, I imagine the only solution is a brute force search. Which means yes possible, but could a long time.
You could, for example, search for values that match one feature, and then once you find a hit, see if it matches a second feature.
If not, you just keep moving on.
Distributing the work across multiple machines could significantly reduce that time (eg: if you had two machines and first machine checks the first 2^n, second machines checks 2^(n/2), that could effectively halve the amount of time)
I suppose the next question is, is there ALWAYS a seed that corresponds to ANY configuration of a world? For example, let's say you generated a world, and then you smashed a block. Does there exist a seed that would generate this new world?
I'm not sure. If such a seed doesn't exist, then your search may produce nothing in the end.
So it seems there are two problems
2
u/TheRealRubiksMaster Nov 13 '25
You can with bedrock alone
1
u/zhivago Nov 14 '25
Reversing a one-way hash is generally unreasonably expensive.
1
u/Cum38383 Nov 14 '25
I'm pretty sure people have done this? Like with PewDiePies world, and the pack.png world
1
u/Grubzer Nov 14 '25
Not only you can, but there are tools to do that available to the public. If you have access to the world (like on a server, so you have direct access to block data, but seed is unknown) there is a mod that can crack the seed after collecting enough locations of some structures. But even if it is just a screenshot, you can bruteforce it, assuming there are some constraints you can derive, like it was done for the default world icon screenshot - it was a massive effort, but they reconstructed the terrain from the image, and then did a search for that terrain across the seeds (using gpus if i remember correctly), assuming image was taken not too far away from the spawn. From what i know you dont need to search whole space of possible seeds since possible configurations for the terrain gen repeat across seeds
Look up pack.png seed cracking, it is kinda fascinating
1
u/coolTCY Nov 14 '25
https://github.com/19MisterX98/SeedcrackerX
1
u/No_Seaworthiness7174 Nov 14 '25
https://youtu.be/9e_UfEyuEjE?si=NqcCUvc5sWWtRclk definitely possible because this guy did it