Geschrieben von:/Posted by: Andreas Herrmann at 21 June 2004 17:51:58:
Als Antwort auf:/In reply to: xboard protocol and sd/st geschrieben von:/posted by: Fabien Letouzey at 21 June 2004 13:20:53:
I thought I knew the protocols well but maybe not

A PolyGlot user reported a sd/st (depth limit and time-per-move limit) problem.
From his description it seems that the GUI assumes these limits are mutually exclusive. In that case, "sd" should reset the time limit and vice-versa.
Unfortunately I see no such indication in the xboard specs (they look independent). All I can see is that "new" resets the depth limit and that "level" resets the time limit.
PolyGlot handles both limits independently meaning they can both be in effect at the same time (note that I expect most UCI engines to have various problems with multiple limits).
Anybody knows what the correct way of interpreting sd/st is (if any)? It is important; if my implementation is incorrect, I will release a fixed version.
Thanks,
Fabien.
As far as i remember, i have read in the past a posting from Tim Mann, where he has sayd, that sd + level can be combined but not st + level.
For me that makes not much sense. In my engine i handle each as a different level (search depth, fixed time or the normal level command).
sd [n] -> BlackBishop searches n plys deep, a former level or st command will be ignored, pondering with sd is in my engine disabled
st [n] -> BlackBishop searches n seconds, a former level or sd command will be ignored, pondering with st is in my engine disabled
level... -> overwrites in BlackBishop a former sd or st command, pondering is possible
The following text is from engine-inf.html:
------------------------------------------------------------------------------
11. Time control
xboard supports three styles of time control: conventional chess clocks, the ICS-style incremental clock, and an exact number of seconds per move.
In conventional clock mode, every time control period is the same. That is, if the time control is 40 moves in 5 minutes, then after each side has made 40 moves, they each get an additional 5 minutes, and so on, ad infinitum. At some future time it would be nice to support a series of distinct time controls. This is very low on my personal priority list, but code donations to the xboard project are accepted, so feel free to take a swing at it. I suggest you talk to me first, though.
The command to set a conventional time control looks like this:
level 40 5 0
level 40 0:30 0
The 40 means that there are 40 moves per time control. The 5 means there are 5 minutes in the control. In the second example, the 0:30 means there are 30 seconds. The final 0 means that we are in conventional clock mode.
The command to set an incremental time control looks like this:
level 0 2 12
Here the 0 means "play the whole game in this time control period", the 2 means "base=2 minutes", and the 12 means "inc=12 seconds". As in conventional clock mode, the second argument to level can be in minutes and seconds.
At the start of the game, each player's clock is set to base minutes. Immediately after a player makes a move, inc seconds are added to his clock. A player's clock counts down while it is his turn. Your flag can be called whenever your clock is zero or negative. (Your clock can go negative and then become positive again because of the increment.)
A special rule on some ICS implementations: if you ask for a game with base=0, the clocks really start at 10 seconds instead of 0. xboard itself does not know about this rule, so it passes the 0 on to the engine instead of changing it to 0:10.
ICS also has time odds games. With time odds, each player has his own (base, inc) pair, but otherwise things work the same as in normal games. The Zippy xboard accepts time odds games but ignores the fact that the opponent's parameters are different; this is perhaps not quite the right thing to do, but gnuchess doesn't understand time odds. Time odds games are always unrated.
The command to set an exact number of seconds per move looks like this:
st 30
This means that each move must be made in at most 30 seconds. Time not used on one move does not accumulate for use on later moves.
---------------------------------------------------------------------------
That is the only text to the sd command in engine-inf.html, which i can find:
---------------------------------------------------------------------------
sd DEPTH
The engine should limit its thinking to DEPTH ply.
---------------------------------------------------------------------------
Andreas
wbholmes.de