From 9aa06bd120a350c1041b43cd6c047b72518f545c Mon Sep 17 00:00:00 2001 From: rektdie Date: Fri, 14 Mar 2025 15:11:56 +0100 Subject: [PATCH] fixed move ordering | bench 2105742 --- source/search.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/source/search.cpp b/source/search.cpp index bb4274d..d9dd5cd 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -20,17 +20,19 @@ inline PVLine pvLine; Stopwatch sw; static int ScoreMove(Board &board, Move &move) { - const int attackerType = board.GetPieceType(move.MoveFrom()); - const int targetType = board.GetPieceType(move.MoveTo()); - - if (attackerType == nullPieceType || targetType == nullPieceType) return 0; - TTEntry *current = TT.GetRawEntry(board.hashKey); if (current->bestMove == move) { return 50000; } if (move.IsCapture()) { + const int attackerType = board.GetPieceType(move.MoveFrom()); + int targetType = board.GetPieceType(move.MoveTo()); + + if (move.GetFlags() == epCapture) { + targetType = Pawn; + } + return moveScoreTable[attackerType][targetType] + 10000; } else { if (killerMoves[0][ply] == move) { -- 2.47.3