guidopetri / chess-pipeline

Pulling games from the Lichess API into a PostgreSQL database for data analysis.
GNU General Public License v3.0
20 stars 2 forks source link

Add Leela Chess Zero evaluations #29

Open guidopetri opened 4 years ago

guidopetri commented 4 years ago

This is far out, but hopefully doable someday: Maybe Lc0 evaluations could be added (as win probabilities? or maybe Q score directly?). This would require a GPU most likely, at least if we want any proper depth/node search.

guidopetri commented 4 years ago

An option: some sort of FaaS self-hosted on my PC, which has a GPU, and is queried by the VPS to get Leela evals for positions. I'd have to batch them properly so that I get optimal performance.

nikking commented 2 years ago

Cool project!

I came across this because I'm thinking about doing using lc0 to created a win probability model.

One advantage of lc0 over stockfish is that it computes expected Win/Draw/Loss in addition to centipawn eval so you can predict the actual result instead in addition to expectation.

I have lc0 set up on my home PC and can access it remotely over ssh. Newer versions of Python-chess have examples for accessing remote engines in case you haven't seen it. https://python-chess.readthedocs.io/en/latest/engine.html

guidopetri commented 2 years ago

Thanks! :)

I hadn't seen that python-chess had made that an option, that's great. I don't know much abour async/await but it's a great opportunity to learn.

I think probably the lc0 WDL stats will be accurate for good play, but not necessarily accurate for e.g. bullet players or lower rated players. But I'm very interested in what comes of your win probability model. If you'd like, I'm open to a collaboration of sorts :)