https://github.com/nicholascartaxo/minesweeper-bot
Python Minesweeper Bot that uses openCV
https://github.com/nicholascartaxo/minesweeper-bot
automation minesweeper opencv python
Last synced: about 1 month ago
JSON representation
Python Minesweeper Bot that uses openCV
- Host: GitHub
- URL: https://github.com/nicholascartaxo/minesweeper-bot
- Owner: NicholasCartaxo
- License: agpl-3.0
- Created: 2022-08-05T22:59:38.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-03T05:03:20.000Z (5 months ago)
- Last Synced: 2025-04-11T03:57:04.504Z (about 1 month ago)
- Topics: automation, minesweeper, opencv, python
- Language: Python
- Homepage:
- Size: 40 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Minesweeper Bot
Python Minesweeper Bot that uses openCV
It detects a certain area of your screen, the corresponding area of a google minesweeper on hard difficulty, only the 24x20 grid.
If you want to use this on your computer, make sure to change all values regarding to resolution and margins
F to start
G to pause
X to exit
Sometimes it will either fail when its logic isn't sufficient and it goes for luck by clicking a random green spot and analysing the board.
Its logic consists in analyzing all number tiles and checking if any flags can be placed around or if any of the 8 surrouding tiles can be clicked. Then it analyzes 2 number tiles at a time to check for "co-surrounding" tiles to click or flag the exclusive ones.Youtube video demonstrating the application: https://www.youtube.com/watch?v=FDclWnKgsRQ