fixed move ordering | bench 2105742

This commit is contained in:
rektdie committed 2025-03-14 15:11:56 +01:00
1 parent 92ecd32972
commit 9aa06bd120
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) {