diff --git a/src/extra/nnue_data_binpack_format.h b/src/extra/nnue_data_binpack_format.h index dce53b83..b957fae6 100644 --- a/src/extra/nnue_data_binpack_format.h +++ b/src/extra/nnue_data_binpack_format.h @@ -6115,6 +6115,26 @@ namespace chess return false; } + if (pieceAt(epSquare) != Piece::none()) + { + return false; + } + + const auto forward = + sideToMove == chess::Color::White + ? FlatSquareOffset(0, 1) + : FlatSquareOffset(0, -1); + + if (pieceAt(epSquare + forward) != Piece::none()) + { + return false; + } + + if (pieceAt(epSquare + -forward) != Piece(PieceType::Pawn, !sideToMove)) + { + return false; + } + return isEpPossibleColdPath(epSquare, pawnsAttackingEpSquare, sideToMove); }