Maxlegrec commited on
Commit
e911526
·
verified ·
1 Parent(s): 19f8151

Upload ChessBot Chess model

Browse files
Files changed (1) hide show
  1. README.md +3 -18
README.md CHANGED
@@ -42,24 +42,9 @@ fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
42
  device = "cuda" if torch.cuda.is_available() else "cpu"
43
  model = model.to(device)
44
 
45
- # Get the best move using policy
46
- policy_move = model.get_move_from_fen_no_thinking(fen, T=0.1, device=device)
47
- print(f"Policy-based move: {policy_move}")
48
-
49
- # Get the best move using value analysis
50
- value_move = model.get_best_move_value(fen, T=0.1, 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=0.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
 
42
  device = "cuda" if torch.cuda.is_available() else "cpu"
43
  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"Predicted move: {move}")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  ```
49
 
50
  ## Requirements