Xmaster6y commited on
Commit
3cfaba5
1 Parent(s): 329e823

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -5
README.md CHANGED
@@ -16,11 +16,11 @@ results:
16
  verified: false
17
  widget:
18
  - text: "FEN: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1\nMOVE:"
19
- example_title: "Init board"
20
- - text: "FEN: r2qr1k1/1p3ppp/2n1bb2/p2p4/P2N4/1B1P2B1/1PP2PPP/R2QR1K1 b - - 0 16\nMOVE:"
21
- example_title: "Board with legal completion"
22
- - text: "FEN: 6k1/1p3ppp/2b2b2/p2p4/P2Q4/1B1P2B1/1PP2PPP/4q1K1 w - - 2 24\nMOVE:"
23
- example_title: "Board with illegal completion"
24
  ---
25
  # Model Card for gpt2-stockfish-debug
26
 
@@ -76,8 +76,15 @@ for i in range(100):
76
  if move not in board.legal_moves:
77
  raise chess.IllegalMoveError
78
  board.push(move)
 
 
 
 
 
79
  except chess.IllegalMoveError:
80
  print(board)
81
  print("Illegal move", i)
82
  break
 
 
83
  ```
 
16
  verified: false
17
  widget:
18
  - text: "FEN: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1\nMOVE:"
19
+ example_title: "Init Board"
20
+ - text: "FEN: r2q1rk1/1p3ppp/4bb2/p2p4/5B2/1P1P4/1PPQ1PPP/R3R1K1 w - - 1 17\nMOVE:"
21
+ example_title: "Middle Board"
22
+ - text: "FEN: 4r1k1/1p1b1ppp/8/8/3P4/2P5/1q3PPP/6K1 b - - 0 28\nMOVE:"
23
+ example_title: "Checkmate Possible"
24
  ---
25
  # Model Card for gpt2-stockfish-debug
26
 
 
76
  if move not in board.legal_moves:
77
  raise chess.IllegalMoveError
78
  board.push(move)
79
+ outcome = board.outcome()
80
+ if outcome is not None:
81
+ print(board)
82
+ print(outcome.result())
83
+ break
84
  except chess.IllegalMoveError:
85
  print(board)
86
  print("Illegal move", i)
87
  break
88
+ else:
89
+ print(board)
90
  ```