Giter Site home page Giter Site logo

chessai's Introduction

ChessAI - Chinese Chess Game Analyzer

ChessAI is a groundbreaking tool that brings together computer vision, chess algorithms, and advanced analytics to revolutionize the Chinese Chess analytics landscape. With ChessAI, you don't need expensive electronic boards to analyze your games. Simply use your regular board, set up a camera to capture the position, and let ChessAI do the rest.

  • Main source code: chesssai.
  • Deep Learning / Data Preparation: dnn_models/data_preparation - Currenly only support for Chinese Chess (XiangQi), contact me for the license and the source code of the data preparation tool.
  • Deep Learning / Training: dnn_models/training.

ChessAI

Roadmap

  • Chess position detection.
  • Chess engine integration.
  • Move suggestion.
  • Deep learning model for chess board detection (No need to use ARUCO markers).

Environment setup

  • Requirements: Python 3.9, Conda, Node.js 18+.
  • Clone this repository.
git clone https://github.com/vietanhdev/chessai --recursive
  • Create a new conda environment and the required packages.
conda create -n chessai python=3.9
conda activate chessai
pip install -e .
  • Install Node.js packages and build the frontend.
cd chessai/frontend
npm install
cd ..
bash build_frontend.sh

Build chess engine

  • This project uses godogpaw as the chess engine.
  • Install Go.
  • Build the engine.
cd godogpaw
go build

Run the app

ENGINE_PATH="data/engines/godogpaw-macos-arm" python -m chessai.app --run_app

Replace ENGINE_PATH with the path to the chess engine executable file.

Data preparation & Training

This project uses computer vision and deep learning to detect chess pieces and chess board position.

AI flow for chess position detection:

AI flow for chess position detection

  • Go to dnn_models folder and follow the instructions in the README.md file to prepare the data and train the model.
  • NOTE: Only training source code and pretrained models are included in this repository. The data preparation scripts and the training datset are not included. Contact me for the license and the data.

References

chessai's People

Contributors

vietanhdev avatar

Stargazers

欧阳锋 avatar Alex Tran avatar  avatar Trần Bá Hoàng avatar Lau Van Kiet avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.