Update README.md
Browse files
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
|
79 |
fen = example['fens'][pick_random_move]
|
80 |
|
81 |
-
#
|
82 |
-
# Same with the score, which is the evaluation
|
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-
|
136 |
|
137 |
-
# Get the FEN
|
138 |
fen = example['fens'][pick_random_move]
|
139 |
|
140 |
-
#
|
141 |
-
# Same with the score, which is the evaluation
|
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 |
|