MisterQueen icon indicating copy to clipboard operation
MisterQueen copied to clipboard

Time forfeits

Open SzotsGabor opened this issue 4 years ago • 2 comments

Mister Queen exceeds time in about 80 % of its games around move 40. Tried with 2+1, 40/2, with and without internal book, no difference.

BTW, there is a fluctuation in memory allocation between 26 and 67 MB's. It uses the bigger memory when on move.

SzotsGabor avatar Oct 15 '20 13:10 SzotsGabor

Just now after all the time I saw your issue Gabor and looked at MisterQueens time management. Actually it has none, but a hard coded limit of exactly 4 seconds per move :)

void handle_go(char *line) {
    search.uci = 1;
    search.use_book = 1;
    search.duration = 4;
    char *key;
    char *token = tokenize(line, " ", &key);
    while (token) {
        if (strcmp(token, "infinite") == 0) {
            search.duration = 0;
            search.use_book = 0;
        }
        else if (strcmp(token, "movetime") == 0) {
            char *arg = tokenize(NULL, " ", &key);
            search.duration = atoi(arg) / 1000.0;
        }
        else if (strcmp(token, "ponder") == 0) {
            return; // no pondering yet
        }
        token = tokenize(NULL, " ", &key);
    }
    thread_start();
}

That's all, it does not know about btime/wtime/inc or book/GUI moves You could compile diff. versions with other limits w/o having to add some own timecontrol code, though.

rwbc avatar Apr 02 '22 07:04 rwbc

Thanks Günther. It's funny I did not notice that, it's the next line below search.use_book = 1 which I changed to 0 to disable the book (see the relevant issue).

SzotsGabor avatar Apr 02 '22 08:04 SzotsGabor