The neural network chess engineis making the headlines with its performance in the Top Chess Engine Championship. First it qualified to the Superfinal of the competition by finishing second in the Premier Division, and a few weeks after it conquered its first major computer chess title by winning the TCEC Cup

Live now: Follow the Superfinal of TCEC Stockfish vs Lc0

Chessdom spoke to one of the head admins and leading developers of the project Alexander Lyashuk about the history of the engine, its road in competitive chess, development details, and the future of computer chess in general.

Congratulations! Lc0 has finally conquered its first major title by winning the TCEC Cup

Indeed, a first major title for Lc0. That does feel really good, although I have to admit that this time it did not happen without some luck. :) Stockfish was eliminated before Leela had a chance to meet it, and that obviously helped a lot.

Anyway, it’s a great achievement for the team, and I’d like to mention that it’s not just the developers who made that progress possible. The main driver of the effort is actually the community, which contributes their computing power to help Leela learn, the people who do lots of strength testing, and the ones who run youtube videos and twitch streams, or just keep the morale up by being active in chat and forum.

Also, a big thanks to TCEC for providing a platform to showcase our progress and get the community excited about the Lc0 project. It’s indisputable that without TCEC Leela would be much less popular.

Lc0 is a very young project. It has been active for about an year. Is this the most meteoric rise to the top that computer chess has witnessed

There are two major dates which can be thought as a project start. The first one is Gary’s [Gary Linscott] official project announcement and start of a GitHub repository. That happened around 2-7 January 2018. Others think, that the actual start of the Leela training pipeline should be counted as the real start. That happened somewhere in the beginning of March 2018.

No matter which date we take as a start of the project, it is indeed probably the fastest rise of a chess engine. Although one can argue whether it’s a fair comparison in terms of developers achievement. Traditionally, developing a chess engine needed lots of chess expertise and trial and error. The developer has to fight with his bare hands for every 3 Elo points. If a developer takes a vacation, Elo growth stops. With Leela we of course do development and infrastructure maintenance work too, but all in all we just wait and Leela becomes stronger. We can go on a vacation, return in 1 week — and Leela magically learnt something new by itself.

Also, I’d like to remind that major part of Leela’s ideas come from DeepMind’s paper. Only recently we started to experiment with neural network architecture ideas which differ from what was written there. But all along the way, AlphaZero was the guide of our project.

Ed. note: Read about the entrance of Leela into competitive chess

The first time Lc0 appeared in a competition was in S12 of TCEC. Back then there was no GPU, it was just running on CPU. But that was also a time when the fanbase !boom began. Looking back at this moment, what are your thoughts?

It is good that TCEC now has GPUs. :) But back then I didn’t really expect TCEC to to make that serious investment in GPUs. For S13 I tried to urgently write a Leela backend to be able to parallelize work to 47 CPU cores, but then it was announced that the competition will have GPUs, so I could relax.

Yes, community growth really exploded with Leela entering TCEC, and we actually always have had a problem (a good problem to have!) that development couldn’t keep up with the number of contributors. It’s still kind of like this: there are lots of people contributing, there are lots of good ideas, too little time to implement.

Now from the look of history, what do you think about the technical difficulties experienced along the way?

That GPU overheating was a good source of burrito memes and jokes about poor Leela’s thermal management. :) Technical difficulties are unavoidable when you try something new. Maybe Leela didn’t show its real strength there, but it allowed her to play more games in the next season 14 (all the way through Div3).

More importantly, it led to changes in Leela’s time management, so now it’s more robust when run on stable hardware.

Currently Test30 net is triumphing. Test 40 is in developing and testing phase. Do you expect it to surpass Test 30? If yes, when? And how much ELO will that mean for Lc0?

Actually I didn’t have time to follow test 40 for the last 2 weeks, and 2 weeks for Leela is an eternity! But from other devs I heard a secret plan of keeping Leela play only draws in TCEC Cup for some weeks in order to delay TCEC Superfinal and send test 40 there. :)

So there is a hope that test 40 will take the lead soon.

A new paper was released by A0 recently, was it helpful in Lc0′s success this year?

It was really helpful as it filled in the remaining parts of a puzzle that we had. (Our findings are summarized here).

For some missing parts, we felt that there is something to be fixed, but didn’t dare to contradict the words of DeepMind’s pre-print. For example, we had an observation that Leela hardly ever changes the best move after 1 million nodes or so. There were different ideas to encourage more exploration as search goes, but in the end, it turned out that so-called “puct constant” was not a constant.

The Superfinal is coming. Lc0 has decisive games against every opponent this season except Stockfish. Is the Superfinal a chance to do that?

Beating Stockfish in S14 is not the most probable result, but it’s surely possible. I’m sure there will be interesting wins and maybe a bit of a drama as usual. It will be the most entertaining TCEC superfinal in recent years, and I hope lots of people will enjoy it.

And what what do you expect from Lc0 in S15?

If you search through our Discord server chat history, I did a prediction early in May there that Leela will win S15. I still hold this prediction. :)

Well, as a side note, I expected S15 to start around October 2018, so to be fair, I was a bit overly optimistic regarding the growth of Leela’s skills… Or maybe it’s vice versa, Leela noticed that there’s still a long time until S15 and relaxed. :)

Do you think the computer chess world is moving towards an era where the NNs will dominate over the AB engines?

First let’s clarify a terminology. There is a search algorithm (AB vs MCTS), and there is evaluation function (handwritten vs NN-based). Leela uses MCTS+NN, Stockfish uses AB+handwritten, but any combination is possible. For example, Komodo MCTS uses MCTS+handwritten, and Scorpio NN uses (as far as I heard) AB+NN.

I’m sure, that purely NN-driven chess engines will take over the Top-5 pretty soon. Currently the main drawback of NN-based evaluation function is it’s slowness compared to handwritten ones, but evaluation of neural networks will speed up and improve.

Classical engines with fast handwritten eval functions also don’t stay at one place though. Stockfish keeps the growth momentum really well, for example. It’s also nice to see that Leela also helps with that growth, providing ideas for Stockfish patches.

There was another NN engine participating this season – Scorpio NN. What do you think of the project of Daniel Shawul?

DeepMind’s publication demonstrated a new area to explore in chess engine world and I’m happy to see that another engine also picked that idea to try. I will be really curious to see its progress and wish it all the best in gaining ELO.

But I would also like to see other NN-based engines appear! Because to fill Top-5 with NN engines, we need at least 5 NN engines!