tinycodinglm / chess /chess-0081.jsonl
winapiadmin's picture
Upload folder using huggingface_hub (part 12)
3c88a0f verified
|
Raw History Blame Contribute Delete
1.5 kB
opencode trace
System You are an expert chess programmer.

You are an expert chess programmer.

User

Explain Leela Chess Zero architecture

Assistant

Leela Chess Zero (Lc0): neural network chess engine using MCTS. Inspired by AlphaZero.

Architecture: residual convolutional neural network. Input = 112 input planes (8 piece types x 2 colors x 8x8 + castling + en passant). Output = policy (probability of each move) + value (position evaluation).

Training: self-play reinforcement learning. Play millions of games, train on results. ELO improves iteratively.

MCTS (Monte Carlo Tree Search):

  1. Select: traverse tree using UCB1 formula
  2. Expand: add new node, evaluate with neural network
  3. Backup: update node statistics from leaf value

Search: MCTS replaces alpha-beta. No explicit move ordering needed (policy network guides selection).

Hardware: uses GPU for neural network inference. CPU for tree search. TensorRT, cuDNN, OpenCL backends.

Comparison with Stockfish:

  • Lc0: better in complex middlegames, slower positional play
  • Stockfish: faster, better endgame play, deeper search
  • NNUE bridges the gap (Stockfish now uses neural network too)

Versions: Lc0 v0.25+ uses transformer architecture. Different network sizes (T60, T80, J93).