skotz/skotz-chess-engine

Illegal en-passant move

Closed this issue · 1 comments

skotz commented

The engine doesn't realize that its pawn on e5 was taken en passant in the following position, and tries to play the illegal move exd4.

position startpos moves b1c3 g8f6 g1f3 b8c6 d2d3 d7d6 c1g5 c8g4 h2h3 g4e6 e2e4 h7h6 g5e3 d8d7 f1e2 e8c8 e1g1 c8b8 d3d4 c6b4 d4d5 e6h3 g2h3 d7h3 e3a7 b8a7 d1d4 a7b8 d4b4 h3g4 g1h2 g4h5 h2g2 d8e8 f3d4 h5g5 g2h3 e7e5 d5e6
go depth 4
skotz commented

Fixed! It was due to loading moves from a string and not flagging the en-passant square.