Lespleiades commited on
Commit
533fbd7
·
verified ·
1 Parent(s): 089c956

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -3
README.md CHANGED
@@ -32,12 +32,15 @@ The shared ResNet torso branches into two specialized heads:
32
  * **Value Head (v):** Outputs a single scalar value, typically between -1.0 (Black is winning) and +1.0 (White is winning). This score represents the network's prediction of the final game outcome from the current position.
33
 
34
  ## **Training:**
35
- The model is trained on small dataset from high-quality PGN of games. The model is trained on 50.000 games during 50 hours on RTX4060. This model acctually is evaluate around 1500 Elo (without MCTS). Training uses the PyTorch framework with advanced optimization techniques, including a OneCycleLR learning rate scheduler for accelerated convergence and a large batch size of 1024.
36
 
37
  ## **Usage:**
38
 
39
  ```python
40
 
 
 
 
41
  # Define Input State (FEN)
42
  # Example: The initial position of a game
43
  fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
@@ -59,7 +62,6 @@ policy_probabilities = F.softmax(policy_logits, dim=1).squeeze(0)
59
 
60
  # Find the move with the highest predicted probability
61
  best_action_index = torch.argmax(policy_probabilities).item()
62
- best_move = ACTION_TO_MOVE[best_action_index] # e.g., 'e2e4'
63
  best_probability = policy_probabilities[best_action_index].item()
64
 
65
  # Extract the value prediction
@@ -68,7 +70,6 @@ expected_value = value_output.item()
68
  # Print Results
69
  print(f"FEN: {fen}")
70
  print(f"--- Model Prediction ---")
71
- print(f"Predicted Best Move: {best_move}")
72
  print(f"Move Probability: {best_probability:.4f}")
73
  print(f"Position Evaluation (Value): {expected_value:.4f}")
74
  print("\nInterpretation: Value close to +1.0 means White is winning, -1.0 means Black is winning.")
 
32
  * **Value Head (v):** Outputs a single scalar value, typically between -1.0 (Black is winning) and +1.0 (White is winning). This score represents the network's prediction of the final game outcome from the current position.
33
 
34
  ## **Training:**
35
+ The model is trained on small dataset from high-quality PGN of games. The model is trained on 50.000 games during 50 hours on RTX4060. This model acctually is evaluate around 1250 Elo. Training uses the PyTorch framework with advanced optimization techniques, including a OneCycleLR learning rate scheduler for accelerated convergence and a large batch size of 1024.
36
 
37
  ## **Usage:**
38
 
39
  ```python
40
 
41
+ import chess
42
+ import torch
43
+
44
  # Define Input State (FEN)
45
  # Example: The initial position of a game
46
  fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
 
62
 
63
  # Find the move with the highest predicted probability
64
  best_action_index = torch.argmax(policy_probabilities).item()
 
65
  best_probability = policy_probabilities[best_action_index].item()
66
 
67
  # Extract the value prediction
 
70
  # Print Results
71
  print(f"FEN: {fen}")
72
  print(f"--- Model Prediction ---")
 
73
  print(f"Move Probability: {best_probability:.4f}")
74
  print(f"Position Evaluation (Value): {expected_value:.4f}")
75
  print("\nInterpretation: Value close to +1.0 means White is winning, -1.0 means Black is winning.")