https://github.com/dinhanhx/tic-tac-toe-nn
My first project about neural network.
https://github.com/dinhanhx/tic-tac-toe-nn
beginner-friendly keras neural-network python3 tensorflow tic-tac-toe
Last synced: 3 months ago
JSON representation
My first project about neural network.
- Host: GitHub
- URL: https://github.com/dinhanhx/tic-tac-toe-nn
- Owner: dinhanhx
- Created: 2020-10-28T09:26:08.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-10-28T09:27:03.000Z (over 5 years ago)
- Last Synced: 2025-01-28T23:50:01.646Z (over 1 year ago)
- Topics: beginner-friendly, keras, neural-network, python3, tensorflow, tic-tac-toe
- Language: Python
- Homepage:
- Size: 1.7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tic tac toe Neural Network
My first project about neural network.
## Installation
You need `tensorflow`, `keras` and `numpy` on Python 3.
or just `pip install -r req.txt`
## Project structure
```
.
├── smort/ # Smort model
├── TEST_training_history.py # Generated from Simulator.py
├── training_history.py # Generated from Simulator.py
├── Simulator.py # Generate random tic-tac-toe games
├── NeuralNetwork.py # Train Smort by fitting training_history.pkl
├── Test.py # Test Smort with TEST_training_history.pkl
└── PlayWithSmort # You are O, Smort is X. O goes first.
```
## Play with Smort
`py PlayWithSmort.py`
Note that: your input is based on indices of matrix.
## About Smort
Because Smort are trained with X goes first. Therefore, it is good at making X wins.
Given the board at any moment of one game, Smort can predict who will win with accuracy up to 0.70%