Город МОСКОВСКИЙ
00:17:01

Automated Minesweeper Solver 20 Games

Аватар
Программирование в деталях
Просмотры:
38
Дата загрузки:
05.12.2023 03:51
Длительность:
00:17:01
Категория:
Технологии и интернет

Описание

An automated Minesweeper Solver in action.

Code: https://github.com/lvijay/minesweeper-solver/
Game: On Apple's App Store: https://apps.apple.com/us/app/minesweeper-classic-game/id1475921958?mt=12. (Note: I am note affiliated with the game developer in any way.)

How does it work?

1. Open minesweeper game
2. Run Java server (uses java.awt.Robot to move/click mouse, take screenshots)
3. Run Python program
4. Python program gets a screenshot from the Java server
5. Use OpenCV to identify the minesweeper board
6. Take screenshot and analyze the cells and the board position. If the board is solved, stop. Otherwise:
7. If there cells known not to be mines
7.1. click each of them and then
7.2. go back to step 6; otherwise
8. Guess some cell to open and click it. Go to step 6.

If you're tech savvy, you can also get the game working against https://minesweeper.online/ (once again, no affiliation). If you're even savvier, please submit a PR!

Рекомендуемые видео