Skip to content

mp3skater/chessAI

Repository files navigation

❯ Training of an AI using CNN, Residuals, advanced scheduler and optimizer

license last-commit repo-top-language repo-language-count


🔗 Table of Contents


📍 Overview

This project uses Convolutional Neural Networks (CNNs) and advanced deep learning techniques to develop a chess-playing AI. The AI is trained using residual connections, dynamic learning rate schedulers, and cutting-edge optimizers for superior performance and scalability. It can predict optimal moves and simulate gameplay, making for a interesting way to experience chess.


👾 Features

❯ Key highlights of this project include:

  • Integration of Stockfish for generating high-quality training data.
  • Implementation of CNNs with residual layers for deep feature extraction.
  • Support and usage for advanced learning rate scheduling and optimizers.
  • Interactive GUI for playing against the AI.
  • Comprehensive project structure with modular code for scalability.

📁 Project Structure

└── chessAI/
    ├── dup.py
    ├── engine.py
    ├── get_data.py
    ├── images
    │   ├── *.png
    │   ├── new.svg  # logo above
    ├── main.py
    ├── requirements.txt
    ├── training.py
    └── utils.py

📂 File Purpose

training.py ❯ Contains the training loop, dataset structure, and the AI model
dup.py ❯ Checks how many lines are duplicates
utils.py ❯ Some helper functions
get_data.py ❯ Get training data using Stockfish
main.py ❯ Contains GUI loop to play against the AI
engine.py ❯ Handles the logic to load models and return best move
requirements.txt ❯ Requirements for this project

🚀 Getting Started

☑️ Prerequisites

Before getting started with chessAI, ensure your runtime environment meets the following requirements:

  • Programming Language: Python
  • Package Manager: Pip

⚙️ Installation

Install chessAI using one of the following methods:

Build from source:

  1. Clone the chessAI repository:
git clone https://github.com/mp3skater/chessAI.git
  1. Navigate to the project directory:
cd chessAI
  1. Install the project dependencies:

Using pip  

❯ pip install -r requirements.txt

🤖 Usage

Run chessAI using the following command: Using pip  

sh ❯ python main.py


📌 Project Roadmap

  • Task 1: Implement a straightforward chess ai using supervised learning.
  • Task 2: Implement a active learning model.
  • Task 3: Code and test on a large server a MCTS based AI with improvements.

🔰 Contributing

Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your github account.
  2. Clone Locally: Clone the forked repository to your local machine using a git client.
   git clone https://github.com/mp3skater/chessAI
  1. Create a New Branch: Always work on a new branch, giving it a descriptive name.
   git checkout -b new-feature-x
  1. Make Your Changes: Develop and test your changes locally.
  2. Commit Your Changes: Commit with a clear message describing your updates.
   git commit -m 'Implemented new feature x.'
  1. Push to github: Push the changes to your forked repository.
   git push origin new-feature-x
  1. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
  2. Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
Contributor Graph


🎗 License

This project is protected under the MIT-LICENSE License. For more details, refer to the LICENSE file.


🙌 Acknowledgments

  • Credits go out to Scier for his chess AI tutorial where I let myself get some inspiration: video

Releases

No releases published

Packages

No packages published

Languages