Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -3,39 +3,25 @@ license: mit
|
|
| 3 |
tags:
|
| 4 |
- chess
|
| 5 |
- reinforcement-learning
|
| 6 |
-
-
|
| 7 |
---
|
| 8 |
|
| 9 |
-
# ChessHacks
|
| 10 |
|
| 11 |
-
|
| 12 |
|
| 13 |
## Model Architecture
|
| 14 |
-
|
| 15 |
- Convolutional neural network with residual blocks
|
| 16 |
-
- Policy head:
|
| 17 |
-
- Value head:
|
| 18 |
|
| 19 |
## Usage
|
| 20 |
-
|
| 21 |
```python
|
| 22 |
-
import torch
|
| 23 |
from huggingface_hub import hf_hub_download
|
| 24 |
|
| 25 |
-
# Download
|
| 26 |
-
|
| 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
|
|
|
|
| 3 |
tags:
|
| 4 |
- chess
|
| 5 |
- reinforcement-learning
|
| 6 |
+
- pytorch
|
| 7 |
---
|
| 8 |
|
| 9 |
+
# ChessHacks Model
|
| 10 |
|
| 11 |
+
Neural network trained to play chess using PyTorch.
|
| 12 |
|
| 13 |
## Model Architecture
|
|
|
|
| 14 |
- Convolutional neural network with residual blocks
|
| 15 |
+
- Policy head: predicts move probabilities
|
| 16 |
+
- Value head: evaluates board positions
|
| 17 |
|
| 18 |
## Usage
|
|
|
|
| 19 |
```python
|
|
|
|
| 20 |
from huggingface_hub import hf_hub_download
|
| 21 |
|
| 22 |
+
# Download weights
|
| 23 |
+
weights_path = hf_hub_download(
|
| 24 |
repo_id="HamzaAmmar/chesshacks-model",
|
| 25 |
filename="best.pt"
|
| 26 |
)
|
|
|
|
|
|
|
|
|
|
| 27 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|