diff --git a/source/movepicker.h b/source/movepicker.h index b0361b2..efeb840 100644 --- a/source/movepicker.h +++ b/source/movepicker.h @@ -96,12 +96,9 @@ private: + capthistScore; } - if (ctx->killerMoves[0][ply] == move) + if (ctx->killerMoves[ply] == move) return 41000; - if (ctx->killerMoves[1][ply] == move) - return 40000; - bool sourceThreatened = board.IsSquareThreatened(board.sideToMove, move.MoveFrom()); bool targetThreatened = board.IsSquareThreatened(board.sideToMove, move.MoveTo()); diff --git a/source/search.cpp b/source/search.cpp index 5072eca..0a86cfb 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -527,8 +527,7 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC int seenQuietsCount = 0; int seenCapturesCount = 0; - ctx->killerMoves[0][ply + 1] = Move(); - ctx->killerMoves[1][ply + 1] = Move(); + ctx->killerMoves[ply + 1] = Move(); // For all moves Move currMove; @@ -704,8 +703,7 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC int bonus = historyBonusMultiplier * (depth + (!board.InCheck() && staticEval <= alpha)) - historyBonusSub; if (!currMove.IsCapture()) { - ctx->killerMoves[1][ply] = ctx->killerMoves[0][ply]; - ctx->killerMoves[0][ply] = currMove; + ctx->killerMoves[ply] = currMove; ctx->history.Update(board.sideToMove, currMove, sourceThreatened, targetThreatened, bonus); diff --git a/source/search.h b/source/search.h index e50f584..f4dcfff 100644 --- a/source/search.h +++ b/source/search.h @@ -232,7 +232,7 @@ public: CorrHist corrhist; CaptHistory capthist; - std::array, 2> killerMoves{}; + std::array killerMoves{}; std::vector positionHistory;