LeelaChessZero/lc0

Open source neural network chess engine with GPU acceleration and broad hardware support.

What it solves

Lc0 is a UCI-compliant chess engine that allows users to play chess using neural networks. It provides the computational framework to execute the neural network weights trained by the Leela Chess Zero project, enabling high-level chess play based on deep learning rather than traditional hand-crafted evaluation functions.

How it works

Lc0 acts as the engine that evaluates chess positions by running a neural network. It supports a wide variety of of hardware backends to optimize performance, including:

  • GPUs: CUDA (NVIDIA), HIP/ROCm (AMD), Metal Performance Shaders (Apple), and SYCL (Intel/AMD).
  • CPUs: BLAS-compatible libraries such as OpenBLAS or Intel's DNNL.
  • ONNX Runtime: Multiple execution providers (CPU, CUDA, ROCm, DirectML).

The engine is written in C++20 and can be integrated into Python via provided bindings.

Who it’s for

  • Chess enthusiasts who want to use a powerful, neural-network-based engine for analysis or play.
  • Developers looking to integrate neural network chess evaluation into their own applications via Python bindings.
  • Hardware optimizers interested in how neural networks are deployed across diverse GPU and CPU architectures.

Highlights

  • UCI Compliant: Works with standard chess GUIs.
  • Broad Hardware Support: Extensive support for NVIDIA, AMD, Intel, and Apple silicon.
  • Cross-Platform: Buildable on Linux, Windows, and macOS.
  • Python Bindings: Allows programmatic access to position evaluation.

Related

  • Project
  • Project
  • Project
  • Project