Skip to content

Commit

Permalink
revert TM change for X/Y time controls
Browse files Browse the repository at this point in the history
Bench: 5299844
  • Loading branch information
PGG106 committed Dec 6, 2022
1 parent 2679400 commit d67a62a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
8 changes: 2 additions & 6 deletions src/time_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ void optimum(S_Board* pos, S_SearchINFO* info, int time, int inc) {
time -= safety_overhead;
int time_slot = time / info->movestogo;
int basetime = (time_slot);
//optime is the time we check anytime we clear a depth
int optime = basetime * 0.6;
//maxtime is the absolute maximum time we can spend on the current depth
int maxtime = (std::min)(time, basetime * 5/3);
info->stoptimeMax = info->starttime + maxtime;
info->stoptimeOpt = info->starttime + optime;
info->stoptimeMax = info->starttime + basetime;
info->stoptimeOpt = info->starttime + basetime;
}
else
{
Expand Down
5 changes: 2 additions & 3 deletions src/uci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ void Uci_Loop(S_Board* pos, S_Stack* ss, S_SearchINFO* info, char** argv) {
char input[40000];
std::thread search_thread;
// print engine info
printf("id name Alexandria 4.0-dev\n");
printf("id name Alexandria 3.1.0\n");

// main loop
while (1) {
Expand Down Expand Up @@ -343,11 +343,10 @@ void Uci_Loop(S_Board* pos, S_Stack* ss, S_SearchINFO* info, char** argv) {
// parse UCI "uci" command
else if (strncmp(input, "uci", 3) == 0) {
// print engine info
printf("id name Alexandria 4.0-dev\n");
printf("id name Alexandria 3.1.0\n");
printf("id author PGG\n");
printf("option name Hash type spin default 16 min 1 max 8192 \n");
printf("option name Threads type spin default 1 min 1 max 1 \n");
printf("option name Datagen type check default false \n");
printf("uciok\n");
}

Expand Down

0 comments on commit d67a62a

Please sign in to comment.