Skip to content

An AI based on reinforcement learning to play Tic Tac Toe.

Notifications You must be signed in to change notification settings

celinenguyentu/TicTacToeAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TicTacToeAI

An AI based on reinforcement learning using SARSA to play Tic Tac Toe.

The project was to implement the algorithm of an AI capable of learning and playing on a scalable board. However, the graphical interface is still at a rudimentary stage; there's a lot to be improved in the future.

Usage

Requirements

  • You need Python 3.9 to run the program. You can download it from python.org.
  • pip must be installed.

Installation

Git clone this repository :

git clone https://github.com/celinenguyentu/TicTacToeAI && cd TicTacToeAI

Create and activate a virtual environment :

python -m venv env
source env/bin/activate

Install dependencies :

pip install -r requirements.txt

Launch the program :

python TicTacToe.py

Future improvements

  • Allow each player to start the game alternatively.
  • Add a mode to train the AI in order to observe its improvement over time.
  • Add an option to pick the board size, up to a ?x? board.
  • Optimize and enhance the graphical interface.

Releases

No releases published

Packages

No packages published

Languages