Page 1 of 1

Protocol question

PostPosted: 02 Nov 2009, 10:46
by Michel
I noticed that the time management of GnuChess behaves strangely when playing from fixed positions.

When trying to fix this I noticed that the protocol does not seem to specify how setboard and
time controls interract.

Even if the FEN has move counter 1 it is unclear what to do if black is to move.

Should we assume that white has made a move or not?

I think it would be good to make this explicit in the protocol.

Re: Protocol question

PostPosted: 02 Nov 2009, 11:19
by H.G.Muller
Indeed. In this case WinBoard gives new time to the white player after he has made 39 moves from the entered position. Note that this is consistent with the interpretation of a level command as defining the start of a new session at the moment it is received, and resetting the ply number to the ply specified in the FEN on receiving a setboard command: the level command is sent before the setboard in this case. Even engines that use 'edit' to setup the position get a ply-number adjustment: the 'black kludge' forces the dummy move a2a3 into them after the level command has been sent, before editing the position.

So the definition of the level command should specify it counts from the current position, as I just proposed on TalkChess. The reception of a FEN should be interpreted as if all the moves implied from the move counter have indeed been played. Note that WinBoard ignores the move number of FENs you paste into it, and always assumes a setup position is in the first move of the game.

I guess this definition breaks the -forceIllegalMoves option I just added in 4.4.1 for engines supporting setboard, as that is a case where I would really have to send the correct move number in the FEN not to confuse them. (I only used this option on Fairy-Max, which uses 'edit', and thus does not receive an explicit move number.)