Leela Chess Zero
Leela Chess Zero (abbreviated as LCZero, lc0) is a free, open-source, and neural network-based chess engine and distributed computing project. Development has been spearheaded by programmer Gary Linscott, who is also a developer for the Stockfish chess engine. LCZero was adapted from the Leela Zero Go engine, which in turn was based on Google’s AlphaGo Zero project, also to verify the methods in the AlphaZero paper as applied to the game of chess.
Like Leela Zero and AlphaGo Zero, LCZero starts with no intrinsic chess-specific knowledge other than the basic rules of the game. lc0 then learns how to play chess by reinforcement learning from repeated self-play, using a distributed computing network coordinated at the Leela Chess Zero website.
As of 2020, LCZero had played over 300 million games against itself, and is capable of play at a level that is comparable with Stockfish, the leading conventional chess program.
The LCZero project was first announced on TalkChess.com on January 9, 2018. This revealed Leela Chess Zero as the open-source, self-learning chess engine it would come to be known as, with a goal of creating a strong chess engine. Within the first few months of training, LCZero had already reached the Grandmaster level, surpassing the strength of early releases of Rybka, Stockfish, and Komodo, despite evaluating orders of magnitude fewer positions while using MCTS.
In December 2018, the AlphaZero team published a new paper in Science magazine revealing previously undisclosed details of the architecture and training parameters used for AlphaZero. These changes were soon incorporated into Lc0 and increased both its strength and training efficiency.
The work on Leela has informed the similar AobaZero project for shogi.
The engine has been rewritten and carefully iterated upon since its inception, and now runs on multiple backends, allowing it to effectively utilize different types of hardware, both CPU and GPU.
The engine supports the Fischer Random Chess variant, and a network is being trained to test the viability of such a network as of May 2020.
Program and use
The method used by its designers to make LCZero self-learn and play chess at above human level is reinforcement learning. This is a machine-learning algorithm, mirrored from AlphaZero used by the Chess Zero training binary to maximize reward through self-play. As an open-source distributed computing project, volunteer users run Leela Chess Zero to play hundreds of millions of games which are fed to the reinforcement algorithm. In order to contribute to the advancement of the LCZero engine, the latest non-release candidate (non-rc) version of the Engine as well as the Client must be downloaded. The Client is needed to connect to the current server of lc0, where all of the information from the self-play chess games are stored, to obtain the latest network, generate self-play games, and upload the training data back to the server.
In order to play against the lc0 engine on a machine, 2 components are needed: the engine binary, and a network (The engine binary is distinct from the client, in that the client is used as a training platform for the engine). The network contains Leela Chess Zero’s evaluation function that is needed to evaluate positions. Older networks can also be downloaded and used by placing those networks in the folder with the lc0 binary.