Leela Chess Zero

{{Short description|Deep neural network-based chess engine}}

{{Redirect|Lc0|other topics|LC0 (disambiguation){{!}}LC0}}

{{Infobox software

| name = Leela Chess Zero

| title =

| logo = Leela Chess Zero logo.svg

| logo caption =

| logo_size =

| logo_alt =

| screenshot =

| caption =

| screenshot_size =

| screenshot_alt =

| collapsible =

| author = Gian-Carlo Pascutto, Gary Linscott

| developer = Gary Linscott, Alexander Lyashuk, Folkert Huizinga, others

| released = {{Start date and age|2018|01|09|df=yes}}

| discontinued =

| latest release version = v0.31.2

| latest release date = {{Start date and age|2024|10|21|df=yes}}

| latest preview version =

| latest preview date =

| programming language = C++

| operating system = Windows, Mac, Linux, Ubuntu, Android

| platform =

| size =

| language =

| language count =

| language footnote =

| genre = Chess engine

| license = GPL-3.0-or-later

| alexa =

| website = {{URL|https://lczero.org}}

| standard =

| AsOf =

}}

{{Chess programming series}}

Leela Chess Zero (abbreviated as LCZero, lc0) is a free, open-source chess engine and volunteer computing project based on Google's AlphaZero engine. It was spearheaded by Gary Linscott, a developer for the Stockfish chess engine, and adapted from the Leela Zero Go engine.{{cite web|url=https://lczero.org/?full_elo=1|title=Leela Chess Zero: Full Elo Graph|date=7 March 2019|website=Lczero.org|accessdate=7 March 2019|archive-date=15 March 2023|archive-url=https://web.archive.org/web/20230315004544/https://lczero.org/?full_elo=1|url-status=live}}

Like Leela Zero and AlphaGo Zero, early iterations of Leela Chess Zero started with no intrinsic chess-specific knowledge other than the basic rules of the game. It learned how to play chess through reinforcement learning from repeated self-play, using a distributed computing network coordinated at the Leela Chess Zero website. However, as of November 2024 most models used by the engine are trained through supervised learning on data generated by previous reinforcement learning runs.

{{as of|2024|06}}, Leela Chess Zero has played over 2.5 billion games against itself, playing around 1 million games every day,{{Cite web|last=|first=|date=|title=LCZero|url=https://training.lczero.org/|access-date=2022-01-13|website=lczero.org|archive-date=2023-09-08|archive-url=https://web.archive.org/web/20230908172055/http://training.lczero.org/|url-status=live}} and is capable of play at a level that is comparable with Stockfish, the leading conventional chess program.{{Cite web|url=https://www.chess.com/news/view/lc0-wins-computer-chess-championship-makes-history|title=Lc0 Wins Computer Chess Championship, Makes History|website=Chess.com|date=17 April 2019|language=en-US|access-date=2019-05-29|archive-date=2020-11-07|archive-url=https://web.archive.org/web/20201107235909/https://www.chess.com/news/view/lc0-wins-computer-chess-championship-makes-history|url-status=live}}{{Cite web|url=https://www.chess.com/news/view/computer-chess-championship-9-stockfish-lc0|title=Stockfish Strikes Back, Tops Lc0 In Computer Chess Championship|last=Pete (pete)|website=Chess.com|date=24 May 2019|language=en-US|access-date=2019-05-29|archive-date=2019-05-25|archive-url=https://web.archive.org/web/20190525015326/https://www.chess.com/news/view/computer-chess-championship-9-stockfish-lc0|url-status=live}}

History

The Leela Chess Zero project was first announced on TalkChess.com on January 9, 2018, as an open-source, self-learning chess engine attempting to recreate the success of AlphaZero.{{cite web |title=Announcing lczero |url=http://www.talkchess.com/forum3/viewtopic.php?t=66280 |website=TalkChess.com |accessdate=11 June 2018 |archive-date=12 June 2018 |archive-url=https://web.archive.org/web/20180612140624/http://www.talkchess.com/forum3/viewtopic.php?t=66280 |url-status=live }}{{Cite web|url=http://www.talkchess.com/forum3/viewtopic.php?t=66280|title=Announcing lczero - TalkChess.com|website=www.talkchess.com|access-date=2019-03-21|archive-date=2018-06-12|archive-url=https://web.archive.org/web/20180612140624/http://www.talkchess.com/forum3/viewtopic.php?t=66280|url-status=live}} Within the first few months of training, Leela Chess Zero had already reached the Grandmaster level, surpassing the strength of early releases of Rybka, Stockfish, and Komodo, despite evaluating orders of magnitude fewer positions due to the size of the deep neural network it uses as its evaluation function.

In December 2018, the AlphaZero team published a paper in Science magazine revealing previously undisclosed details of the architecture and training parameters used for AlphaZero.{{cite journal |last1=Silver |first1=David |last2=Hubert |first2=Thomas |last3=Schrittwieser |first3=Julian |last4=Antonoglou |first4=Ioannis |last5=Lai |first5=Matthew |last6=Guez |first6=Arthur |last7=Lanctot |first7=Marc |last8=Sifre |first8=Laurent |last9=Kumaran |first9=Dharshan |last10=Graepel |first10=Thore |last11=Lillicrap |first11=Timothy |last12=Simonyan |first12=Karen |last13=Hassabis |first13=Demis |title=A general reinforcement learning algorithm that masters chess, shogi, and Go through self-play |journal=Science |date=6 December 2018 |volume=362 |issue=6419 |pages=1140–1144 |doi=10.1126/science.aar6404 |pmid=30523106 |bibcode=2018Sci...362.1140S |s2cid=54457125 |display-authors=3 |url=http://discovery.ucl.ac.uk/10069050/1/alphazero_preprint.pdf |doi-access=free |access-date=1 September 2019 |archive-date=1 September 2019 |archive-url=https://web.archive.org/web/20190901220135/http://discovery.ucl.ac.uk/10069050/1/alphazero_preprint.pdf |url-status=live }} These changes were soon incorporated into Leela Chess Zero and increased both its strength and training efficiency.{{cite web|url=https://blog.lczero.org/2018/12/alphazero-paper-and-lc0-v0191.html|title=AlphaZero paper, and Lc0 v0.19.1|last=|first=|date=7 December 2018|website=|accessdate=14 February 2019|archive-date=14 February 2019|archive-url=https://web.archive.org/web/20190214233533/http://blog.lczero.org/2018/12/alphazero-paper-and-lc0-v0191.html|url-status=live}}

Work on Leela Chess Zero has informed the AobaZero project for shogi.{{cite web|last=Kobayashi|first=Yuki|title=GitHub – kobanium/aobazero: Aoba Zero.|website=GitHub |date=2019-09-15|url=https://github.com/kobanium/aobazero|access-date=2019-09-25|archive-date=2020-06-27|archive-url=https://web.archive.org/web/20200627111627/https://github.com/kobanium/aobazero|url-status=live}}

The engine has been rewritten and carefully iterated upon since its inception, and since 2019{{cite web |url=https://lczero.org/blog/2019/04/backend-configuration/ |title=Backend configuration |author= |date=2019-04-17 |website=lczero.org |access-date=2024-07-20}} has run on multiple backends, allowing it to run on both CPU and GPU.{{cite web|url=https://github.com/LeelaChessZero/lc0|title=leela-chess-zero|publisher=GitHub|date=|accessdate=11 May 2020|archive-date=18 April 2020|archive-url=https://web.archive.org/web/20200418150729/https://github.com/LeelaChessZero/lc0|url-status=live}}

The engine can be configured to use different weights,{{cite web |url=https://lczero.org/dev/wiki/getting-started/ |title=Getting Started |author= |website=lczero.org |access-date=2024-07-20}} including even different architectures. This same mechanism of substitutable weights can also be used for alternative chess rules, such as for the Fischer Random Chess variant, which was done in 2019.{{cite web |url=https://github.com/LeelaChessZero/lc0/issues/1009 |title=Selfplay outputs chess960 "capture rook" moves |author= |date=2019-11-18 |website=github.com |access-date=2024-07-20}}

Neural network

File:Lc0 attention maps.png

Like AlphaZero, Leela Chess Zero employs neural networks which output both a policy vector, a distribution over subsequent moves used to guide search, and a position evaluation. These neural networks are designed to run on GPU, unlike traditional engines. It originally used residual neural networks, but in 2022 switched to using a transformer-based architecture designed by Daniel Monroe and Philip Chalmers.{{cite arXiv |eprint=2409.12272 |last1=Monroe |first1=Daniel |last2=Chalmers |first2=Philip A. |title=Mastering Chess with a Transformer Model |date=2024 |class=cs.LG }} These models represent a chessboard as a sequence of 64 tokens and apply a trunk consisting of a stack of Post-LN encoder layers, outputting a sequence of 64 encoded tokens which is used to generate a position evaluation and a distribution over subsequent moves.{{cite web |author= |date=2024-02-28 |title=Transformer Progress |url=https://lczero.org/blog/2024/02/transformer-progress/ |access-date=2024-07-20 |website=lczero.org}} They use a custom domain-specific position encoding called smolgen to improve the self-attention layer.

As of November 2024, the models used by the engine are significantly larger and more efficient than the residual network used by AlphaZero, reportedly achieving grandmaster-level strength at one position evaluation per move.{{Cite web |title=How well do Lc0 networks compare to the greatest transformer network from DeepMind? - Leela Chess Zero |url=https://lczero.org/blog/2024/02/how-well-do-lc0-networks-compare-to-the-greatest-transformer-network-from-deepmind/ |access-date=2024-11-29 |website=lczero.org}} These models are able to detect and exploit positional features like trapped pieces and fortresses to outmaneuver traditional engines, giving Leela a unique playstyle. There is also evidence that they are able to perform look-ahead.{{cite arXiv |eprint=2406.00877 |last1=Jenner |first1=Erik |last2=Kapur |first2=Shreyas |last3=Georgiev |first3=Vasil |last4=Allen |first4=Cameron |last5=Emmons |first5=Scott |last6=Russell |first6=Stuart |title=Evidence of Learned Look-Ahead in a Chess-Playing Neural Network |date=2024 |class=cs.LG }}

Program and use

Like AlphaZero, Leela Chess Zero learns through reinforcement learning, continually training on data generated through self-play. However, unlike AlphaZero, Leela Chess Zero decentralizes its data generation through distributed computing, with volunteers generating self-play data on local hardware which is fed to the reinforcement algorithm. In order to contribute training games, volunteers must download the latest non-release candidate (non-rc) version of the engine and the client. The client connects to the Leela Chess Zero server and iteratively receives the latest neural network version and produces self-play games which are sent back to the server and use to train the network.{{cite web|title=The rewritten engine, originally for tensorflow. Now all other backends have been ported here.: LeelaChessZero/lc0|date=2019-03-20|url=https://github.com/LeelaChessZero/lc0|publisher=LCZero|access-date=2019-03-21}}

In order to run the Leela Chess Zero engine, two components are needed: the engine binary used to perform search, and a network used to evaluate positions. The client, which is used to contribute training data to the project, is not needed for this purpose. Older networks can also be downloaded and used by placing those networks in the folder with the Lc0 binary.

Spinoffs

In season 15 of the Top Chess Engine Championship, the engine AllieStein competed alongside Leela. AllieStein is a combination of two different spinoffs from Leela: Allie, which uses the same neural network as Leela, but has a unique search algorithm for exploring different lines of play, and Stein, a network which was trained using supervised learning on existing game data from games between other engines. While neither of these projects were admitted to TCEC separately due to their similarity to Leela, the combination of Allie's search algorithm with the Stein network, called AllieStein, was deemed unique enough to warrant its inclusion in the competition.{{efn|TCEC rules require that a neural network-based engine has at least two unique components out of three essential features: The code that trains a network, the network itself, and the search algorithm. While AllieStein uses the same code to train its network as Lc0, since the other two components are fresh, AllieStein is considered a distinct engine.}}{{cite web |title=Allie+Stein, the new neural network based engine entering TCEC S15 |date=2 March 2019 |url=http://www.chessdom.com/alliestein-the-new-neural-network-entering-tcec-s15/ |access-date=17 April 2020 |archive-date=27 February 2020 |archive-url=https://web.archive.org/web/20200227181911/http://www.chessdom.com/alliestein-the-new-neural-network-entering-tcec-s15/ |url-status=live }}{{Cite web |date=2025-03-26 |title=TCEC Season 16 Rules - TCEC wiki |url=https://wiki.chessdom.org/TCEC_Season_16_Rules |access-date=2025-03-26 |archive-url=https://web.archive.org/web/20250326175135/https://wiki.chessdom.org/TCEC_Season_16_Rules |archive-date=2025-03-26}}

In early 2021, the LcZero blog announced [https://github.com/dje-dev/Ceres Ceres], a transliteration of the engine to C Sharp which introduced several algorithmic improvements. The engine has performed competitively in tournaments, achieving third place in the TCEC Swiss 7 and fourth place in the TCEC Cup 4. In 2024, the [https://github.com/dje-dev/CeresTrain CeresTrain] framework was announced to support training deep neural networks for chess in PyTorch.

Competition results

In April 2018, Leela Chess Zero became the first engine using a deep neural network to enter the Top Chess Engine Championship (TCEC), during Season 12 in the lowest division, Division 4.{{cite web|url=http://www.chessdom.com/breaking-leela-chess-zero-enters-tcec-season-12/|title=Breaking: Leela Chess Zero enters TCEC Season 12|publisher=Chessdom|date=18 April 2018|access-date=11 June 2018|archive-date=10 July 2018|archive-url=https://web.archive.org/web/20180710094845/http://www.chessdom.com/breaking-leela-chess-zero-enters-tcec-season-12/|url-status=live}} Out of 28 games, it won one, drew two, and lost the remainder; its sole victory came from a position in which its opponent, Scorpio 2.82, crashed in three moves.{{Cite web |title=Seasons 1-14 and TEC Cup 1-2 database |url=http://legacy-tcec.chessdom.com:80/archive.php |url-status=dead |archive-url=https://web.archive.org/web/20191207183205/http://legacy-tcec.chessdom.com:80/archive.php |archive-date=2019-12-07 |access-date=2022-11-26 |website=TEC Legacy. Chessdom}} However, it improved quickly. In July 2018, Leela placed seventh out of eight competitors at the 2018 World Computer Chess Championship.{{cite web|url=http://icga.org/pairing/wccc2018/|title=World Computer Chess Championship 2018|publisher=ICGA|accessdate=19 July 2018|archive-date=27 June 2020|archive-url=https://web.archive.org/web/20200627111627/http://icga.org/pairing/wccc2018/|url-status=live}} In August 2018, it won division 4 of TCEC season 13 with a record of 14 wins, 12 draws, and 2 losses.{{Cite web|url=http://www.chessdom.com/leela-chess-zero-wins-the-gold-medal-in-tcec-div-4/|title=Leela Chess Zero wins the gold medal in TCEC Div 4 {{!}} Chessdom|date=11 August 2018|language=en-US|access-date=2019-03-21|archive-date=2019-03-21|archive-url=https://web.archive.org/web/20190321042047/http://www.chessdom.com/leela-chess-zero-wins-the-gold-medal-in-tcec-div-4/|url-status=live}} In Division 3, Leela scored 16/28 points, finishing third behind Ethereal, which scored 22.5/28 points, and Arasan on tiebreak.{{Cite web|url=http://www.chessdom.com/ethereal-chess-engine-wins-the-gold-at-tcec-div-3/|title=Ethereal chess engine wins the gold at TCEC Div 3 {{!}} Chessdom|date=17 August 2018 |language=en-US|access-date=2019-03-21}}

By September 2018, Leela had become competitive with the strongest engines in the world. In the 2018 Chess.com Computer Chess Championship (CCCC),{{Cite web|url=https://www.chess.com/computer-chess-championship|title=Computer Chess Championship with Top Engines|website=Chess.com|access-date=2018-09-08|archive-date=2018-11-02|archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship|url-status=live}} Leela placed fifth out of 24 entrants. The top eight engines advanced to round 2, where Leela placed fourth.{{cite web |title=CCCC stage 2 ended. Leela 4th with a good performance! Stockfish undefeated! |url=http://blog.lczero.org/2018/09/cccc-stage-2-ended-leela-4th-with-good.html |website=LCZero Blog |accessdate=26 September 2018 |date=26 September 2018 |archive-date=27 September 2018 |archive-url=https://web.archive.org/web/20180927005759/http://blog.lczero.org/2018/09/cccc-stage-2-ended-leela-4th-with-good.html |url-status=live }}{{cite web |last1=Cilento |first1=Pete |title=Stockfish, Houdini Battle For Computer Chess Championship; Komodo vs Lc0 For 3rd |url=https://www.chess.com/news/view/stockfish-houdini-to-battle-for-computer-chess-championship-komodo-vs-lc0-for-3rd |website=Chess.com |accessdate=9 October 2018 |date=26 September 2018 |archive-date=9 October 2018 |archive-url=https://web.archive.org/web/20181009211733/https://www.chess.com/news/view/stockfish-houdini-to-battle-for-computer-chess-championship-komodo-vs-lc0-for-3rd |url-status=live }} Leela then won the 30-game match against Komodo to secure third place in the tournament.{{cite web |title=Leela wins the match series against Komodo and wins a Pawn odds game against Stockfish! |url=http://blog.lczero.org/2018/10/leela-wins-match-series-against-komodo.html |website=LCZero Blog |accessdate=9 October 2018 |date=3 October 2018 |archive-date=9 October 2018 |archive-url=https://web.archive.org/web/20181009172157/http://blog.lczero.org/2018/10/leela-wins-match-series-against-komodo.html |url-status=live }}{{cite web |last1=Cilento |first1=Pete |title=Stockfish Wins Computer Chess Championship Rapid; Lc0 Finishes 3rd |url=https://www.chess.com/news/view/stockfish-wins-computer-chess-championship-rapid-lc0-finishes-3rd-3887 |website=Chess.com |accessdate=9 October 2018 |date=4 October 2018 |archive-date=6 October 2018 |archive-url=https://web.archive.org/web/20181006195513/https://www.chess.com/news/view/stockfish-wins-computer-chess-championship-rapid-lc0-finishes-3rd-3887 |url-status=live }} Leela participated in the "TCEC Cup", an event in which engines from different TCEC divisions can play matches against one another. Leela defeated higher-division engines Laser, Ethereal and Fire before finally being eliminated by Stockfish in the semi-finals.

In October and November 2018, Leela participated in the Chess.com Computer Chess Championship Blitz Battle, finishing third behind Stockfish and Komodo.{{cite web |last1=Cilento |first1=Pete |date=19 November 2018 |title=Stockfish Wins Computer Chess Championship Blitz |url=https://www.chess.com/news/view/stockfish-wins-computer-chess-championship-blitz |url-status=live |archive-url=https://web.archive.org/web/20181122132147/https://www.chess.com/news/view/stockfish-wins-computer-chess-championship-blitz |archive-date=22 November 2018 |accessdate=22 November 2018 |website=Chess.com}}{{cite web |last1=Cilento |first1=Pete |title=Computer Chess Championship Returns For Blitz Battle |url=https://www.chess.com/news/view/computer-chess-championship-returns-for-blitz-battle |website=Chess.com |accessdate=22 November 2018 |date=11 October 2018 |archive-date=22 November 2018 |archive-url=https://web.archive.org/web/20181122132047/https://www.chess.com/news/view/computer-chess-championship-returns-for-blitz-battle |url-status=live }}

In December 2018, Leela participated in Season 14 of the Top Chess Engine Championship. Leela dominated divisions 3, 2, and 1, easily finishing first in all of them. In the premier division, Stockfish dominated while Houdini, Komodo and Leela competed for second place. It came down to a final-round game where Leela needed to hold Stockfish to a draw with black to finish second ahead of Komodo. Leela managed this and therefore met Stockfish in the superfinal. In a back and forth match, first Stockfish and then Leela took three game leads before Stockfish won by the narrow margin of 50.5–49.5.

In February 2019, Leela scored its first major tournament win when it defeated Houdini in the final of the second TCEC cup. Leela did not lose a game the entire tournament.{{cite web |title=Leela won the TCEC CUP! |url=http://blog.lczero.org/2019/02/leela-won-tcec-cup.html |website=LCZero Blog |date=4 February 2019 |accessdate=12 February 2019 |archive-date=12 February 2019 |archive-url=https://web.archive.org/web/20190212070730/http://blog.lczero.org/2019/02/leela-won-tcec-cup.html |url-status=live }} In April 2019, Leela won the Chess.com Computer Chess Championship 7: Blitz Bonanza, becoming the first neural-network project to take the title.

In the season 15 of the Top Chess Engine Championship (May 2019), Leela defended its TCEC Cup title, this time defeating Stockfish with a score of 5.5–4.5 (+2 =7 −1) in the final after Stockfish blundered a seven-man tablebase draw.{{Cite web |title=TCEC Cup 3 - Final game statistics |url=https://www.tcec-chess.com/archive.html?season=cup3&round=fl&game=9 |access-date=2022-11-26 |website=TCEC}} Leela also won the Superfinal for the first time, scoring 53.5–46.5 (+14 −7 =79) versus Stockfish, including winning as both white and black in the same predetermined opening in games 61 and 62.{{cite web |title=Lc0 won TCEC 15 |url=https://blog.lczero.org/2019/05/lc0-won-tcec-15.html |website=LCZero Blog |date=28 May 2019 |accessdate=28 May 2019 |archive-date=28 May 2019 |archive-url=https://web.archive.org/web/20190528132815/https://blog.lczero.org/2019/05/lc0-won-tcec-15.html |url-status=live }}{{cite web |last1=Högy |first1=Kevin |title=A new age in computer chess? Lc0 beats Stockfish! |url=https://chess24.com/en/read/news/a-new-age-in-computer-chess-leela-beats-stockfish |website=chess24 |accessdate=25 June 2019 |date=2 June 2019 |archive-date=8 June 2019 |archive-url=https://web.archive.org/web/20190608084305/https://chess24.com/en/read/news/a-new-age-in-computer-chess-leela-beats-stockfish |url-status=live }}

Season 16 of TCEC saw Leela finish in third place in premier division, missing qualification for the Superfinal to Stockfish and the new deep neural network engine AllieStein. Leela was the only engine not to suffer any losses in the Premier division, and defeated Stockfish in one of the six games they played. However, Leela only managed to score nine wins, while AllieStein and Stockfish both scored 14 wins. This inability to defeat weaker engines led to Leela finishing third, half a point behind AllieStein and a point behind Stockfish.{{cite web|url=https://www.tcec-chess.com/archive.html?season=16&div=p&game=1|title=Season 16, Div P archive|accessdate=30 September 2019|archive-date=27 June 2020|archive-url=https://web.archive.org/web/20200627111638/https://www.tcec-chess.com/archive.html?season=16&div=p&game=1|url-status=live}} In the fourth TCEC Cup, Leela was seeded first as the defending champion, which placed it on the opposite half of the brackets as AllieStein and Stockfish. Leela was able to qualify for the finals, where it faced Stockfish. After seven draws, Stockfish won the eighth game to win the match.{{cite web|url=https://www.tcec-chess.com/archive.html?season=cup4&round=fl&game=1|title=TCEC Cup 4 archive|accessdate=18 November 2019|archive-date=3 March 2020|archive-url=https://web.archive.org/web/20200303133527/https://www.tcec-chess.com/archive.html?season=cup4&round=fl&game=1|url-status=live}}

In Season 17 of TCEC, held in January–April 2020, Leela regained the championship by defeating Stockfish 52.5–47.5, scoring a remarkable six wins in the final ten games, including winning as both white and black in the same predetermined opening in games 95 and 96.{{Cite web|url=https://lczero.org/blog/2020/04/tcec-s17-super-final-report/|title=TCEC S17 SUper FInal report - Leela Chess Zero|website=lczero.org|access-date=2020-05-30|archive-date=2020-05-16|archive-url=https://web.archive.org/web/20200516120841/http://lczero.org/blog/2020/04/tcec-s17-super-final-report/|url-status=live}} It qualified for the superfinal again in Season 18, but this time was defeated by Stockfish 53.5–46.5.{{cite web|url=https://tcec-chess.com/#div=sf&game=1&season=18|title=TCEC Season 18 archive|accessdate=3 July 2020|archive-date=4 September 2019|archive-url=https://web.archive.org/web/20190904093219/https://tcec-chess.com/#div=sf&game=1&season=18|url-status=live}} In the TCEC Cup 6 final, Leela lost to AllieStein, finishing second.{{cite web |title=TCEC Cup 6 Final |url=https://tcec-chess.com/#game=7&round=fl&season=cup6 |website=TCEC Chess |accessdate=23 July 2020 |archive-date=4 September 2019 |archive-url=https://web.archive.org/web/20190904093219/https://tcec-chess.com/#game=7&round=fl&season=cup6 |url-status=live }}

Season 19 of TCEC saw Leela qualify for the Superfinal again. This time it played against a new Stockfish version with support for NNUE, a shallow neural network–based evaluation function used primarily for the leaf nodes of the search tree. Stockfish NNUE defeated Leela convincingly with a final score of 54.5–45.5 (+18 −9 =73).{{cite web|url=https://www.tcec-chess.com/archive.html?season=19&div=sf&game=100|title=Season 19, Div SF archive|accessdate=19 October 2020}}{{cite web |title=Stockfish 12 |url=https://blog.stockfishchess.org/post/628172810852925440/stockfish-12 |website=Stockfish Blog |accessdate=19 October 2020 |archive-date=26 November 2020 |archive-url=https://web.archive.org/web/20201126043410/https://blog.stockfishchess.org/post/628172810852925440/stockfish-12 |url-status=live }} Since then, Leela has repeatedly qualified for the Superfinal, only to lose every time to Stockfish: +14 −8 =78 in Season 20, +19 −7 =74 in Season 21, +27 −10 =63 in Season 23, +20 −16 =64 in Season 24, +27 -23 =50 in Season 25, +31 -17 =52 in Season 26, and +35 -18 =47 in Season 27.

Since the introduction of NNUE to Stockfish, Leela has scored victories at the TCEC Swiss 6 and 7 and the TCEC Cup 11, and is usually a close second behind Stockfish in major tournaments.

=Results summary=

class="wikitable"

|+Top Chess Engine Championship (TCEC){{Cite web|url=https://www.tcec-chess.com/archive.html|title=TCEC – Live Chess Broadcast|access-date=2019-09-23|archive-date=2019-09-23|archive-url=https://web.archive.org/web/20190923183048/https://www.tcec-chess.com/archive.html|url-status=live}}

SeasonDivision 4Division 3Division 2Division 1Division PInfrafinalSuperfinal
12 (2018)8th
13 (2018)1st3rd
14 (2018)1st1st1st2ndstyle="background:#DFDFDF;"|2nd
15 (2019)2ndstyle="background:#FFFFBF;"|1st
16 (2019)style="background:#FFDF9F;"|3rd
17 (2020)1ststyle="background:#FFFFBF;"|1st
18 (2020)2ndstyle="background:#DFDFDF;"|2nd
19 (2020)2ndstyle="background:#DFDFDF;"|2nd
20 (2020)1ststyle="background:#DFDFDF;"|2nd
21 (2021)2ndstyle="background:#DFDFDF;"|2nd
22 (2022)3rdstyle="background:#FFDF9F;"|3rd
23 (2022)2ndstyle="background:#DFDFDF;"|2nd
24 (2023)2ndstyle="background:#DFDFDF;"|2nd
25 (2023)2ndstyle="background:#DFDFDF;"|2nd
26 (2024)2ndstyle="background:#DFDFDF;"|2nd

class="wikitable"

|+Top Chess Engine Championship Cup (TCEC Cup)

EventResultOpponentScore
Cup 1 (2018)style="background:#FFDF9F;"|3rd-
Cup 2 (2019)style="background:#FFFFBF;"|1stHoudini4.5–3.5
Cup 3 (2019)style="background:#FFFFBF;"|1stStockfish5.5–4.5
Cup 4 (2019)style="background:#DFDFDF;"|2ndStockfish3.5–4.5
Cup 5 (2020)style="background:#DFDFDF;"|2ndStockfish1.5–2.5
Cup 6 (2020)style="background:#DFDFDF;"|2ndAllieStein1.5–2.5
Cup 7 (2020)style="background:#DFDFDF;"|2ndStockfish1.5–2.5
Cup 8 (2021)style="background:#DFDFDF;"|2ndStockfish3.5–4.5
Cup 9 (2021)style="background:#DFDFDF;"|2ndStockfish1.5–2.5
Cup 10 (2022)style="background:#DFDFDF;"|2ndStockfish4–6
Cup 11 (2023)style="background:#FFFFBF;"|1stStockfish8.5–7.5
Cup 12 (2023)style="background:#DFDFDF;"|2ndStockfish13.5–14.5
Cup 13 (2024)style="background:#DFDFDF;"|2ndStockfish12.5–9.5
Cup 14 (2024)style="background:#DFDFDF;"|2ndStockfish18.5-17.5

class="wikitable"

|+Chess.com Computer Chess Championship (CCC)

EventYearTime ControlsResultRef
CCC 1: Rapid Rumble201815+5style="background:#FFDF9F;"|3rd{{Cite web|url=https://www.chess.com/news/view/stockfish-wins-computer-chess-championship-rapid-lc0-finishes-3rd-3887|title=Stockfish Wins Computer Chess Championship Rapid; Lc0 Finishes 3rd|last=Cilento|first=Pete|website=Chess.com|date=4 October 2018|language=en-US|access-date=2019-06-20|archive-date=2018-10-06|archive-url=https://web.archive.org/web/20181006195513/https://www.chess.com/news/view/stockfish-wins-computer-chess-championship-rapid-lc0-finishes-3rd-3887|url-status=live}}
CCC 2: Blitz Battle20185+2style="background:#FFDF9F;"|3rd{{Cite web|url=https://www.chess.com/news/view/stockfish-wins-computer-chess-championship-blitz|title=Stockfish Wins Computer Chess Championship Blitz|last=Cilento|first=Pete|website=Chess.com|date=20 November 2018|language=en-US|access-date=2019-06-20|archive-date=2018-11-22|archive-url=https://web.archive.org/web/20181122132147/https://www.chess.com/news/view/stockfish-wins-computer-chess-championship-blitz|url-status=live}}
CCC 3: Rapid Redux201930+5style="background:#DFDFDF;"|2nd{{Cite web|url=https://www.chess.com/news/view/stockfish-wins-rapid-computer-championship-over-lc0-bullet-chess-next|title=Stockfish Wins Rapid Computer Championship Over Lc0; Bullet Chess Next|last=Cilento|first=Pete|website=Chess.com|date=22 January 2019|language=en-US|access-date=2019-06-20|archive-date=2020-11-07|archive-url=https://web.archive.org/web/20201107232203/https://www.chess.com/news/view/stockfish-wins-rapid-computer-championship-over-lc0-bullet-chess-next|url-status=live}}
CCC 4: Bullet Brawl20191+2style="background:#DFDFDF;"|2nd{{Cite web|url=https://www.chess.com/news/view/stockfish-wins-computer-chess-championship-bullet-escalation-next|title=Stockfish Wins Computer Chess Championship Bullet; 'Escalation' Next|last=Cilento|first=Pete|website=Chess.com|date=31 January 2019|language=en-US|access-date=2019-06-20|archive-date=2021-01-19|archive-url=https://web.archive.org/web/20210119100056/https://www.chess.com/news/view/stockfish-wins-computer-chess-championship-bullet-escalation-next|url-status=live}}
CCC 5: Escalation201910+5style="background:#DFDFDF;"|2nd{{Cite web |date=2019-02-08 |title=CCC 5: Finals (10{{!}}5) |url=https://cccfiles.chess.com/archive/tournament-18208.pgn |url-status=live |archive-url=https://web.archive.org/web/20221210142509/https://cccfiles.chess.com/archive/tournament-18208.pgn |archive-date=2022-12-10 |access-date=2024-06-15 |website=Chess.com}}
CCC 6: Winter Classic201910+10style="background:#DFDFDF;"|2nd{{Cite web|url=https://www.chess.com/news/view/computer-chess-championship-playing-blitz-after-stockfish-defends-title|title=Computer Chess Championship Plays Blitz After Stockfish Defends Title|last=Cilento|first=Pete|website=Chess.com|date=20 March 2019|language=en-US|access-date=2019-06-20|archive-date=2020-11-11|archive-url=https://web.archive.org/web/20201111185502/https://www.chess.com/news/view/computer-chess-championship-playing-blitz-after-stockfish-defends-title|url-status=live}}
CCC 7: Blitz Bonanza20195+2style="background:#FFFFBF;"|1st{{cite web |last1=Cilento |first1=Pete |title=Lc0 Wins Computer Chess Championship, Makes History |url=https://www.chess.com/news/view/lc0-wins-computer-chess-championship-makes-history |website=Chess.com |accessdate=18 April 2019 |date=17 April 2019 |archive-date=7 November 2020 |archive-url=https://web.archive.org/web/20201107235909/https://www.chess.com/news/view/lc0-wins-computer-chess-championship-makes-history |url-status=live }}
CCC 8: Deep Dive201915+5style="background:#DFDFDF;"|2nd
CCC 9: The Gauntlet20195+2, 10+5style="background:#FFDF9F;"|3rd{{Cite web|url=https://www.chess.com/news/view/computer-chess-championship-9-stockfish-10-lc0|title=Stockfish Wins Computer Chess Championship As Neural Networks Play Catch-Up|last=Cilento|first=Pete|website=Chess.com|language=en-US|date=7 August 2019|access-date=19 September 2019|archive-date=10 August 2019|archive-url=https://web.archive.org/web/20190810044658/https://www.chess.com/news/view/computer-chess-championship-9-stockfish-10-lc0|url-status=live}}
CCC 10: Double Digits201910+3style="background:#FFDF9F;"|3rd{{cite web |title=Computer Chess Championship |url=https://www.chess.com/computer-chess-championship#event=ccc10-semifinals |website=Chess.com |accessdate=19 September 2019 |archive-date=2 November 2018 |archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc10-semifinals |url-status=live }}
CCC 11201930+5style="background:#FFFFBF;"|1st{{cite web |title=Computer Chess Championship |url=https://www.chess.com/computer-chess-championship#event=ccc11-finals |website=Chess.com |accessdate=23 December 2019 |archive-date=2 November 2018 |archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc11-finals |url-status=live }}
CCC 12: Bullet Madness!20201+1style="background:#FFFFBF;"|1st{{cite web |title=Computer Chess Championship |url=https://www.chess.com/computer-chess-championship#event=ccc1217-lc0-vs-leelenstein-finals |website=Chess.com |accessdate=23 January 2020 |archive-date=2 November 2018 |archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc1217-lc0-vs-leelenstein-finals |url-status=live }}
CCC 13: Shapes20203+2, 5+5, 10+5, 15+5style="background:#FFFFBF;"|1st{{cite web |title=Computer Chess Championship |url=https://www.chess.com/computer-chess-championship#event=ccc13-finals |website=Chess.com |accessdate=14 April 2020 |archive-date=2 November 2018 |archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc13-finals |url-status=live }}{{cite news |last1=Doggers |first1=Peter |title=Leela Chess Zero Beats Stockfish 106–94 In 13th Chess.com Computer Chess Championship |url=https://www.chess.com/news/view/13th-computer-chess-championship-leela-chess-zero-stockfish |accessdate=24 April 2020 |work=Chess.com |date=18 April 2020 |archive-date=28 April 2020 |archive-url=https://web.archive.org/web/20200428124456/https://www.chess.com/news/view/13th-computer-chess-championship-leela-chess-zero-stockfish |url-status=live }}
CCC 14202015+5style="background:#FFFFBF;"|1st{{cite web |title=CCC14 Results |url=https://docs.google.com/spreadsheets/d/15OO7oyXyliBWa1aWRKWCIBblOP8KN6awsOMdS7yOQs0/edit#gid=390633471 |website=CCC Formats |accessdate=19 August 2020 |archive-date=23 February 2021 |archive-url=https://web.archive.org/web/20210223044049/https://docs.google.com/spreadsheets/d/15OO7oyXyliBWa1aWRKWCIBblOP8KN6awsOMdS7yOQs0/edit#gid=390633471 |url-status=live }}
CCC Blitz 202120215+5style="background:#DFDFDF;"|2nd{{cite web |title=Computer Chess Championship |url=https://www.chess.com/computer-chess-championship#event=ccc-blitz-championship-2021-finals |website=Chess.com |access-date=24 February 2022 |archive-date=2 November 2018 |archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc-blitz-championship-2021-finals |url-status=live }}
CCC Chess 960 Blitz20215+5style="background:#FFDF9F;"|3rd{{cite web |title=Computer Chess Championship |url=https://www.chess.com/computer-chess-championship#event=ccc-chess-960-blitz-championship-semifinals |website=Chess.com |access-date=24 February 2022 |archive-date=2 November 2018 |archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc-chess-960-blitz-championship-semifinals |url-status=live }}
CCC 16: Rapid202115+3style="background:#DFDFDF;"|2nd{{cite web |title=Computer Chess Championship |url=https://www.chess.com/computer-chess-championship#event=ccc-16-rapid-finals |website=Chess.com |access-date=24 February 2022 |archive-date=2 November 2018 |archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc-16-rapid-finals |url-status=live }}
CCC 16: Bullet20212+1style="background:#FFDF9F;"|3rd{{cite web|title=Computer Chess Championship|url=https://www.chess.com/computer-chess-championship#event=ccc-16-bullet-semifinals|website=Chess.com|access-date=24 February 2022|archive-date=2 November 2018|archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc-16-bullet-semifinals|url-status=live}}
CCC 16: Blitz

|2022

|5+5

|style="background:#FFDF9F;"|3rd

{{Cite web|title=Computer Chess Championship|url=https://www.chess.com/computer-chess-championship#event=ccc-16-blitz-challenger|access-date=24 February 2022|website=Chess.com|archive-date=2 November 2018|archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc-16-blitz-challenger|url-status=live}}
CCC 17: Rapid

|2022

|15+3

|style="background:#FFDF9F;"|3rd

|{{Cite web|title=Computer Chess Championship CCC 17: Rapid|url=https://www.chess.com/computer-chess-championship#event=ccc-17-rapid-challenger|access-date=30 March 2022|website=Chess.com|archive-date=2 November 2018|archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc-17-rapid-challenger|url-status=live}}

CCC 17: Bullet

|2022

|2+1

|style="background:#FFDF9F;"|3rd

|{{Cite web|title=Computer Chess Championship CCC 17: Bullet|url=https://www.chess.com/computer-chess-championship#event=ccc-17-bullet-challenger|access-date=24 March 2023|website=Chess.com|archive-date=2 November 2018|archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc-17-bullet-challenger|url-status=live}}

CCC 17: Blitz

|2022

|5+5

|style="background:#DFDFDF;"|2nd

|{{Cite web|title=Computer Chess Championship CCC 17: Blitz|url=https://www.chess.com/computer-chess-championship#event=ccc-17-blitz-finals|access-date=13 July 2022|website=Chess.com|archive-date=2 November 2018|archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc-17-blitz-finals|url-status=live}}

CCC 18: Rapid

|2022

|15+3

|style="background:#DFDFDF;"|2nd

|{{Cite web|title=Computer Chess Championship CCC 18: Rapid|url=https://www.chess.com/computer-chess-championship#event=ccc-18-rapid-finals|access-date=24 March 2023|website=Chess.com|archive-date=2 November 2018|archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc-18-rapid-finals|url-status=live}}

CCC 19: Blitz

|2022

|5+5

|style="background:#FFDF9F;"|3rd

|{{Cite web|title=Computer Chess Championship CCC 19: Blitz|url=https://www.chess.com/computer-chess-championship#event=ccc-19-blitz-challenger-match|access-date=24 March 2023|website=Chess.com|archive-date=2 November 2018|archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc-19-blitz-challenger-match|url-status=live}}

CCC 19: Rapid

|2022

|15+3

|style="background:#DFDFDF;"|2nd

|{{Cite web|title=Computer Chess Championship CCC 19: Rapid|url=https://www.chess.com/computer-chess-championship#event=ccc-19-rapid-finals|access-date=24 March 2023|website=Chess.com|archive-date=2 November 2018|archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc-19-rapid-finals|url-status=live}}

CCC 19: Bullet

|2023

|1+1

|style="background:#FFDF9F;"|3rd

|{{Cite web|title=Computer Chess Championship CCC 19: Bullet|url=https://www.chess.com/computer-chess-championship#event=ccc-19-bullet-challenger-event|access-date=24 March 2023|website=Chess.com|archive-date=2 November 2018|archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc-19-bullet-challenger-event|url-status=live}}

CCC 20: Blitz

|2023

|3+2

|style="background:#DFDFDF;"|2nd

|{{Cite web|title=Computer Chess Championship CCC 20: Blitz|url=https://www.chess.com/computer-chess-championship#event=ccc-20-blitz-finals|access-date=24 March 2023|website=Chess.com|archive-date=2 November 2018|archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc-20-blitz-finals|url-status=live}}

CCC 20: Rapid

|2023

|10+3

|style="background:#DFDFDF;"|2nd

|{{Cite web|title=Computer Chess Championship CCC 20: Rapid|url=https://www.chess.com/computer-chess-championship#event=ccc-20-rapid-finals|access-date=30 June 2023|website=Chess.com|archive-date=2 November 2018|archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc-20-rapid-finals|url-status=live}}

CCC 20: Bullet

|2023

|1+1

|4th

|{{Cite web|title=Computer Chess Championship CCC 20: Bullet|url=https://www.chess.com/computer-chess-championship#event=ccc20-bullet-semifinals|access-date=4 August 2023|website=Chess.com|archive-date=2 November 2018|archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc20-bullet-semifinals|url-status=live}}

CCC 21: Blitz

|2023

|3+2

|style="background:#FFDF9F;"|3rd

|{{Cite web|title=Computer Chess Championship CCC 21: Blitz|url=https://www.chess.com/computer-chess-championship#event=ccc21-blitz-challenger-match|access-date=18 August 2023|website=Chess.com|archive-date=2 November 2018|archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc21-blitz-challenger-match|url-status=live}}

CCC 21: Rapid

|2023

|10+3

|style="background:#DFDFDF;"|2nd

|{{Cite web|title=Computer Chess Championship CCC 21: Rapid|url=https://www.chess.com/computer-chess-championship#event=ccc21-rapid-finals|access-date=13 October 2023|website=Chess.com|archive-date=2 November 2018|archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc21-rapid-finals|url-status=live}}

CCC 21: Bullet

|2023

|1+1

|5th

|{{Cite web |title=Computer Chess Championship with Top Engines |url=https://www.chess.com/computer-chess-championship#event=ccc21-bullet-semifinals |access-date=2023-12-03 |website=Chess.com |language=en-US |archive-date=2018-11-02 |archive-url=https://web.archive.org/web/20181102011121/https://www.chess.com/computer-chess-championship#event=ccc21-bullet-semifinals |url-status=live }}

CCC 22: Blitz

|2024

|3+2

|style="background:#FFDF9F;"|3rd

|{{Cite web | title=CCC22 Blitz: Challenger Match | url=https://www.chess.com/computer-chess-championship#event=ccc22-blitz-challenger-match | access-date=2024-09-03 | website=Chess.com | language=en-US }}

CCC 22: Rapid

|2024

|10+3

|style="background:#DFDFDF;"|2nd

|{{Cite web | title=CCC22 Rapid: Finals | url=https://www.chess.com/computer-chess-championship#event=ccc22-rapid-finals | access-date=2024-09-03 | website=Chess.com | language=en-US }}

CCC 22: Bullet

|2024

|1+1

|4th

|{{Cite web | title=CCC22 Bullet: Semifinals | url=https://www.chess.com/computer-chess-championship#event=ccc22-bullet-semifinals | access-date=2024-09-03 | website=Chess.com | language=en-US }}

CCC 23: Blitz

|2024

|3+2

|style="background:#FFDF9F;"|3rd

|{{Cite web | title=CCC23 Blitz: Challenger Match | url=https://www.chess.com/computer-chess-championship#event=ccc23-blitz-challenger-match | access-date=2024-11-01 | website=Chess.com | language=en-US }}

Notable games

  • [https://www.chess.com/news/view/stockfish-wins-computer-chess-championship-rapid-lc0-finishes-3rd-3887 Leela vs Stockfish, CCCC bonus games, 1–0] Leela beats the world champion Stockfish engine despite a one-pawn handicap.
  • [https://www.tcec-chess.com/archive.html?season=15&div=sf&game=61 Stockfish vs Leela Chess Zero – TCEC S15 Superfinal – Game 61] Leela completely outplays Stockfish with black pieces in the Trompovsky attack. Leela's eval went from 0.1 to −1.2 in one move, and Stockfish's eval did not go negative until 15 moves later.
  • [https://www.chess.com/computer-chess-championship#event=ccc21-rapid-semifinals&game=163 Stockfish vs Leela, CCC 21 Rapid Semifinals — Game 163] Leela traps Stockfish's rook, allowing it to win as black.
  • [https://www.chess.com/computer-chess-championship#event=ccc23-rapid-finals&game=189 Stockfish vs Leela, CCC 23 Rapid Finals – Game 189] Leela constructs a fortress as black, allowing it to make a draw out of a lost position. Stockfish was not able to detect the fortress, with its eval staying above +5 for over 100 moves.

Notes

{{notelist}}

References

{{Reflist}}