TransWikia.com

Is there Python code to use the Leela neural network?

Chess Asked by BlindKungFuMaster on October 5, 2021

I am interested in doing some analyses of chess games using the neural network trained for Lc0. To that end I need to be able to turn PGN into the right kind of input vectors and to load and use the neural network trained for Leela chess.

My question is whether there is python code for this somewhere. Especially for the first step, using the neural network shouldn’t be a problem.

Alternatively an explanation of how the input vectors are computed might enable me to write it myself.

2 Answers

Python utilities for experimenting with Leela Chess Zero a neural network based chess engine: https://github.com/glinscott/leela-chess/

Here: https://github.com/so-much-meta/lczero_tools This allows you to run the network in Python on specific board positions via python-chess, and get policy/value outputs. (Works with pytorch, and is also able to run the network using the tfprocess training module included in Leela).

https://github.com/dkappe/leela-chess-weights/wiki/Supervised-Learning A newer, faster tool for converting pgn to training data can be found here.

Correct answer by edwina oliver on October 5, 2021

note that there are newer tools and an official api here!

Answered by Ofek Shochat on October 5, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP