WinBoard Protocol: 'level' and 'st' command

Discussions about the WinBoard protocol. Here you can also report bugs and request new features.

Moderators: hgm, Andres Valverde

WinBoard Protocol: 'level' and 'st' command

Postby Flame02 » 08 Jun 2011, 16:15

I'm working on a program to play games, matches and tournaments between engines, and have a few questions about the WinBoard protocols 'level' and 'st' commands.

I want to play a game like the following (just an example) between two engines:

the first 40 moves 120 minuttes (no increment)
the next 20 moves 60 minuttes (no increment)
the remaining moves 30 minuttes

I understand the initial 'level' command has to be:

"level 40 120 0"

when the white engine sends the 40th move:

"move <white move>"

I will reply:

"level 20 X 0"

where X is: ( 60 + what remains on whites clock after the first 40 move ).

I then forward <white move> to the black engine:

"<white move>"

and eventually it replies:

"move <black move>"

which will be its 40th move, I send it:

"level 20 Y 0"

where Y is: ( 60 + what remains on black clock after the first 40 move ).

After white and blacks 60th move I do the same:

"level 0 Z 0"

where Z is ( 30 + remaing ... ).

Is this correct?


-----

It is probably not important, but just to be absolutely sure I understand:

- the remaing time is truncated to seconds, and what is less than a second is lost (e.g. if white has 5.2 secs left on the clock at the first time control he will not have 60:05.2 after, but only 60:05)?


-----

Is it better to use (after the 40th move):

"level 20 60 0"
"time X"

where X is: ( "60" + what remains on the engines clock after the first 40 move ), to keep the 'level' command "clean"? ("60" as 60 minuttes in centiseconds)


-----

I do not plan to use 'st', but is:

"st X"

not the same as:

"level 1 X' 0"

where X is seconds, and X' is X in minuttes?
Flame02
 
Posts: 1
Joined: 24 May 2011, 08:22

Re: WinBoard Protocol: 'level' and 'st' command

Postby H.G.Muller » 08 Jun 2011, 20:38

Well, we are entering a gray area here, as WinBoard so far does not support multi-session TC, and the original definition of WB protocol did not address it, and tacitly assumed level commands would be sent only at the start of a game. It seems that most engines would behave correctly when you treat them as you described, which is why I defined the meaning of intra-game level commands that way.

Note that WinBoard would always send a time command after the level N M 0 command (because it does do that before every move), which effectively overrules M. Due to the difference in precision of the time and level commands, it would be asking for trouble in a GUI to refrain from sending the time command.

st X is NOT the same as level 1 X 0. The difference is that in the latter case any time you do not use is left on your clock, and the new time allotment X is added to that. In st X the clock is reset to X before each move, no matter how much time there was left on the clock.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL


Return to WinBoard development and bugfixing

Who is online

Users browsing this forum: No registered users and 9 guests