Skip to main content

Lcz

Python bindings for Leela Chess Zero, simplified

Provides a simple interface around the original LCZero python bindings

Usage

import lcz

lcz.eval(fens=[
    'rnbqkbnr/pp2pppp/2p5/3p4/3PP3/8/PPP2PPP/RNBQKBNR w KQkq - 0 3',
    'r2qkbnr/pp2pppp/2n5/3p1b2/3P1B2/5N2/PPP2PPP/RN1QKB1R w KQkq - 4 6'
], weights_path='/path/to/lcz.pb.gz') # if not specified, uses the pre-packaged 'maia-1900.pb.gz'

# [{'b1d2': 0.008045054972171783, # [0, 1] probabilities (softmaxed)
#   'b1a3': 5.8913348766509444e-05,
#   'b1c3': 0.21684584021568298,
#    ...
#   },
#   {'b1d2': 0.015918008983135223,
#    'b1a3': 0.0013550063595175743,
#    'b1c3': 0.09632844477891922,
#    ...
#   }]

Heads up

Expect it to take ages to build, as the whole C++ lib gets compiled. You can use pip install -v to check progress

Metadata

Release files for lcz 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lcz 0.1.7
File Size Uploaded
lcz-0.1.7.tar.gz 1.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for lcz 0.1.7
File Interpreter ABI Platform
lcz-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 2.5 MB

Release files / lcz-0.1.7.tar.gz

Download URL lcz-0.1.7.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
c118581541ed2e9f7f43f9c9c536f9ab2d5120441d68274e6312c8bf3809bd4a
BLAKE2b-256 checksum
How to use checksums
fbaa644b56655d648a1ca9d32b6e568e5e86b04da10ea42ad7cc7f6ec76467dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.9

Release files / lcz-0.1.7-py3-none-any.whl

Download URL lcz-0.1.7-py3-none-any.whl
Size 1.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
49b21caf6fe4378f209c9178b05bdfee3ca1eb0215817cd4511ae74b70cfbb02
BLAKE2b-256 checksum
How to use checksums
365366943de3023535d136fb634ba87c881ca4ef7239b07f1dc7abb159b00c4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.4

2 release files

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page