The white passed pawn is replaced by a black piece in all the
train.csv and val.csv files. I think that in the test too. Is this mistake?.
For example, in the 49.mp4(val.csv) label is “d1g1 c6c7 g1d1 c7c8q d1g1 e2e4 h6g4 h2g1 e7f6”, but must be “d1g1 c6c7 g1d1 c7c8Q d1g1 e2e4 h6g4 h2g1 e7f6”.
Nope, it’s not a mistake, we are not differentiating between black/white queen in the samples of this challenge, including test ground truth, so just put small q if you find moves which have conversion of pawn to queen. Enjoy
@victorkras2008: Hi, we are acknowledging this issue and are investigating this closely as we speak, we will post updates on this soon. Thanks for notifying us of the bug.
Best,
Mohanty
Hi victorkras2008
We are still investigating the issue but here’s the bare minimum code to generate pawn promotion moves from chess-python library ( which we used to generated the dataset ) .
# Importing Libraries
import chess
import random
# Creating a chess board
board=chess.Board()
while True:
# If no legal move, continue
if list(board.legal_moves) == []:
print("continue")
continue
# Make random move
move = random.choice(list(board.legal_moves))
# If there was any pawn promotion, print the move & board
if len(move.uci()) > 4:
print(move.uci())
print(board)
print('--'*20)
# Make the move in board
board.push_uci(move.uci())
# If Game Ends, Reset chess board!
if board.is_game_over() == True:
board=chess.Board()
continue
And here’s the sample output -
f2f1b
. . . . . . . .
. . . . . R . .
N . k . . . . .
. . . . . . . .
. R p . . . . .
. . P . B . K P
. . . . . p . .
. . . . . . . .
----------------------------------------
d7d8q
. . . . . . . .
N . . P . . k .
. . . . . . . .
. . . . . . . B
P b . . . . P .
. p . . P P . .
. K . . . . . .
. . . b . . . .
----------------------------------------
f7f8q
. . . . . . . .
. . . . . P . .
. N . . P . . .
k . . . . . b .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. K . b . . . .
----------------------------------------
e7e8b
. . . . . . . .
. . . . P . . .
. k . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . b . .
. . . . . . . b
K . . . . . . .
----------------------------------------
a2a1b
. . . . . . . k
K . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . P .
. . . . . N . .
p . . . . . . p
. . . B . . . R
----------------------------------------
h2h1n
. . . . . . . k
. K . . b . . .
. . . . . . . .
. . . . . . . .
. . . . . . P .
. . . . . . . .
. . B . . N . p
. R . . . . . .
----------------------------------------
a7b8q
. n . . r . . .
P . . . . . p .
. p . p . . k p
. p . p . . . .
. . n . . R b .
. . P . P . . B
. . . P . . . P
. . . . . . K .
----------------------------------------
d7d8r
. . . . . . . .
. . . P . . . .
. . . . . . . .
. . . . k . . p
. p . . . . p P
. . . . . . . .
K . . . . . . .
. . . . . . . .
----------------------------------------
b2a1q
. . . . k . . .
. . . . . . . .
. . . . . . . .
. . . . . . . p
. . . . . . p P
. . . . . . . .
K p . . . . . .
R . . . . . . .
----------------------------------------
g2g1r
. . . . . . . .
. . K . . . . .
. . . . . . . .
. . . . . k . p
. . . . . . . P
. . . . . . . .
. . . . . . p .
. . . . . . . .
----------------------------------------
g7g8n
. . . . . . . .
. . . . . . P .
. k . . . . . .
. . . K . . . .
. . . . . . . p
. . . . . . . .
. . . . . . . .
. . . . . . . .
----------------------------------------
b7b8q
. . . . . . . .
. P . . . . . k
. . K . . . n .
. . . p . p . .
P . . P . p . P
. . . . . N . .
r . . . . . . .
. . . . . . . .
----------------------------------------
The issue is python-chess doesn’t consider which side ( black/white ) had the pawn promotion.
I have understand. Thank you very much!
Thanks @Shubhamaicrowd !
It’s a bit weird though, I would expect python-chess
to have such a silly bug. Nor do I understand why they wouldn’t consider the side on pawn promotion ?
In any case, if anyone has an understanding of why this is hapenning, please do let us know.
Else I suggest to include a rule based correction for this case and update the dataset for consistency.
Best,
Mohanty