« When did Apple stop innovating? | Home | Hotmail enabling spammers »

October 12, 2011

Another crackpot scheme

Whilst development of YAMS continues apace (and there's actually people using it!) another Minecraft idea has wormed its way into my head and just won't get out; What if I generated every possible Minecraft world and put them all up on the web for people to pick their favourite?
It all started when I saw this line on the Minecraft Wiki:
Using pure numbers or letting Minecraft generate the world will give you access to the full set of possible worlds, which is around 18 quintilion....  However, it should be noted that, even if you explored 1000 seeds a day, it would still take you 10,960 years before you used all the seeds.
  Surely if I made this a distributed computing project, and got many Minecraft fans and players to go generating maps for me then this time would be dramatically reduced and I could be the creator of the only complete store of Minecraft worlds.  So I spent an evening making a program that would use the vanilla Minecraft server to generate a world, Minecraft Land Generator to expand beyond the spawn and c10t to make 3 maps; spawn, expanded and isometric.  Without the extra land generation I was able to do 10 worlds in about 2 minutes, with the land generation I could only manage 1 in that time.  But it's going to be distributed, so surely that's ok, right? Then I ran the numbers.... The "18 quadrillion" number sounds much more achievable in that format, so let me write it down for you:
18,446,744,073,709,551,614
Looks a lot bigger now, doesn't it?  Ignoring the time to generate that all for the moment, let's look at how much data that is to store.  In the above config of 3 images per world, an example set of images is 3,003,322 bytes, times that by 18 quadrillion and you need to store 49,206,427,647 PB of data.  To put that into context, it is theorised (no-one outside actually knows) that Google have 5PB of storage capacity.  Storing all that on Amazon S3 would cost in the region of $2,837,817,349,258,608 a month, the GDP of the whole world is estimated around $69,911,253,000,000. So we have established that if this project was ever completed, it's going to cost around 500 times the world's GDP to run every year, what about time and computing resource?  On my home PC, which is by no means a beast, it was taking in the region of 120 seconds per world to generate all three images making a total of 70,145,045,530,875 computing years to generate them all.  Even if you had a million people running it 24/7 it would still take 70,000 years to map all those worlds.  My program was knocked up in an evening, so there are huge time savings to be made, but it seems beyond doubt that this project would never be able to be "completed" in any normal passage of time. Does this mean I won't continue?  Hells no! If nothing else, generating a tonne of seeds and maps could make it easier for people looking to start a new world with specific elements, if I allowed user tagging of seeds someone could easily find all the seeds that have an NPC village near spawn, or that contain a swamp, or spawn in a mushroom biome etc.  As world generation will change again in 1.9, I've got a little time to get the basics down and see how it goes, apart from anything it will be an challenging technical project. What this does also highlight is the enormity of Minercraft itself, all these 18 quadrillion worlds have a surface area roughly 8 times that of the earth itself, that's not even a quantity my brain can begin to fathom.