Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- chess
|
| 5 |
+
- reinforcement-learning
|
| 6 |
+
- game-ai
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# ChessHacks Chess Bot Model
|
| 10 |
+
|
| 11 |
+
This model was trained to play chess using a neural network with policy and value heads.
|
| 12 |
+
|
| 13 |
+
## Model Architecture
|
| 14 |
+
|
| 15 |
+
- Convolutional neural network with residual blocks
|
| 16 |
+
- Policy head: Predicts move probabilities
|
| 17 |
+
- Value head: Evaluates position strength
|
| 18 |
+
|
| 19 |
+
## Usage
|
| 20 |
+
|
| 21 |
+
```python
|
| 22 |
+
import torch
|
| 23 |
+
from huggingface_hub import hf_hub_download
|
| 24 |
+
|
| 25 |
+
# Download the model
|
| 26 |
+
model_path = hf_hub_download(
|
| 27 |
+
repo_id="HamzaAmmar/chesshacks-model",
|
| 28 |
+
filename="best.pt"
|
| 29 |
+
)
|
| 30 |
+
|
| 31 |
+
# Load checkpoint
|
| 32 |
+
checkpoint = torch.load(model_path, map_location="cpu")
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
## Training
|
| 36 |
+
|
| 37 |
+
Trained on Lichess games using:
|
| 38 |
+
- 10 epochs
|
| 39 |
+
- 10,000 steps per epoch
|
| 40 |
+
- Batch size: 256
|
| 41 |
+
- Lichess standard chess games dataset
|