/TicTacToeNet

Tic-Tac-Toe AI with Neural Networks

Primary LanguagePython

TicTacToeNet

Description

Neural network-based Tic-Tac-Toe game AI.

Project Structure

  • model/: Contains the pre-trained neural network model and related files.
  • tests/: Includes test cases for the project.
  • tic_tac_toe/: Contains the TicTacToe game logic and board management.
  • utils/: Includes utility functions for move selection and generation.
  • TrainModel.py: Script for training the Tic-Tac-Toe AI model.
  • requirements.txt: Lists the Python packages required to run the project.
  • run_tests.py: Script for running the project's test cases.
  • start_game.py: Main script to play the Tic-Tac-Toe game against the AI.

Getting Started

Prerequisites

Ensure you have Python 3.x installed on your machine. You will also need the required Python packages listed in requirements.txt. CUDA version 12.5 is required for GPU acceleration.

Installation

  1. Clone the repository:

    git clone https://github.com/ozermehmett/TicTacToeNet.git
    cd TicTacToeNet
  2. Install the required packages:

    pip install -r requirements.txt

Running Tests

To run the project's test cases, use:

python run_tests.py

Training the Model

To train the Tic-Tac-Toe AI model, run:

python TrainModel.py

Running the Game

To start playing the game, run:

python start_game.py

Follow the on-screen prompts to make your moves and play against the AI.

Demo

demo.mp4