I'm now doing:
Code: Select all
double useTime = (timeLeft / 2.) * (p2dim - nEmpty) / p2dim * 0.95;
Code: Select all
timeLeft: from time_left
p2dim: board dimension ^2, e.g. 19 * 19
nEmpty: how many empty crosses there are on the board
Code: Select all
double useTime = (timeLeft / 2.) * (p2dim - nEmpty) / p2dim * 0.95;
Code: Select all
timeLeft: from time_left
p2dim: board dimension ^2, e.g. 19 * 19
nEmpty: how many empty crosses there are on the board
Code: Select all
timeLeft -= securityMargin;
double useTime = (timeLeft / 2.) * (p2dim - nEmpty) / p2dim * 0.95;
Exactly. And maybe in the future on kgs or so.
Oh wow! Is that the python-version of the cgos server?Rémi Coulom wrote: ↑Thu Feb 16, 2023 3:18 pm I noticed it is necessary to take a very large security margin with respect to time control on CGOS, because of the performance problems of the server. For instance, if you try to connect with the tk viewer client, it will block for a while. It seems the server is blocked during that whole time, and some unlucky players may lose that much time on their clock.
Thanks in advance.I do something like:
securityMargin must be 30 seconds or so.Code: Select all
timeLeft -= securityMargin; double useTime = (timeLeft / 2.) * (p2dim - nEmpty) / p2dim * 0.95;
I will connect my very weak bots later today so that you can have more fun.
Code: Select all
size_t totalNChains = chainsWhite.size() + chainsBlack.size();
double useTime = (timeLeft / 2.) * totalNChains / p2dim * 0.95;
Sorry, I did not have time. I have been a bit busy. I will do it soon.Rémi Coulom wrote: ↑Thu Feb 16, 2023 3:18 pmI will connect my very weak bots later today so that you can have more fun.