Minesweeper AI

Thu Apr 21 2022

Algorithm Artificial Intelligence p5js Game
Link to Demo github logo Link to Code

A minesweeper AI that uses a combination of logical deduction and probability to play minesweeper. This project was built with p5.js. This solves constrained satisfaction problems using a backtracking algorithm. The algorithm is as follows:

  1. If the number of unopened cells is equal to the number of mines, flag all unopened cells.
  2. If the number of flagged cells is equal to the number of mines, open all unopened cells.
Back