From b0429237a86ea303d087e433783360f5858fb0f6 Mon Sep 17 00:00:00 2001 From: JWmer <26392242+NightlyKing@users.noreply.github.com> Date: Fri, 20 Nov 2020 15:48:18 +0100 Subject: [PATCH] Update half_ka.cpp --- src/nnue/features/half_ka.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/nnue/features/half_ka.cpp b/src/nnue/features/half_ka.cpp index 83e59067..08124b96 100644 --- a/src/nnue/features/half_ka.cpp +++ b/src/nnue/features/half_ka.cpp @@ -23,9 +23,13 @@ namespace Eval::NNUE::Features { - // Orient a square according to perspective (flip rank for black) + // Orient a square according to perspective (rotate the board 180° for black) + // Important note for "halfka": this arch was designed with "flip" in mind + // although it still is untested which approach is better. + // this has to stay until we find a better arch that works with "flip". + // allows us to use current master net for gensfen (primarily needed for higher quality data) inline Square orient(Color perspective, Square s) { - return Square(int(s) ^ (bool(perspective) * SQ_A8)); + return Square(int(s) ^ (bool(perspective) * 63)); } // Find the index of the feature quantity from the king position and PieceSquare