How To: Stop Blowing Yourself Up! Use This DIY Mine-Detecting Program to Beat Minesweeper

Stop Blowing Yourself Up! Use This DIY Mine-Detecting Program to Beat Minesweeper

Minesweeper is one of those games that everyone plays, but hardly anyone actually knows how to play. Most people just click random squares and see how far they can get.

If you don't want to take the time to learn how it works, but still hate losing, computer science student Bai Li has just the program for you. He wrote an AI that can scan the Minesweeper board, run calculations, and figure out where the mines are.

It wins about 50% of the time, which is probably higher than most people's record. It uses several different algorithms to evaluate the probability that each square contains a mine.

The first two simpler algorithms had much lower success rates, but when Li utilized the mine counter, the solver was much more accurate. Finally, a Java script uses the Robot class to make the mouse click in order to play.

You can find a detailed writeup and explanation of the algorithm over on Li's blog, along with some general tips and tricks to beating Minesweeper, and he's posted all of the code over on Github.

If you don't have a Windows system that comes with Minesweeper already installed, you can download it free for both Windows 8 and Mac. Or, if you just want to play on your phone, it's available on Google Play and iOS as well.

Just updated your iPhone? You'll find new emoji, enhanced security, podcast transcripts, Apple Cash virtual numbers, and other useful features. There are even new additions hidden within Safari. Find out what's new and changed on your iPhone with the iOS 17.4 update.

3 Comments

I loved how on the main page the title wrapped just at the right place, and as I was skimming through, I saw the article:

"Stop blowing yourself"

Needless to say, there was a double-take, LOL. At least I got my attention, look where I am! I still need to know how to break this disgusting habit, though... the article wasn't much help in that aspect...

@:O ~o=8
"Nommy!"

If anyone doesn't want a challenge, but just wants to win in Minesweeper...there's a simple way to. Biggest truth is that...I found it!!!

  1. After you open Minesweeper, click on the 'Game' on the upper left corner of the game board. (I dunno how else to say it)
  2. Click on 'Custom'.
  3. Type the highest number possible on the 'Height' and 'Width' textbox, and then type '10' in the 'Mines' textbox.
  4. Enjoy easy wins! I even made a record of clearing all mines in 1 second using this method!

Another tip, if someone's not up for easy wins. If you want to clear most of the gameboard in just one click or try to play safe, then first click on the top-right square. Now, most of the game-board is cleared.

This goes in a cycle. If this is the first session, click on the top-right corner. If this is the second, click on the top-left corner. If the third, bottom-left. If the fourth, bottom-right. This goes on in an anti-clockwise direction.

Note: This works on only the beginner part, and I think that this might not work on a few computers, but it works in mine...

Share Your Thoughts

  • Hot
  • Latest