File size: 1,500 Bytes
3c88a0f
 
 
 
1
2
3
4
5
{"type": "session", "harness": "opencode", "id": "chess-0081", "name": "Leela Chess Zero Architecture"}
{"type": "message", "message": {"role": "system", "content": "You are an expert chess programmer."}}
{"type": "message", "message": {"role": "user", "content": "Explain Leela Chess Zero architecture"}}
{"type": "message", "message": {"role": "assistant", "content": "Leela Chess Zero (Lc0): neural network chess engine using MCTS. Inspired by AlphaZero.\n\nArchitecture: 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).\n\nTraining: self-play reinforcement learning. Play millions of games, train on results. ELO improves iteratively.\n\nMCTS (Monte Carlo Tree Search):\n1. Select: traverse tree using UCB1 formula\n2. Expand: add new node, evaluate with neural network\n3. Backup: update node statistics from leaf value\n\nSearch: MCTS replaces alpha-beta. No explicit move ordering needed (policy network guides selection).\n\nHardware: uses GPU for neural network inference. CPU for tree search. TensorRT, cuDNN, OpenCL backends.\n\nComparison with Stockfish:\n- Lc0: better in complex middlegames, slower positional play\n- Stockfish: faster, better endgame play, deeper search\n- NNUE bridges the gap (Stockfish now uses neural network too)\n\nVersions: Lc0 v0.25+ uses transformer architecture. Different network sizes (T60, T80, J93)."}}