There are three parts to this project:
- Neural network model for evaluating positions (litechess-model)
- Chess engine backend that makes moves after positions are evaluated (litechess-engine-backend)
- Litechess Website that hosts the chess engine (litechess-website)
The litechess model is based on the DeepChess neural network model that has two parts :
- An autoencoder for identifying features relevant to position evaluation
- A Siamese network that evaluates positions
The autoencoder can be a vanilla autoencoder, or can be trained using self-supervision methods. We propose two methods:
- Removing Pieces Approach
- Evaluation Score Regression
The code for both has been included in the litechess-model folder.
The litechess engine backend is a modified version of Sunfish's chess engine backend. Sunfish is a popular chess engine written in Python whose evaluation function is a simple piece-square mapping. We change this evaluation function to our litechess neural network.
The litechess website is developed in Next.JS (a React JS framework) and has several features that make it interactive and suitable for both beginners and professionals:
- Playing a game from the starting position
- Playing a game from a position provided by the user (in theform of a FEN string)
- Drawing arrows on the board in order to aid play
- Download played game (as a PGN file).
The website is deployed on Vercel, a serverless platform that makes it convenient to serve Next.JS projects in a highly efficient and scalable manner.