ref: c07247b02f53a78a315a2c402dc7d39fc3284ae7
parent: bf82ecda71e4afbbf0a553c9650dbba36f622aa9
author: zamfofex <zamfofex@twdb.moe>
date: Tue Nov 14 07:37:40 EST 2023
tweak time management
--- a/search.c
+++ b/search.c
@@ -42,7 +42,6 @@
return alpha;
}
-
#ifdef MOONFISH_HAS_PTHREAD
#include <pthread.h>
@@ -182,12 +181,12 @@
int i;
int score;
- d = our_time - their_time;
+ d = (our_time - their_time) / 4;
if (d < 0) d = 0;
- d += our_time / 8;
+ d += our_time / 16;
+ if (d > 30) d = 30;
- i = 3;
-
+ i = 4;
t = time(NULL);
score = moonfish_best_move_depth(ctx, best_move, i);
t = time(NULL) - t + 4;
--
⑨