WinBoard Protocol: 'level' and 'st' command
Posted: 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?
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?