An open API service indexing awesome lists of open source software.

https://github.com/aryankeluskar/irina.minesweeper

AI that solves Minesweeper. Uses a probabilistic approach, scans the grid, trains a Reinforcement Learning model to take decisions based on the existing grid, and marks the grid with mines to complete the game.
https://github.com/aryankeluskar/irina.minesweeper

minesweeper pyautogui python q-learning reinforcement-learning

Last synced: 6 months ago
JSON representation

AI that solves Minesweeper. Uses a probabilistic approach, scans the grid, trains a Reinforcement Learning model to take decisions based on the existing grid, and marks the grid with mines to complete the game.

Awesome Lists containing this project

README

          

# irina - AI That Solves Minesweeper!

Built using Python. Inquisitive Riddler Investigating Navigational Arteries (in minesweeper), or irina for short (cause she is), is an Artifically Intelligent Model to solve Mineweeper by utilizing a probabilstic approach. Most Exciting Thing? This algorithm is nearing world record timings and this is just the beginning.



Stage
Time




Beginner
5s


Intermediate
15s


Expert
32s

|Beginner|Intermediate|Expert|
|-|-|-|
| | | |

#### You get: _Finally solve the game, Flex to friends, Peace of Mind_
I get _(hopefully): Star, Heart, Follow :)_

## Install
(exclusive to Windows presently)

Requirements: gh, pip, python 3.12+
Run the following commands:
gh repo clone aryankeluskar/irina.minesweeper
pip install -r requirements.txt

## Run the app
The app will auto-calibrate itself to your device's display assuming that you adhere to using the WINMINE.EXE given in the repo. Use the following command

python main.py

And let the magic (a.k.a. irina) shine brighter than all neon on broadway (pretty normal stuff imo)

## How does it work?
It starts by randomly tapping 3 cells, then finds the probability of surrounding cells being a mine while training a Reinforcement Learning model in background to predict the next set of non-mine cells and click on them. This process repeats until there are no non-mine cells remaining. Motivation? My close friend and I were getting nostalgic over our high school memories of playing this beautifully haunting game but never winning, so I built this project to redeem our younger selves.

## Support this project!
### This has been quite an ambitious project (and a super memorable one ofc)! Please consider leaving a 🌟 if this added value to your wonderful life :)
### Made with pure love and [freshman fascination](https://aryankeluskar.com/freshman%20fascination). Visit my website at [aryankeluskar.github.io](https://aryankeluskar.github.io) <3