Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time forfeits #10

Open
SzotsGabor opened this issue Oct 15, 2020 · 2 comments
Open

Time forfeits #10

SzotsGabor opened this issue Oct 15, 2020 · 2 comments

Comments

@SzotsGabor
Copy link

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.

@rwbc
Copy link

rwbc commented Apr 2, 2022

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.

@SzotsGabor
Copy link
Author

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants