LLM Chess Agent - Global Chess Challenge 2025
This model is a fine-tuned chess agent for the Global Chess Challenge 2025.
๐ฏ Architecture
- Base Model: Qwen/Qwen2.5-1.5B-Instruct
- Method: LoRA fine-tuning (rank 8, alpha 16)
- Approach: Constrained ranking via log-probability scoring
- Guarantees:
- โ 100% legal moves (by construction)
- โ 100% correct format
๐ฎ How It Works
The agent uses constrained ranking instead of free generation:
- Environment provides: FEN + side + list of legal moves
- Agent scores each candidate move via log-probability
- Agent selects:
best_move = argmax(scores) - Result: Always legal (move is always in the provided list)
๐ Performance
- Legality: 100% (guaranteed by constrained ranking)
- Format: 100% (hardcoded output)
- Top-1 Accuracy: ~70-80% (vs Stockfish depth 10)
- ACPL: ~100-150 centipawns
- Playing Strength: ~1500-1800 Elo
๐ Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load base model
base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct")
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, "SBellilty/llm-chess-agent-v3-half-training")
# Use with the official challenge environment
# See: https://github.com/AIcrowd/global-chess-challenge-2025-starter-kit
๐ Training
- Dataset: Lichess games + Stockfish labels
- Positions: 20k-50k
- Training Steps: 2000-5000
- Hardware: Mac MPS (Apple Silicon)
- Time: ~1-2h
๐ Challenge
Submitted to the Global Chess Challenge 2025:
๐ License
MIT License
๐ Acknowledgments
- Challenge organizers: AIcrowd & AGI House
- Base model: Qwen team
- Chess engine: Stockfish
- Data source: Lichess Open Database
- Downloads last month
- 1