ArticleslgStudy

computer science

Leela Zero

Leela Zero is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Leela Zero rather than just read about it. In short: Leela Zero is a free and open-source computer Go program released on 25 October 2017. It is developed by Belgian programmer Gian-Carlo Pascutto, the author of chess engine Sjeng and Go engine Leela.

Key takeaways

  • Leela Zero belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Leela Zero to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Leela Zero from memory before moving on to harder problems.

Reference excerpt

Leela Zero is a free and open-source computer Go program released on 25 October 2017. It is developed by Belgian programmer Gian-Carlo Pascutto, the author of chess engine Sjeng and Go engine Leela. Leela Zero's algorithm is based on DeepMind's 2017 paper about AlphaGo Zero. Unlike the original Leela, which has a lot of human knowledge and heuristics programmed into it, the program code in Leela Zero only knows the basic rules and nothing more. The knowledge that makes Leela Zero a strong player is contained in a neural network, which is trained based on the results of previous games that the program played. Leela Zero is trained by a distributed effort, which is coordinated at the Leela Zero website. Members of the community provide computing resources by running the client, which generates self-play games and submits them to the server. The self-play games are used to train newer networks. Generally, over 500 clients have connected to the server to contribute resources. The community has provided high quality code contributions as well.

Version history Leela Zero finished third at the BerryGenomics Cup World AI Go Tournament in Fuzhou, Fujian, China on 28 April 2018. The New Yorker at the end of 2018 characterized Leela and Leela Zero as "the world’s most successful open-source Go engines". In early 2018, another team branched Leela Chess Zero from the same code base, also to verify the methods in the AlphaZero paper as applied to the game of chess. AlphaZero's use of Google TPUs was replaced by a crowd-sourcing infrastructure and the ability to use graphics card GPUs via the OpenCL library. Even so, it is expected to take a year of crowd-sourced training to make up for the dozen hours that AlphaZero was allowed to train for its chess match in the paper. The distributed training server was shut down on 15 February 2021, marking the end of Leela Zero project. The page now directs visitors to KataGo and SAI. The model sizes increased steadily over time. The first released model has hash name d645af97, size 1x8 (1 layer, 8 channels), and released at 10 November 2017. The last released model has hash name 0e9ea880, size 40x256, and was released at 15 February 2021.

Technology Leela Zero is an (almost) exact replication of AlphaGo Zero in both training process and architecture. The training process is Monte-Carlo Tree Search with self-play, exactly the same as AlphaGo Zero. The architecture is the same as AlphaGo Zero (with one difference). Consider the last released model, 0e9ea880. It has 47 million parameters, and the following architecture:

The stem of the network takes as input a 18x19x19 tensor representation of the Go board. 8 channels are the positions of the current player's stones from the last eight time steps. (1 if there is a stone, 0 otherwise. If the time step go before the beginning of the game, then 0 in all positions.) 8 channels are the positions of the other player's stones from the last eight time steps. 1 channel is all 1 if black is to move, and 0 otherwise. 1 channel is all 1 if white is to move, and 0 otherwise. (This channel is not present in the original AlphaGo Zero) The body is a ResNet with 40 residual blocks and 256 channels. There are two heads, a policy head and a value head. Policy head outputs a logit array of size 19 × 19 + 1 {\displaystyle 19\times 19+1} , representing the logit of making a move in one of the points, plus the logit of passing. Value head outputs a number in the range ( − 1 , + 1 ) {\displaystyle (-1,+1)} , representing the expected score for the current player. -1 represents current player losing, and +1 winning.

References

External links Official website Leela Zero on GitHub Leela Zero on Sensei's Library Play Leela Zero on ZBaduk

Worked examples

Example 1 — a first encounter with Leela Zero

Start with the simplest possible case. Write down what Leela Zero claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Leela Zero before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Leela Zero ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Leela Zero

In research
Leela Zero appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Leela Zero in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Leela Zero is common in secondary-school and first-year university syllabi. It links to neighbouring topics 2017 software, Applied machine learning, Free software programmed in C++, so understanding it makes those chapters shorter.
In everyday life
Look for Leela Zero outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Leela Zero in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Leela Zero means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Leela Zero out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Leela Zero in simple terms?

Leela Zero is a free and open-source computer Go program released on 25 October 2017. It is developed by Belgian programmer Gian-Carlo Pascutto, the author of chess engine Sjeng and Go engine Leela.

Why does Leela Zero matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Leela Zero?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Leela Zero.

Tags

  • 2017 software
  • Applied machine learning
  • Free software programmed in C++
  • Go engines
  • Software using the GNU General Public License

Keep exploring