Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/ukjin1192/tensorflow-minesweeper

Proof of concept for using TensorFlow to improve AI at this Minesweeper game
https://github.com/ukjin1192/tensorflow-minesweeper

machine-learning minesweeper-game tensorflow tensorflow-experiments

Last synced: 4 months ago
JSON representation

Proof of concept for using TensorFlow to improve AI at this Minesweeper game

Awesome Lists containing this project

README

        

## Summary

- 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

## Procedure

- 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
- Training sets
- Method
- Supervised Learning
- Logistic classification
- Optimization
- Data initialization
- Learning rate = 0.1
- Test sets : Measure accuracy of model

## Prerequisite

- Python 3
- Numpy
- TensorFlow

## Command

~~~~
$ python3 ai.py
~~~~

## Result

- Collect data with 1000 games
- 2000 training sets
- (With test sets) Accuracy ~= 87(%)