Minesweeper AI Solver

An AI-powered solver for Minesweeper puzzles

Project Overview

This project consists of a React frontend and a Python FastAPI backend that work together to visualize an AI solving Minesweeper puzzles in real-time.

Minesweeper AI Solver Demo

Demonstration of the AI solving a Minesweeper puzzle

AI Algorithm

My minesweeper solver employs multiple sophisticated strategies to efficiently solve puzzles:

Set Operations

Uses set pair subtraction and division to find guaranteed solutions

Constraint Satisfaction

Applies forward checking and backtracking to find probabilities of tiles being safe or bombs

Bayesian Analysis

When no moves are guaranteed, uses a Bayesian tree algorithm to balance probability and information gain

Heuristic Optimization

For large frontiers, limits calculation time and makes predictions based on estimated probabilities

Features

Project Structure

Technical Implementation

The project uses Docker for containerization, making it easy to set up and run on any system. The frontend communicates with the backend API to generate puzzles and receive solver moves. The AI makes decisions in real-time, with the frontend visually displaying each step of the solution process.

Back to Portfolio View on GitHub