Skip to content

Commit

Permalink
Bench: 3556179
Browse files Browse the repository at this point in the history
  • Loading branch information
jhonnold committed Sep 27, 2023
1 parent e74d3c0 commit 690f2d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/search.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ void Search(ThreadData* thread) {
else if (Limits.timeset && thread->depth >= 5 && !Threads.stopOnPonderHit) {
int sameBestMove = bestMove == previousBestMove; // same move?
searchStability = sameBestMove ? Min(10, searchStability + 1) : 0; // increase how stable our best move is
double stabilityFactor = 1.2173 - 0.0490 * searchStability;
double stabilityFactor = 1.1988 - 0.0475 * searchStability;

Score searchScoreDiff = scores[thread->depth - 3] - bestScore;
Score prevScoreDiff = thread->previousScore - bestScore;
Expand All @@ -273,14 +273,14 @@ void Search(ThreadData* thread) {
if (thread->previousScore == UNKNOWN)
searchScoreDiff *= 2, prevScoreDiff = 0;

double scoreChangeFactor = 0.0987 + //
0.0264 * searchScoreDiff * (searchScoreDiff > 0) + //
0.0267 * prevScoreDiff * (prevScoreDiff > 0);
scoreChangeFactor = Max(0.5053, Min(1.5520, scoreChangeFactor));
double scoreChangeFactor = 0.1021 + //
0.0258 * searchScoreDiff * (searchScoreDiff > 0) + //
0.0268 * prevScoreDiff * (prevScoreDiff > 0);
scoreChangeFactor = Max(0.4950, Min(1.5563, scoreChangeFactor));

uint64_t bestMoveNodes = thread->rootMoves[0].nodes;
double pctNodesNotBest = 1.0 - (double) bestMoveNodes / thread->nodes;
double nodeCountFactor = Max(0.5161, pctNodesNotBest * 1.9843 + 0.4014);
double nodeCountFactor = Max(0.5288, pctNodesNotBest * 2.1380 + 0.4242);
if (bestScore >= TB_WIN_BOUND)
nodeCountFactor = 0.5;

Expand Down
4 changes: 2 additions & 2 deletions src/uci.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ void ParseGo(char* in, Board* board) {
if (movesToGo == -1) {
int total = Max(1, time + 50 * inc - MOVE_OVERHEAD);

Limits.alloc = Min(time * 0.3091, total * 0.0502);
Limits.max = Min((time - MOVE_OVERHEAD) * 0.7843, Limits.alloc * 5.4599);
Limits.alloc = Min(time * 0.2900, total * 0.0490);
Limits.max = Min((time - MOVE_OVERHEAD) * 0.7713, Limits.alloc * 5.2661);
} else {
int total = Max(1, time + movesToGo * inc - MOVE_OVERHEAD);

Expand Down

0 comments on commit 690f2d9

Please sign in to comment.