Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase prior countermove bonus if TT move #5809

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,7 @@ Value Search::Worker::search(
thisThread->nodes.fetch_add(1, std::memory_order_relaxed);

ss->currentMove = move;
ss->isTTMove = (move == ttData.move);
ss->continuationHistory =
&this->continuationHistory[ss->inCheck][true][movedPiece][move.to_sq()];
ss->continuationCorrectionHistory =
Expand Down Expand Up @@ -1138,6 +1139,7 @@ Value Search::Worker::search(

// Update the current move (this must be done after singular extension search)
ss->currentMove = move;
ss->isTTMove = (move == ttData.move);
ss->continuationHistory =
&thisThread->continuationHistory[ss->inCheck][capture][movedPiece][move.to_sq()];
ss->continuationCorrectionHistory =
Expand Down Expand Up @@ -1387,7 +1389,8 @@ Value Search::Worker::search(
{
int bonusScale = (118 * (depth > 5) + 37 * !allNode + 169 * ((ss - 1)->moveCount > 8)
+ 128 * (!ss->inCheck && bestValue <= ss->staticEval - 102)
+ 115 * (!(ss - 1)->inCheck && bestValue <= -(ss - 1)->staticEval - 82));
+ 115 * (!(ss - 1)->inCheck && bestValue <= -(ss - 1)->staticEval - 82)
+ 80 * ((ss - 1)->isTTMove));

// Proportional to "how much damage we have to undo"
bonusScale += std::min(-(ss - 1)->statScore / 106, 318);
Expand Down
1 change: 1 addition & 0 deletions src/search.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ struct Stack {
bool ttHit;
int cutoffCnt;
int reduction;
bool isTTMove;
};


Expand Down
Loading