Downloads · 30 days
0
AubreeL/chess-bot
chess-bot is a reinforcement learning model from AubreeL. Use it for the reinforcement learning task on the model card, and read the license before you ship it in a product. It is set up for pytorch. The card lists the license as mit.
A chess playing neural network trained on expert games from the Lichess Elite Database.
Downloads · 30 days
0
Access
Public
Updated Nov 16, 2025
Repo size
38.5 MB
Likes
1
Public
Click a slice to open those files.
.pth38.5 MB · 100%
From the Hugging Face model README
A chess playing neural network trained on expert games from the Lichess Elite Database.
This is a policy-value network inspired by AlphaZero, designed to evaluate chess positions and suggest moves.
import torch
import chess
from model import TinyPCN, encode_board
# Load model
model = TinyPCN(board_channels=18, policy_size=4672)
model.load_state_dict(torch.load("chess_model.pth"))
model.eval()
# Evaluate a position
board = chess.Board() # or chess.Board("fen string")
board_tensor = encode_board(board).unsqueeze(0)
with torch.no_grad():
policy_logits, value = model(board_tensor)
# Value interpretation:
# +1.0 = winning for current player
# 0.0 = drawn/equal position
# -1.0 = losing for current player
print(f"Position evaluation: {value.item():.4f}")
chess_model.pth - PyTorch model weightsmodel.py - Model architecture and board encodingmcts.py - Monte Carlo Tree Search implementationrequirements.txt - Python dependenciesCreated as part of an AlphaZero-style chess engine project.
MIT License