Merge pull request #18 from rektdie/ordering_fix

fixed move ordering | bench 2105742
This commit was merged in pull request #18.
This commit is contained in:
rektdie authored and GitHub committed 2025-03-14 15:41:57 +01:00
commit 0f412f1081
1 file changed
+7 -5
+7 -5
View File
@@ -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) {