lczerolens.backends#
Utils from the lczero executable and bindings.
Notes
The lczero bindings are not installed by default. You can install them by running pip install lczerolens[backends].
Functions#
|
Run a generic command. |
|
Describe the net at the given path. |
|
Convert the net at the given path. |
|
Convert the net at the given path. |
|
Create a board from the lczero backend. |
|
Predicts the move. |
|
Get the moves with castling swap. |
Module Contents#
- lczerolens.backends.convert_to_onnx(in_path, out_path, verbose=False)[source]#
Convert the net at the given path.
- lczerolens.backends.convert_to_leela(in_path, out_path, verbose=False)[source]#
Convert the net at the given path.
- lczerolens.backends.board_from_backend(lczero_backend, lczero_game, planes=112)[source]#
Create a board from the lczero backend.
- Parameters:
lczero_backend (lczero.backends.Backend)
lczero_game (lczero.backends.GameState)
planes (int)
- lczerolens.backends.prediction_from_backend(lczero_backend, lczero_game, softmax=False, only_legal=False, illegal_value=0)[source]#
Predicts the move.
- Parameters:
lczero_backend (lczero.backends.Backend)
lczero_game (lczero.backends.GameState)
softmax (bool)
only_legal (bool)
illegal_value (float)
- lczerolens.backends.moves_with_castling_swap(lczero_game, board)[source]#
Get the moves with castling swap.
- Parameters:
lczero_game (lczero.backends.GameState)
board (lczerolens.board.LczeroBoard)