Upload ChessBot Chess model
Browse files- README.md +1 -16
- config.json +5 -0
README.md
CHANGED
|
@@ -44,22 +44,7 @@ model = model.to(device)
|
|
| 44 |
|
| 45 |
# Get the best move
|
| 46 |
move = model.get_move_from_fen_no_thinking(fen, T=0.1, device=device)
|
| 47 |
-
print(f"
|
| 48 |
-
|
| 49 |
-
# Get the best move using value analysis
|
| 50 |
-
value_move = model.get_best_move_value(fen, T=0, device=device)
|
| 51 |
-
print(f"Value-based move: {value_move}")
|
| 52 |
-
|
| 53 |
-
# Get position evaluation
|
| 54 |
-
position_value = model.get_position_value(fen, device=device)
|
| 55 |
-
print(f"Position value [black_win, draw, white_win]: {position_value}")
|
| 56 |
-
|
| 57 |
-
# Get move probabilities
|
| 58 |
-
probs = model.get_move_from_fen_no_thinking(fen, T=1, device=device, return_probs=True)
|
| 59 |
-
top_moves = sorted(probs.items(), key=lambda x: x[1], reverse=True)[:5]
|
| 60 |
-
print("Top 5 moves:")
|
| 61 |
-
for move, prob in top_moves:
|
| 62 |
-
print(f" {move}: {prob:.4f}")
|
| 63 |
```
|
| 64 |
|
| 65 |
## Requirements
|
|
|
|
| 44 |
|
| 45 |
# Get the best move
|
| 46 |
move = model.get_move_from_fen_no_thinking(fen, T=0.1, device=device)
|
| 47 |
+
print(f"Predicted move: {move}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
```
|
| 49 |
|
| 50 |
## Requirements
|
config.json
CHANGED
|
@@ -3,6 +3,11 @@
|
|
| 3 |
"d_model": 512,
|
| 4 |
"max_position_embeddings": 64,
|
| 5 |
"model_type": "chessbot",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
"num_heads": 8,
|
| 7 |
"num_layers": 10,
|
| 8 |
"transformers_version": "4.53.1",
|
|
|
|
| 3 |
"d_model": 512,
|
| 4 |
"max_position_embeddings": 64,
|
| 5 |
"model_type": "chessbot",
|
| 6 |
+
"architectures": ["ChessBotModel"],
|
| 7 |
+
"auto_map": {
|
| 8 |
+
"AutoModel": "modeling_chessbot.ChessBotModel",
|
| 9 |
+
"AutoConfig": "modeling_chessbot.ChessBotConfig"
|
| 10 |
+
},
|
| 11 |
"num_heads": 8,
|
| 12 |
"num_layers": 10,
|
| 13 |
"transformers_version": "4.53.1",
|