On the probability of finding diamonds in Minecraft

There is no better game for a peaceful Saturday evening than Minecraft. You can explore, build, fight monsters or tunnel your way through endless stone while watching math videos from YouTube. Thanks 3Blue1Brown for an excellent Fourier Transform video)!

Inspired by math and data science I wanted to optimize my diamond yield (most valuable mineral in the game). The topic has really been over-analyzed already. My inspiration came from this post on Reddit /r/Minecraft showing odd streaks along the z-axis. Nevertheless, I wanted to see what I could discover on my own.

I started a Jupyter Notebook and searched the Internet for how to read a Minecraft .mca -file. Of course, other people had already done work on this topic years ago, so it didn’t take too long to find a great source and a Python implementation for getting the data.

The area under examination was 1775 chunks from a world where I have ran around slightly generate more chunks. 16×16 chunks that can have a height between 63 and 255 (minimum comes from the sea level) is minimum of 28 627 200 blocks. Because Minecraft does’t save empty chunks of just air, my dataset had 39 870 463 data points.

Based on what I found, I will be mining mainly on level 11 and sometimes at level 6. This maximizes the visibility to high density blocks also above and below me. It might be fastest to ignore the diamonds on level 6 due to high concentration of lava lakes which can easily be bridged over at level 11.

Running on 8 GB of RAM, I found myself running out of memory more than once, so I looked up tips for working with a large dataset using the Python library pandas. I also skipped stone and air as their distribution is not that interesting or relevant. Skipping those most frequent but irrelevant blocks dropped my memory consumption from over 700 MB to 110 MB. Of course, I could skip most of the blocks but I was exploring the data so I wanted to see as much as possible.

On their own, my results are not very significant considering the amount of different Minecraft world that could be generated randomly and the relatively small amount of chunks inspected. So my work assumes that the distribution of diamonds is uniform across random worlds and independent of other variables such as the biome in which they appear.

As next steps, I could take a look at the distribution of other minerals. I’m starting a University course in Information Visualization next month and look forward to graduating to real world datasets.

Gaming to stay in touch


I have played games all my life – from computer games to board games. When I was a kid, we had most consoles and I can vaguely remember having a Commodore 64 before the first Nintendo. The first NHL game I played was NHL94 on a Sega. 20 years later (took me a moment to calculate that it’s actually not 10 years), NHL14 has an anniversary edition of the classic (official gameplay video), although I have to admit that I prefer the latest edition. In the spirit of nostalgy, I have to admit that I still remember the cheats to Ultimate Doom.

Being from Helsinki, Finland but living in Germany, my regular contact with my family is limited to Skype calls.  I was dumbfounded recently to see my mom join Facebook and I think it’s great that she can stalk me there. Skype calls work well with my parents but with my brothers, a game provides a great lubricant for discussions about life in general. Who has not discussed their school assignments while playing a casual deathmatch of Counter Strike?

I have been the follower in gaming by jumping to games that my brothers enjoyed. I never liked MMORPGs before I decided to try Archlord years ago after seeing how much fun my brothers were having. Since then I have tried a few other MMOs but I never played World of Warcraft using wotlk classic gold for this. Most often, Counter Strike: Global Offensive is the game we play.

It’s not only the conversations we have while playing but in a way it feels as if we are doing stuff together. My brothers end up teaching me in almost any game we play together and we get to struggle towards common goals. And that’s what makes it a great time, in addition to all the laughs we have. The only requirement I have for gaming is that it must be fun. The moment gaming is not fun, it’s not worth the time spent. By the way, one of our favorite games to play together is Drift Hunters.

Steam screenshot

I have to thank the Internet and great multiplayer games for making it possible to enjoy time with my brothers from halfway across Europe. One of the biggest contributors is Valve’s Steam that makes it incredibly easy to try out new games and join games with friends.


GTA V impressions (no spoilers)

I can easily write my first impressions without going into the plot of the game. It suffices to say that the story is very engaging and I would love to see more games with similar depth in the future.

I play the game on Xbox 360 and 40″ LCD TV. I also play PUBG on my TV with pubg hacks.  I’m not the kind of guy who would stand around and look at the scenery in a game but I recognize when my surroundings are beautifully detailed. 

Probably one of the most striking new aspects in the game is how the player needs to switch between characters during and between missions. It is brilliant. I recently finished GTA IV: The Lost and Damned where some characters appeared from the original GTA IV and Ballad of Gay Tony DLC but I was left wanting to interact more between the characters. Switching adds more perspectives to the story and the mission at hand. The ability to switch makes the gameplay more immerse when more things happen at the same time, and I also like casino games and that’s why I visit the bitstarz casino login just for this purpose.

Some of the great things in GTA V

  • Driving small country roads up the hill or speeding in the city traffic is no longer possible without using breaks. Sounds annoying compared to previous games but the driving mechanics are actually very much improved and it’s a pleasure cruising around the state. Although, I do prefer using an airplane for longer distances.
  • The idea of switching characters is excellent and it works surprisingly well. I have not run into any trouble because of the switching. It’s been made easy enough to switch even when being shot at.
  • Mission system allows the missions to be replayed. Perhaps I will find perfecting the robberies fun after a while but first I will most likely finish the story.
  • Shooting range is actually fun even though I hate shooting with a controller.

I’ve loved the game so far and after 30% of the story finished, I can’t find anything negative to comment. I am driven by the story in the game and tend to spend most of my time advancing the story instead of doing side activities. I feel like missing a big chunk of the game by focusing on the story. The side activities are fun but there’s no bigger meaning behind them for me. I’m slightly afraid that there is only a very limited number of heists in the story and that there is no possibility of finding new heists after the story is done but that remains to be seen.

Enjoy the game by watching  streams at Twitch if you haven’t purchased a copy yet.