Minesweeper AI Solver (Planning)

As a side project I have decided to create a minesweeper solving system to further explore puzzle solving AI tactics and methods.

I have been researching methods and tactics to best solve minesweeper as well as playing minesweeper myself. In my findings I have decided to generate a system that randomly selects a tile and keeps track of all tiles bordering those that contain a number warning the player of number of adjacent mines (after the cascade of empty tiles concludes), runs all potential outcomes (a slow method) and evaluates how many times the tiles were “selected” in all of the tests. Using this data we can predict the odds that the tiles is covering a mine and select a tile based on least probability of loss. This method only has about a 50% chance of working in the long run but it uses implicit statistical analysis to make educated guesses as to the optimal path of success… which may not always be the correct path. I intend on implementing this method and then coming back and fine tuning it based on the results this method posts. Fingers crossed that this produces a decent win rate and runs at a relatively quick pace.

If the previously mentioned method proves to have too many shortcomings or if it tends to reach a certain percentage of completion before making a mistake, I intend on employing what I have found to be called the multisquare algorithm. This looks at multiple squares and evaluates the best course of action and employs a slower but more accurate result. I will be likely using this method if the previous method produces “high risk” results that could result in a loss at the cost of speed.

All told, I intend on using the fasted method possible until the risk level gets too high and I will then switch algorithms to hopefully guarantee accuracy without loss of too much time. I am not going to try to make a perfect solver or the fastest solver but rather a quick solver with a high win rate.


Here are the sources I found to aid my research and direct my approach:




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s