mauricett commited on
Commit
42da79f
·
verified ·
1 Parent(s): abb4956

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +9 -9
README.md CHANGED
@@ -75,12 +75,12 @@ def preprocess(example, tokenizer, score_fn):
75
  max_ply = len(example['moves'])
76
  pick_random_move = random.randint(0, max_ply-2)
77
 
78
- # Get the FEN, move and score for our random choice.
79
  fen = example['fens'][pick_random_move]
80
 
81
- # We add +1 to the index to select the next candidate move.
82
- # Same with the score, which is the evaluation of this move.
83
- # Please read the section about the data format clearly!
84
  move = example['moves'][pick_random_move + 1]
85
  score = example['scores'][pick_random_move + 1]
86
 
@@ -132,14 +132,14 @@ def score_fn(score):
132
  def preprocess(example, tokenizer, score_fn):
133
  # Get number of moves made in the game.
134
  max_ply = len(example['moves'])
135
- pick_random_move = random.randint(0, max_ply-1)
136
 
137
- # Get the FEN, move and score for our random choice.
138
  fen = example['fens'][pick_random_move]
139
 
140
- # We add +1 to the index to select the next candidate move.
141
- # Same with the score, which is the evaluation of this move.
142
- # Please read the section about the data format clearly!
143
  move = example['moves'][pick_random_move + 1]
144
  score = example['scores'][pick_random_move + 1]
145
 
 
75
  max_ply = len(example['moves'])
76
  pick_random_move = random.randint(0, max_ply-2)
77
 
78
+ # Get the FEN for our random choice.
79
  fen = example['fens'][pick_random_move]
80
 
81
+ # To get the move that leads to the *next* FEN, we have to add
82
+ # +1 to the index. Same with the score, which is the evaluation
83
+ # of that move. Please read the section about the data format clearly!
84
  move = example['moves'][pick_random_move + 1]
85
  score = example['scores'][pick_random_move + 1]
86
 
 
132
  def preprocess(example, tokenizer, score_fn):
133
  # Get number of moves made in the game.
134
  max_ply = len(example['moves'])
135
+ pick_random_move = random.randint(0, max_ply-2)
136
 
137
+ # Get the FEN for our random choice.
138
  fen = example['fens'][pick_random_move]
139
 
140
+ # To get the move that leads to the *next* FEN, we have to add
141
+ # +1 to the index. Same with the score, which is the evaluation
142
+ # of that move. Please read the section about the data format clearly!
143
  move = example['moves'][pick_random_move + 1]
144
  score = example['scores'][pick_random_move + 1]
145