Minesweeper AI: Planning

Approach

For creating a program to solve minesweeper in an algorithmic fashion, I’ll mainly be focusing on implementing a simple solving algorithm to start and work my way towards any more efficient algorithms I can learn about and implement.

Major Classes

Ideally I’ll be working primarily within the classes of the DLL provided, but I may have to create my own classes for keeping track of where the known mines are as well as keeping track of how many mines are around each empty square. Not only that, but depending on the complexity of the algorithm, I may have to create classes for tracking multiple tiles at once so the program can better figure out where the mines are located.

Major Algorithms and Scale

From what my research suggests, I can start making my program by using two fairly simple rules for the initial algorithm. These rules are:

1. If a square marked 1 only has one unknown square adjacent to it, then we know that unknown square is a mine.

2. If a square marked 1 has a known mine adjacent to it, then all the other unknown squares adjacent to it are empty.

This should prove effective for smaller grids but more complicated techniques that may even include guessing will be needed to effectively clear larger boards. Some of these techniques and  the rules above can be found in the link below.

References

Well-written guide for creating a Minesweeper AI:
https://luckytoilet.wordpress.com/2012/12/23/2125/

Advertisements
Minesweeper AI: Planning

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