Friday, September 2, 2016

Minesweeper Planning Post

The assignment is to make an artificial opponent that can beat minesweeper. Since I have never really beaten minesweeper, the first step is to learn how to play. So I looked up tutorials on how to play correctly. Then I was playing some games so that I can get the feel for what the AI will be attempting to accomplish.

The goal is to make an AI that can beat every game of minesweeper without taking a long time. The AI will be programmed to play the game just like a human. It will pick tiles that it knows aren't mines, while marking tiles it knows are mines. Even though the AI will follow an algorithm that follows the thought process of a human, it should be better because it won't make human mistakes.

The AI will basically be checking a whole bunch of cases to see what tile to pick. Even thought a computer can run over a billion calculations a second. I can't have the AI check each case on each tile. It will not only become a waste of time but it will also be a waste of the CPU. So the AI will check to see what tile is the best to run the numerous conditions on. Since minesweeper is a logic game one needs to have some evidence to pick a non-mine tile. Therefore the first pass of the algorithm the tiles that have open sides will be selected. If all the sides are opened or marked as mines, it will pass that tile. This will hopefully cut back on time and CPU power making the algorithm faster.