«

»

Apr 05

Leela Chess

Courtesy of Jerry (ChessNetwork), I found out today about Leela and the LCzero chess project (http://lczero.org/).

This appears to be a replication of the Google DeepMind AlphaZero project with open source and distributed computing contributing to the pattern learner.

Among the cool aspects of the project is that you can play against the engine after different amounts of learning.  It’s apparently played around 2.5m games now and appears to have achieved “expert” strength.

There are a few oddities, though.  First, if it is learning through self-play, are these games versus humans helping it learn (that is, are they used in the learning algorithm)?  Probably practically that makes no difference if most of the training is from real self-play, but I’m curious.  Second, they report a graph of playing ability of the engine but the ELO is scaling to over 4k, which doesn’t make any sense (‘expert’ elo is around 2000).  There really ought to be a better way to get a strength measure, for example, simply playing a decent set of games on any one of the online chess sites (chess.com, lichess.com).  The ability to do this and the stability of chess elo measures is a good reason to use chess as a model for exploring pattern-learning AI compared to human ability.

But on the plus side, there is source code.  I haven’t looked at the github repository yet (https://github.com/glinscott/leela-chess) but it’d be really interesting to constrain the alpha-beta search to something more human like (narrow and shallow) and see if it possible to play more human-like.

Jerry posted a video on youtube of playing against this engine this morning (https://www.youtube.com/watch?v=6CLXNZ_QFHI).  He beats it in the standard way that you beat computers: play a closed position where you can gradually improve while avoiding tactical errors and the computer will get ‘stuck’ making waiting moves until it is lost.  Before they started beating everybody, computer chess algorithms were known to be super-human at tactical considerations and inferior to humans at positional play.  It turns out that if you search fast and deep enough, you can beat the best humans at positional play as well.  But the interesting question to me for the ML-based chess algorithms is whether you can get so good at the pattern learning part that you can start playing at a strong human level with little to no explicit alpha-beta search (just a few hundred positions rather than the billions Stockfish searches).

Jerry did note in the video that the Leela engine occasionally makes ‘human like’ errors, which is a good sign.  I think I’d need to unpack the code and play with it here in the lab to really do the interesting thing of figuring out the shape of the function, ability = f(million games played, search depth).

 

 

1 comment

  1. Ben

    It looks like the github faq (https://github.com/glinscott/leela-chess/wiki/FAQ) has a link to a community spreadsheet of Leela’s adjusted ELO vs StockFish: https://github.com/glinscott/leela-chess/wiki/FAQ

    Stockfish_dev_4cores 3521 46 99.9 230.0 400 76 308 16 77.0

    LCZero_Id107_c747 1882 113 79.3 101.0 200 90 22 88 11.0

    They also provide this ELO march chart under the “Rating / Games” sheet.

Leave a Reply