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

Remove hardcoded exact values for parameters that are subject to tuning #5713

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -847,8 +847,8 @@ Value Search::Worker::search(
if (depth <= 0)
return qsearch<PV>(pos, ss, alpha, beta);

// For cutNodes, if depth is high enough, decrease depth by 2 if there is no ttMove,
// or by 1 if there is a ttMove with an upper bound.
// For cutNodes, if depth is high enough, decrease depth if there is no ttMove,
// or if there is a ttMove with an upper bound.
if (cutNode && depth >= 7 && (!ttData.move || ttData.bound == BOUND_UPPER))
depth -= 1 + !ttData.move;

Expand Down Expand Up @@ -1228,7 +1228,7 @@ Value Search::Worker::search(
if (!ttData.move)
r += 2037;

// Note that if expected reduction is high, we reduce search depth by 1 here (~9 Elo)
// Note that if expected reduction is high, we reduce search depth here (~9 Elo)
value =
-search<NonPV>(pos, ss + 1, -(alpha + 1), -alpha, newDepth - (r > 2983), !cutNode);
}
Expand Down Expand Up @@ -1401,7 +1401,7 @@ Value Search::Worker::search(

else if (priorCapture && prevSq != SQ_NONE)
{
// bonus for prior countermoves that caused the fail low
// Bonus for prior countermoves that caused the fail low
Piece capturedPiece = pos.captured_piece();
assert(capturedPiece != NO_PIECE);
thisThread->captureHistory[pos.piece_on(prevSq)][prevSq][type_of(capturedPiece)]
Expand Down
2 changes: 1 addition & 1 deletion src/timeman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void TimeManagement::init(Search::LimitsType& limits,
const TimePoint scaledTime = limits.time[us] / scaleFactor;
const TimePoint scaledInc = limits.inc[us] / scaleFactor;

// Maximum move horizon of 50 moves
// Maximum move horizon
int mtg = limits.movestogo ? std::min(limits.movestogo, 50) : 50;

// If less than one second, gradually reduce mtg
Expand Down
Loading