Hacker News new | ask | show | jobs
by joeraut 2095 days ago
A brief summary: pack.png [0] is a 128x128px image of a scenic mountain within a Minecraft world, and is used in in-game menus. The goal of this project was to discover the world seed used to generate the Minecraft world that pack.png was taken in. This was no small feat, with 2^48 possible seeds the procedural world generator could have used, and required much analysis, trial-and-error and distributed computation by many volunteers to obtain the seed.

The process involved exploiting identifiable world features such as the position of clouds, orientations of certain block textures, and more, to discover the exact coordinates of the blocks in the image (insane in itself); figuring out the exact camera perspective via regression fitting; creating and training a machine learning model to upscale the image in order to better discern details and manually create a reconstruction; deducing how the image was taken (print screen -> cropped to 512x512 -> 4x downscaled with specific resizing algorithm); and more. Through these efforts, they had significantly reduced the number of candidate seeds; distributed computing power provided by 3,500 project volunteers' GPUs was then used to obtain the final 700,000 candidate seeds, and from that a brute-force approach was used to isolate the actual pack.png seed.

The YouTuber SalC1 produced an excellent video on the project [1].

[0] https://packpng.com/static/pack.png

[1] https://www.youtube.com/watch?v=ea6py9q46QU

6 comments

My uneducated guess at a summary after reading and watching the video; which is like distilling a Nobel prize effort into a sentence, it seems the two big parts are

a) The clouds are a static map that is placed at a fixed location and moves over in a known pattern per time-step. So by extracting the cloud map and correlating that to what you see in the image, because you know where the clouds started you can get a good idea of where you are in the map.

b) A high-up waterfall has a low chance of spawning because high waterfalls are rare to even try generating; and additionally it requires rock and air around it, further reducing the chance it can actually occur.

So (a) lets you know where you are, then you figure out the waterfall location from that (a lot of tricks described above to figure out perspective, etc.), then use elements of (b) as a fairly fine sieve on the generator ("could a waterfall generate at xyz") and you have a tractable way to find possible world seeds.

Maybe? A very fun project, anyway.

What you're describe is sort of the first and last steps. As I understand it, the solution involved comparing the pattern of sand in the pack world (that they figured out from the picture) against all possible seeds.

Doing all the initial detective work allowed them to compute the xyz coords in the world, which gives the location to run the simulations.

The whole thing was abstracted away, you don't need to run Minecraft at all (so it's not like they're rending billions of images), just the function that generates the sand noise. This got written as a parallel cuda kernel and they just threw iron at it.

That then gave the 700k possible matches which were searched more thoroughly.

The matching function is very simple, it compares the generated Perlin noise to a fairly small template and as soon as there's a mismatch, it stops early. Most of the complexity in the kernel is generating the noise from a seed.

https://github.com/minecrafthome/pack-sand-reversal/blob/309...

One additional wrinkle that I saw on a video[1, about 7:00] about the skull painting was whilst the clouds are a static map moving per time-step, that starts when the first map is loaded, not each map. Which means it can be misleading.

[1] https://www.youtube.com/watch?v=WCEu4DmB174

> creating and training a machine learning model to upscale the image in order to better discern details

Contrary to popular myth, no AI upscaling was used as it turned out to be too inaccurate. Instead, they manually upscaled some simple image parts after they realized the pixel colors of the cloud edges were produced by 2x "box"-style downsampling.

You have part of it reversed I think. The candidate seeds were found by the distributed system and the last 700k were analyzed on a single computer.
You're right — fixed :)
That's the "how". But I'm missing the "why".

What a colossal waste of brainpower and computing resources. How bored out of their minds do people have to be to invest all that energy into such a project. Sure it's technically challenging. But so much is!

You have one life and are obviously talented+educated but then burn it on such nonsense. Don't get me wrong, not everybody needs to try to solve cancer, world peace or climate change. But finding a minecraft world seed? Wtf people..

I did not participate in the project, and I agree the seed is almost worthless to the world but I don't think the project was a waste of anything.

The minute inherent value of the answer is not why it was done. Finding the answer became personally valuable to people for a few reasons:

The unavailability made it seem more valuable. The idea of making something seemingly unknowable known is enticing. Making headway on a problem makes the solution personally valuable. The production, rhetoric, and appeals to nostalgia in Sal's first video about the project made it seem more valuable to many. Being part of a group who share an objective that matter to them is inherently valuable to humans.

I believe the project added value to the lives of everyone involved, and the experience gained and the connections made will add value to the rest of the world.

All of this could have been true for a project that actually matters, yes, but those projects tend to have high barriers to entry, consequences for failure, and distant horizons of success. I think this project replaced time and computing power that would have been spent on games and youtube, not on important problems.

You are probably right with your last paragraph. But that's what is so sad!
Sometimes just solving a problem is rewarding.

People don't port DOOM to pregnancy tests and fridges because there's any dire need to play it on those devices

Was it first proven that it's possible to unambiguously determine the world seed given the information in the PNG or were they just lucky?
They were pretty confident that a valid seed mapped to that image, as the creator of the game said that they just loaded up a random world and took a screenshot without doing anything.

It's not guaranteed to be unique, but i saw 10^-20 thrown around as the chance of 2 seeds matching.

Wow! Thanks for the summary!

That's astonishing!