Our social:

2021-06-23

Leela Chess Zero

 Leela Chess Zero (LCZero, Lc0) is a chess engine that uses neural networks and the principle of distributed computing for its work. The project is led by programmer Gary Linscott, who is also one of the four developers at Stockfish. In his brainchild, Linscott implemented the ideas behind AlphaZero , a neural network program from Google , which made a big splash at the end of 2017 with its uncompromising reprisal against the strongest computer programs for playing chess, go and shogi.


Download LCZero engine

 

Features Leela Chess Zero

In their approach to solving the problems they are faced with, programs such as Leela Chess Zero and AlphaZero are fundamentally different from traditional "algorithmic" chess engines such as Stockfish, Komodo or Houdini. The neural networks on which the former are based are not programmed in the usual sense, they learn by playing against themselves, forming their own understanding.

In the paradigm of classical chess engines, an alpha-beta pruning algorithm for the search function (Alpha-Beta Pruning) and a hard-working evaluation function are used, prescribing strictly defined actions to the program according to a given algorithm, which is constantly improved by a person by trial and error. The input data are the representation of the board, the basic rules of the game and the last few moves if the position is not the starting one. LCZero and AlphaZero receive the same input, but they already use a different method for searching, the Monte Carlo Tree Search method. The evaluation function is completely left to the mercy of neural networks and their learning algorithm.

A neural network (in our case, an artificial neural network) is an attempt to model, in some approximation, a network of nerve cells of a living organism. Work in this area has served to create a section on machine learning in the science of artificial intelligence - at a certain point it became clear that such models, thanks to the exchange of information between neurons within themselves, are capable of learning. The algorithm of this training in its process allows the neural network to recognize complex dependencies between input and output data, performing a generalization operation as a result. Thus, the program becomes able to find the correct solution, despite the lack of data about it in the training set.

The "naked" neural network learning the blackboard is stupid. But the more she learns by playing with herself, the smarter she becomes. In addition, together with the Monte Carlo method, they gradually complement and improve each other. Before her first 100-game match with Stockfish, AlphaZero played chess against herself millions of times in just four hours and was known to smash her opponent to smithereens. To train neural networks, Google used colossal computing power - thousands of tensor processors.

 


It would take the developer Leela Chess Zero centuries to train his brainchild with a comparable effect. The issue with the lack of computing power was solved by the method of distributed computing. A whole community of users day after day donate the computing resources of their computers for the benefit of the project, thereby directly participating in the training of LCZero neural networks and its development. Largely thanks to them, the number of games played in a total of Leela Chess Zero as of June 2019 has already exceeded two hundred million.

Leela Chess Zero was announced on January 9, 2018 on the talkchess.com forum. In April, the engine began its performance in the Top Chess Engine Championship (TCEC), starting in the 12th season from the 4th division. The debut was unsuccessful: out of 28 fights held by Leela, she lost 25 and won only one, and even then as a result of the freezing of the opponent. However, the program was continuously trained and progressed rapidly. In TCEC's 13th season, with a score of +14 -2 = 12, she won the 4th division, in which she failed just four months ago, and moved on to the next. In it, Leela took second place, having won 7 wins, 18 draws and 3 defeats.

By the beginning of autumn, Leela Chess Zero was already competing with the strongest chess programs in the world. In the first round of the Chess.com Computer Chess Championship 2018 (CCC1), which was held in 3 stages, the neuro-engine took the 5th place among the 24 programs that participated. The top eight advanced to the second round. According to its results, Leela took the 4th position, and then won the final 3rd place in the tournament by defeating Komodo in a match of 30 games. In the final match, Stockfish and Houdini fought for the lead. In the next chess.com tournament for the Chess.com Computer Chess Championship Blitz Battle 2018 (CCC2), Leela again took 3rd place; the victory, as in CCC1, was celebrated by Stockfish.

In December of the same year, TCEC season 14 took place. This time all numbered divisions, from the 3rd to the 1st, were easily submitted to Leela. In the Premier Division, Stockfish held a confident sole leadership, Komodo, Houdini and Leela were fighting for the second place. In the final round, the neural network engine was required to hold Black in a draw with Stockfish in order to take the second line and fight him in the super final. Leela coped with this and went to the match, losing to her opponent in the hardest struggle with a score of 50.5: 49.5.

In February 2019, Leela Chess Zero won its first major trophy - the TCEC Cup, defeating Houdini in the final of the tournament and not losing a single game during the competition. In May, as part of TCEC Season 15, Leela faced Stockfish again in the Super Final. This time, she surpassed her main opponent, winning a 100-game match with a score of +14 -7 = 79. Stockfish lost the championship championship for the first time in four seasons of the Top Chess Engine Championship.

Download Leela Chess Zero

LCZero is not your typical UCI engine, but it still supports a universal chess interface and therefore can be used on a PC in a chess shell such as Chessbase, Fritz or Arena. However, installing Leela and setting it up for efficient and convenient operation will require a little more effort and knowledge from the user, and maybe even investment, than in the case of the same Stockfish, Komodo or Houdini.

You can download Leela Chess Zero from the official website of the developer lczero.org. The program is free. Download required: 1) file engine lc 0. the exe and 2) network file

1) The engine itself is distributed in three versions: Blas, OpenCL and Cuda.

  • Blas consumes only CPU (central processing unit) resources in its work and, unlike OpenCL and Cuda versions, does not access the video card, therefore it is very much inferior to them in strength and speed
  • OpenCL uses GPU (graphics processing unit) with OpenCL2 support
  • Cuda takes advantage of and works only with relatively recent NVIDIA GPUs

You can use the GPU-Z program (distributed free of charge) to find out about support for a video card of the OpenCL 1.2 standard. AMD boards have supported OpenCL 1.2 for the past half a decade (on GCN architecture). Graphics integrated into the CPU (usually used on laptops) will also work if the above standard is supported. Integrated AMD GPUs will enable the OpenCL version of LCZero starting with the Kaveri family.

Cuda is superior to OpenCL, but only supports NVIDIA graphics cards starting with the GTX 600 series, i.e. from the Kepler family (usually no older than 2013) or newer (Maxwell, Pascal, Turing). With each new release of the engine, its requirements can grow - the more powerful the video card, the more efficiently it will show itself.

Download LCZero engine

2) In its work, Leela Chess Zero uses neural networks trained by developers and users.

Download LCZero Network

There are many networks available for download, and any of them can be used, but it is worth noting that the latter network is not always the strongest.

Install Leela Chess Zero

Installation procedure under Windows

  • The required latest version of the engine is downloaded and unpacked
  • The selected network is placed in the folder with the unpacked engine
  • Video card drivers are updated to the latest
  • The program connects to the shell like any other UCI engine

Notes:

  • The Fritz shell may need a patch to improve the loading of non-standard machines; for Fritz 15 is patch 15.36
  • In addition to lcexe, the archive with the engine contains the client.exe application; with its help, the user can take part in the training of LCZero neural networks - no need to play and analyze with the engine on a PC

The initial installation usually goes smoothly, however, judging by the comments in the user environment, further work and configuration can be difficult.

 

 

0 comments:

Post a Comment