Skip to content

An AI that plays Minesweeper using a knowledge base and logical inferences to adapt to the changes in the board.

Notifications You must be signed in to change notification settings

Val-Resh/Minesweeper_AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Minesweeper AI Player

An 8x8 Minewsweeper board that you can play yourself or with the assistance of the AI that can make the moves for you.

To Run:

  • Ensure Python is installed: https://www.python.org/downloads/
  • Run from command line: pip3 install -r requirements.txt to install necessary package.
  • python runner.py to run the game.

Approach:

The AI is built on a knowledge-based approach. The rules of the game are programmed into the AI. Based on logical inferences the AI is able to perform decisions, otherwise it will act randomly if no logical option is available. An example of a logical inference is:

| A | B | C |
-------------
| D | E | F |
-------------
| 0 | G | H |

We can conclude that D, E, G are not mines because of the rules of the game. This is a simple example and the AI uses other inferences to play the game, including the one represented above.

About

An AI that plays Minesweeper using a knowledge base and logical inferences to adapt to the changes in the board.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages