Merge pull request #165 from rektdie/simplify-to-single-killer

simplified a killer away | bench 1207250
This commit was merged in pull request #165.
This commit is contained in:
rektdie authored and GitHub committed 2026-03-23 15:01:44 +01:00
commit c9f6ac3849
3 files changed
+4 -9

No files matched your search

+1 -4
View File
@@ -96,12 +96,9 @@ private:
+ capthistScore; + capthistScore;
} }
if (ctx->killerMoves[0][ply] == move) if (ctx->killerMoves[ply] == move)
return 41000; return 41000;
if (ctx->killerMoves[1][ply] == move)
return 40000;
bool sourceThreatened = board.IsSquareThreatened(board.sideToMove, move.MoveFrom()); bool sourceThreatened = board.IsSquareThreatened(board.sideToMove, move.MoveFrom());
bool targetThreatened = board.IsSquareThreatened(board.sideToMove, move.MoveTo()); bool targetThreatened = board.IsSquareThreatened(board.sideToMove, move.MoveTo());
+2 -4
View File
@@ -527,8 +527,7 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC
int seenQuietsCount = 0; int seenQuietsCount = 0;
int seenCapturesCount = 0; int seenCapturesCount = 0;
ctx->killerMoves[0][ply + 1] = Move(); ctx->killerMoves[ply + 1] = Move();
ctx->killerMoves[1][ply + 1] = Move();
// For all moves // For all moves
Move currMove; 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; int bonus = historyBonusMultiplier * (depth + (!board.InCheck() && staticEval <= alpha)) - historyBonusSub;
if (!currMove.IsCapture()) { if (!currMove.IsCapture()) {
ctx->killerMoves[1][ply] = ctx->killerMoves[0][ply]; ctx->killerMoves[ply] = currMove;
ctx->killerMoves[0][ply] = currMove;
ctx->history.Update(board.sideToMove, currMove, sourceThreatened, targetThreatened, bonus); ctx->history.Update(board.sideToMove, currMove, sourceThreatened, targetThreatened, bonus);
+1 -1
View File
@@ -232,7 +232,7 @@ public:
CorrHist corrhist; CorrHist corrhist;
CaptHistory capthist; CaptHistory capthist;
std::array<std::array<Move, MAX_DEPTH>, 2> killerMoves{}; std::array<Move, MAX_DEPTH> killerMoves{};
std::vector<U64> positionHistory; std::vector<U64> positionHistory;