Skip to content

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

Notifications You must be signed in to change notification settings

ukjin1192/TensorFlow-MineSweeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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(%)

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages