Skip to content

Commit ad82397

Browse files
authored
reduce good captures (#87) bench: 10947002
Elo | 3.29 +- 2.27 (95%) SPRT | 8.0+0.08s Threads=1 Hash=16MB LLR | 3.00 (-2.94, 2.94) [0.00, 3.00] Games | N: 26628 W: 6375 L: 6123 D: 14130 Penta | [167, 3125, 6516, 3301, 205] https://vast342.pythonanywhere.com/test/24/
1 parent be7f6f6 commit ad82397

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/search.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,7 @@ int Engine::negamax(Board &board, int depth, int alpha, int beta, int ply, bool
519519
Move move = moves[i];
520520
if(move == stack[ply].excluded) continue;
521521
int moveStartSquare = move.getStartSquare();
522+
int movedPiece = board.pieceAtIndex(moveStartSquare);
522523
int moveEndSquare = move.getEndSquare();
523524
int moveFlag = move.getFlag();
524525
bool isCapture = ((capturable & (1ULL << moveEndSquare)) != 0) || moveFlag == EnPassant;
@@ -595,7 +596,7 @@ int Engine::negamax(Board &board, int depth, int alpha, int beta, int ply, bool
595596
if(isQuiet) {
596597
depthReduction -= moveValues[i] / int(hmrDivisor.value);
597598
} else {
598-
depthReduction -= moveValues[i] / int(cmrDivisor.value);
599+
depthReduction -= noisyHistoryTable[1 - board.getColorToMove()][movedPiece][moveEndSquare][moveVictim] / int(cmrDivisor.value);
599600
}
600601
depthReduction += isCutNode;
601602
depthReduction -= improving;

0 commit comments

Comments
 (0)