bob wrote:Laurens Winkelhagen wrote:as far as I know you should implement the "sd" command as a limit, not as an order: I mean, the engine should not think deeper than 9999 ply, but it's very much allowed to think less:-)
I must say that if that is true, it is a truly stupid interpretation of that command, which several programs have been using for 20+ years. In Crafty, sd=n says to search N plies deep. Period...
From the defintion of WB protocol v2 on Tim Mann's web page
Chess Engine Communication Protocol wrote:sd DEPTH
The engine should limit its thinking to DEPTH ply.
WinBoard Manual wrote:/depth or /searchDepth number
Tells the chess engine to look ahead at most the given number of moves when searching for a move to make. Without this option, the engine chooses its search depth based on the number of moves and amount of time remaining until the next time control. With the option, the engine will cut off its search early if it reaches the specified depth.
Seems to me the words 'limit' or 'at most' (underlining is mine) are quite unambiguous. For those still in doubt, we can see how Tim Mann's WinBoard / XBoard implements it, and it always sends
both the
level command and the
sd command (when non-zero argument was requested). The code for this in WB 4.2.7b goes accompanied by the comment:
Code: Select all
/* Orthogonally, limit search to given depth */
Also here, 'orthogonally' leaves little doubt.
So it seems Crafty (and perhaps several other programs that have been using the
sd command for 20+ years

) have a faulty, or at least non-compliant implmentation of
sd.
I can add tha both my engines implement
sd correctly, i.e. as a limit, that should be obeyed
in addition to the time limits specifid by the
st or
level commands.