Skip to content

This project is a Machine Learning-powered Tic Tac Toe game that uses Q-learning, a reinforcement learning algorithm. It features an intuitive Pygame interface and performance visualisation with Matplotlib. Comprehensive documentation covers development stages and evaluations, making it a practical resource for those interested in machine learning

Notifications You must be signed in to change notification settings

JustDud/AI-Tic-Tac-Toe

Repository files navigation

Machine Learning-Powered Tic Tac Toe Game

Overview

Developed a Tic Tac Toe game featuring an opponent powered by a machine learning algorithm, specifically Q-learning, a type of reinforcement learning. This project demonstrates the practical application of machine learning in game development, providing an interactive experience with a learning-driven opponent.

Features

  • Machine Learning Opponent: Utilizes Q-learning to adapt and improve strategies over time.
  • User-Friendly Interface: Built with Pygame for an engaging graphical user experience.
  • Performance Metrics: Achieves a win rate of over 80% against inexperienced players and a tie rate of approximately 90% against optimal human gameplay.

Installation

  1. Clone the Repository:
    git clone https://github.com/JustDud/AI-Tic-Tac-Toe.git
  2. Navigate to the Project Directory:
    cd AI-Tic-Tac-Toe
  3. Install Dependencies: Ensure you have Python installed. Then, install the required packages:
    pip install -r requirements.txt

Usage

Run the game using the following command:

python main.py

Follow the on-screen instructions to play against the machine learning-powered opponent.

Documentation

Comprehensive documentation is available, detailing development stages, bug fixes, evaluations, stakeholder feedback, and analysis. View the Documentation

Technologies Used

  • Programming Language: Python
  • Libraries: Pygame, NumPy, Matplotlib
  • Machine Learning: Q-learning algorithm

Visual Overview

The following image provides a snapshot of the Tic Tac Toe game in action, including the graphical user interface and a performance graph illustrating the Q-learning algorithm's progress.

Game Screen and Performance Graph

Contributing

Contributions are welcome! Please fork the repository and submit a pull request with your proposed changes. Ensure adherence to the project's coding standards and include relevant tests.

Contact

For inquiries or feedback, feel free to connect with me on LinkedIn.


Keywords: Machine Learning Tic Tac Toe, Q-learning, Reinforcement Learning Game, Python Pygame, Machine Learning Game Development

About

This project is a Machine Learning-powered Tic Tac Toe game that uses Q-learning, a reinforcement learning algorithm. It features an intuitive Pygame interface and performance visualisation with Matplotlib. Comprehensive documentation covers development stages and evaluations, making it a practical resource for those interested in machine learning

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published