Closed vhf closed 9 years ago
Hi,
this is because board.push_san()
strictly expects standard algebraic notation like 'Nf6' or 'e4' or 'O-O'. Standard algebraic notation depends on the position, for example a move like 'Re1' might sometimes have to be qualified with 'Rfe1'.
str(move)
or move.uci()
gets the move in position independent UCI notation, like 'g8f6' 'e2e4' or 'e1g1'.
What to do instead?
move
object you can board.push(move)
.uci
in UCI notation you can board.push(Move.from_uci(uci))
. Note that Move.from_uci()
is able to get you a move object independent of the position.Best regards Niklas
Hi,
Many thanks for your answer. I'll close this issue.
Best -vhf
Hi,
Nice library you got there, I really like its ease of use. Unfortunately I'm having trouble with the
push_san()
function. Here is a sample of code :For each legal move, it says "Bad move".