Skip to main content

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.

References

Release files for chessai-python 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chessai-python 0.0.2
File Size Uploaded
chessai-python-0.0.2.tar.gz 22.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chessai-python 0.0.2
File Interpreter ABI Platform
chessai_python-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 50.7 kB

Release files / chessai-python-0.0.2.tar.gz

Download URL chessai-python-0.0.2.tar.gz
Size 22.3 kB
Tags Source
SHA-256 checksum
How to use checksums
22ecbcc7877262029641b20319476d6a782cfb9b958a256f334a3023ade5e528
BLAKE2b-256 checksum
How to use checksums
785eea50b4cbddfaf96ed5fa74e41089466873ac3f5a8095d4fa7165cc79dd1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / chessai_python-0.0.2-py3-none-any.whl

Download URL chessai_python-0.0.2-py3-none-any.whl
Size 28.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e02f15319ce7b65dfc47cccd6b9004d8a2e41ca7d0fa41bd7d294eb7c6e0820
BLAKE2b-256 checksum
How to use checksums
7881d9fb9df8fa92dc446ecbbf3431e03038a9ca383c97766a80d561f1b8c4eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page