Skip to content

Commit

Permalink
Bench: 3610661
Browse files Browse the repository at this point in the history
  • Loading branch information
jhonnold committed Sep 30, 2023
1 parent 05769c3 commit b7f8e8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/search.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int STATIC_PRUNE[2][MAX_SEARCH_PLY];
void InitPruningAndReductionTables() {
for (int depth = 1; depth < MAX_SEARCH_PLY; depth++)
for (int moves = 1; moves < 64; moves++)
LMR[depth][moves] = log(depth) * log(moves) / 2.25 + 0.25;
LMR[depth][moves] = ((1.3 * log(Threads.count) + 14.222) * log(depth) * log(moves) + 8) / 32.0;

LMR[0][0] = LMR[0][1] = LMR[1][0] = 0;

Expand Down
6 changes: 4 additions & 2 deletions src/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ void ThreadsSetNumber(int n) {

if (n == 0)
Threads.searching = 0;

InitPruningAndReductionTables();
}

// End
Expand All @@ -191,8 +193,8 @@ void ThreadsInit() {
pthread_mutex_init(&Threads.mutex, NULL);
pthread_cond_init(&Threads.sleep, NULL);

Threads.count = 1;
ThreadCreate(0);
Threads.count = 0;
ThreadsSetNumber(1);
}

INLINE void InitRootMove(RootMove* rm, Move move) {
Expand Down

0 comments on commit b7f8e8c

Please sign in to comment.