lichess.org
Donate

lco.org

Leela Chess Zero

AnalysisChess
Leela Chess Zero (abbrev.: LCZero or lc0) is a free, open-source, and deep neural network (DNN) based chess engine.

Source: Wikipedia & lc0.org

Leela Chess Zero (abbrev.: LCZero or lc0) is a free, open-source, and deep neural network (DNN) based chess engine. It’s developed by Gary Linscott, who also developed the Stockfish chess engine. It claims to be the first chess engine to use self-learning algorithms in order to improve with experience on the same computer hardware. The project is in active development.

A deep neural network (DNN) is an artificial neural network (ANN) with multiple layers between the input and output layers. There are different types of neural networks but they always consist of the same components: neurons, synapses, weights, biases, and functions. These components as a whole function in a way that mimics functions of the human brain, and can be trained like any other ML algorithm.
Leela Chess Zero starts with no intrinsic chess-specific knowledge other than the basic rules of the game. Leela Chess Zero 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 January 2024, Leela Chess Zero has played over 2.2 billion games against itself, playing around 1 million games every day, and is capable of play at a level that is comparable with Stockfish, the leading conventional chess program.

Leela Chess Zero is not considered to be artificial intelligence, as it only makes moves based on how other computers and chess grand masters have played in similar positions. It is entirely driven by algorithms and programs designed by human beings. This is referred to as ‘applied machine learning’.
Applied Machine Learning is the process by which a computer program learns things for itself without being taught to do so. It is a process in which a machine learns by analyzing past data such as recorded data or data that was previously recorded. In order to apply Machine Learning to chess, Leela Chess Zero separates its moves from previous moves made.

Leela Chess Zero is a great chess engine and a great learning tool. It is fairly simple for chess novices to analyze and show its weaknesses.

Nibbler is the graphical user interface (GUI) created specifically for lc0. Nibbler is a real-time analysis GUI for Leela Chess Zero (lc0), which runs Leela in the background and constantly displays opinions about the current position.

Here’s an example of Nibbler showing the 30th move of a game between Leela Chess Zero and Stockfish.

image.png

It shows the next best move is d5 with a 60% winning percentage for the move. However, you can see that there is only a 21% probability it’s the correct move. That’s not very high. It also says, that out of a 1000 games (with the same position) in its database, there was 450 wins, 305 draws, and 245 losses after this move. I’m guessing the 450/1000= 45% win percentage is from playing equal strength chess engines. Not sure how the 60% chance of winning the game compares with the 45%. i.e. what’s the difference?

Nibbler/Leela Chess Zero is a great tool for analyzing games. Here’s a game I played last night, at my local chess club, where my opponent (playing black) could have beat me if he had made the correct move. He had a 92% chance of winning if he did. Unfortunately he didn’t, and he lost. He made the move with the ? instead. It was an en passant pawn capture that I had hoped he would make.

image.png