Seems I did not correctly remember my own protocol extensions...
I thought that the nps command specified knps, but it is indeed plain nps, (as the name suggests...). So multiplying the specified value by 1000 was not a good idea!
The version that is at the link now should have this fixed.
Even divided by 1000 the value (0.322 sec) is a bit fishy. I would have expected 0.250 sec. The code I modified in Polyglot is this, and it seems to me it should arrive at 0.250:
Code: Select all
engine_send_queue(Engine,"go");
if (XB->time_limit) {
// fixed time per move
if(node_rate > 0)
engine_send_queue(Engine," nodes %.0f",XB->time_max*(double)node_rate);
else
engine_send_queue(Engine," movetime %.0f",XB->time_max*1000.0);
} else {
// time controls
if(node_rate > 0) {
double time;
move_nb = 40;
if (XB->mps != 0) move_nb = XB->mps - (Uci->board->move_nb % XB->mps);
time = XB->my_time / move_nb;
if(XB->inc != 0) time += XB->inc;
if(time > XB->my_time) time = XB->my_time;
engine_send_queue(Engine," nodes %.0f",time*node_rate);
} else {
if (colour_is_white(Uci->board->turn)) {
engine_send_queue(Engine," wtime %.0f btime %.0f",XB->my_time*1000.0,XB->opp_time*1000.0);
} else {
engine_send_queue(Engine," wtime %.0f btime %.0f",XB->opp_time*1000.0,XB->my_time*1000.0);
}
if (XB->inc != 0.0) engine_send_queue(Engine," winc %.0f binc %.0f",XB->inc*1000.0,XB->inc*1000.0);
if (XB->mps != 0) {
move_nb = XB->mps - (Uci->board->move_nb % XB->mps);
ASSERT(move_nb>=1&&move_nb<=XB->mps);
engine_send_queue(Engine," movestogo %d",move_nb);
}
}
}
if (XB->depth_limit) engine_send_queue(Engine," depth %d",XB->depth_max);
if (State->state == PONDER) engine_send_queue(Engine," ponder");
engine_send(Engine,""); // newline