Algorithm for Minesweeper to automatically solve all the non-ambiguous cases
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Robots are better are finding mines

Take the contents of deminer.min.js and paste it to to quickly get a bookmarklet

Use this bookmarklet on , click on the board until you have an opening, now click j on your keyboard. While the algorithm is working, the borders of the board will be red, when it's your turn to make a decision when an ambiguous case is found, the borders of the board will be green. Make your move and press j again until you loose or win.

You can also interact with the board while the algorithm is making it's thing, if you see pools of ambiguity.

My record for solving an expert minesweeper board with this bookmarklet is 4 seconds (yey)

To see this script on action, check this video