A while ago, I wrote a minesweeper AI. I intended to publish a writeup, but due to university and life and exams, I never got around to writing it. But having just finished my Fall term, I have some time to write a decent overview of what I did.
Short 30 second video of the AI in action here:
How to Play Minesweeper
If you’re an experienced minesweeper player, you can probably skip this section. Otherwise, I’ll just give a quick overview of some basic strategies that we can use to solve an easy minesweeper game.
We start with a 10×10 Beginner’s grid, and click on a square in the middle:
We can quickly identify some of the mines. When the number 1 has exactly one empty square around it, then we know there’s a mine there.
Let’s go ahead and mark the mines:
Now the next strategy: if a…
View original post 1,572 more words