An agent was trained to play the game Minesweeper through supervised learning with a convolutional neural network. The CNN was trained on labeled Minesweeper board states to predict the probability of a cell having a mine. It then chooses the cell with the lowest probability. We trained on 6x6 grids that represented one-hot encoded board states. We used a dataset of 64,000 board states, a weighted, masked binary cross-entropy loss, and a validation method of self playing 1000 Minesweeper games for each update. From our ablation experiments, we reached our goal of beating the paper's win rate of 91.2% with a win rate of 92.4% with a dataset of 128,000.
Related Works: Wang, W.; Lei, C. Training a Minesweeper Agent Using a Convolutional Neural Network. Appl. Sci. 2025, 15, 2490. https://doi.org/10.3390/app15052490 Github: https://github.com/wwbchat/minesweeper-applsci-3458345
Built With
- tensorflow
Log in or sign up for Devpost to join the conversation.