- Proof of concept for using TensorFlow to improve AI at this Minesweeper game
- Mission : Improve accuracy(=predictive power) when AI should sweep or flag random cell with given condition
- Create map randomly
- Sweep empty block for the first time
- Sweep or flag cells if AI could sweep or flag certain cell with given condition
- Collect data when AI should sweep or flag random cell with given condition
- Target
- Unrevealed cell which has at least one revealed number cell(=not empty or mine) around
- X data
- Sum of probabilities
- Number of revealed mines around
- Number of revealed cells around
- Number of unrevealed cell around
- Y data
- 0 or 1 (Mine exists or not)
- Repeat above procedure many times to get enough data
- Target
- Training sets
- Method
- Supervised Learning
- Logistic classification
- Supervised Learning
- Optimization - Data initialization - Learning rate = 0.1
- Method
- Test sets : Measure accuracy of model
- Python 3
- Numpy
- TensorFlow
$ python3 ai.py
- Collect data with 1000 games
- 2000 training sets
- (With test sets) Accuracy ~= 87(%)