IEEE-VIT's Chess Playground. Includes a Chess Engine and some support tools for using it.
CheckMate Machine is a compact toolkit created by IEEE-VIT that combines:
- A lightweight search-based chess engine,
- A demo 2D web UI for playing against the engine,
- A lightweight FastAPI backend that exposes the engine as an HTTP service,
- Vision & preprocessing helpers to take and convert board screenshots into FEN strings.
2DChessBoard: vision / preprocessing pipeline used to convert 2D screenshots into chessboard FEN input.Chess Engine: the engine implementation (board, move generation, minimax search)Demo/Frontend/: simple static demo (HTML, CSS and JS) that renders a board and can play single-player vs the engine.Demo/Backend/: backend FastAPI service that exposes/engine/best_move.
Get the demo running locally in two terminals: backend (engine API) and frontend (static site).
- Create & activate a Python virtual environment (Optional, but recommended)
python -m venv .venv
# Windows
.\\.venv\\Scripts\\activate
# macOS / Linux
source .venv/bin/activate- Install dependencies
pip install -r requirements.txt- Run the backend (FastAPI + engine)
uvicorn Demo.Backend.main:app --reload --host 127.0.0.1 --port 8000- Serve the frontend (static)
# from repo root
python -m http.server 3000 --directory Demo/Frontend
# open http://localhost:3000 in your browserThe backend exposes a single useful endpoint for the demo UI:
- POST
/engine/best_move— request the engine's recommended move.
Request JSON body example:
{
"fen": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w - - 0 1",
"side": "white",
"depth": 2
}Example curl test (from a terminal):
curl -X POST http://127.0.0.1:8000/engine/best_move \\
-H "Content-Type: application/json" \\
-d '{"fen":"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w - - 0 1","depth":2}'Response format (JSON):
{
"from": "e2",
"to": "e4",
"stats": { "nodes_evaluated": 123, "depth": 2 }
}