Uri Blass wrote:bob wrote:wgarvin wrote:Could it just be made to work like this?
(1) If you send "offer draw" to the GUI in a situation where you can legally claim a draw, it is interpreted as a draw claim and the game ends instantly.
(2) If you send "offer draw" to the GUI in a situation where you CAN'T legally claim a draw, it is forwarded to the opponent who can then respond to it in the usual way.
(3) If you send a RESULT of draw to the GUI in a situation where you can legally claim a draw, it is interpreted as a draw claim and the game ends instantly.
(4) If you send a RESULT of draw to the GUI in a situation where you CAN'T legally claim a draw, you have made an erroneous draw claim, *and* your engine is refusing to continue the game, so you forfeit.
Sending of RESULT strings seems kind of bogus anyway (it should be the GUI's job to recognize the end of the game and report it to both players?) but since its in the protocol, and since most engines can't continue sensibly after they send it, it makes sense to me for engines to forfeit if they send an incorrect RESULT string. Maybe its the moral equivalent of, claiming the draw and then standing up and walking away from the board and not coming back. Engines should prefer not to send RESULT strings anyway, and just use "offer draw" both to claim draws when that is legal, and to offer a draw to the opponent in other situations.
Have I missed anything important?
No. This is why I have suggested eliminating the "result" string completely since I do not believe it reasonable for an engine to have absolute power to terminate a game, and inform the GUI of the result. If someone wants, they can badly bias a match by sending result strings that credit them with a win.
The GUI should be the _only_ entity that terminates the game, and it ought to use the FIDE rules in doing so so that any program can play legal FIDE (human vs computer) or computer vs computer games without requiring any differences for the two game types...
The result string is about terminating the game.
Not the intent. I was around when this was added, and the idea was that the engine could tell xboard when it thought the game was over. Crafty was the first to use it and I used it for my own local testing when I wanted to play the max number of games possible in a given period of time. But it was implemented as a general feature, and it has been abused because engines can trivially claim the wrong result and produce misleading results.
But there is nothing that says that "the game can't continue".
My point has been that (a) this ought to be removed, because in a real game, I don't get to declare my game as won. The TD can do so, or my opponent can do so by resigning. (b) if it isn't removed, then it ought to be sanity-checked by the GUI and if it fails the check, it should simply be ignored.
On ICC, the result string is ignored by xboard. I'd like to see it ignored completely, but then xboard/winboard has to be able to reliably detect the end of the game. If Crafty is stalemated, it is not going to be able to move, ever. And if the GUI doesn't realize this and waits on it to produce a move, it will incorrectly lose on time. So the GUI has to do it right. And it might as well do it in a way that matches the FIDE Laws of Chess as closely as possible to avoid requiring two sets of rules internal to a program...
But to again recap, the Result string does not say "I refuse to continue playing". It says "I believe this game has ended with the following result..." I send it in Crafty, and I am prepared to continue because if you are playing on ICC, it is ignored completely. And until ICC fixed the draw offer problem previously discussed (a timing issue) one had to be prepared to continue the game, because a draw claim could be ignored since it was sent _after_ your move and with network delays, your draw claim could arrive after your opponent has already made his move invalidating the claim. If you could not continue, you would lose on time. I doubt many programs that play on ICC could not continue after sending a result command...
The meaning of the result command is that the engine claim result and refuse to continue(it does not contradict the fide rules because it can also happen in human-human games and if a player claim a draw and refuse to continue in case that the claim is not accepted then the player is going to lose the game).
But how does he lose? He does not lose instantly. He will get a time forfeit. And again, there is nothing at all that says "Result: if the engine sends this command, it is notifying the GUI that it is refusing to play on." Again, if this were the case, there would have been massive problems on ICC until last year when the draw offer/claim code was fixed to eliminate a race condition that could result in your sending a result command and it being ignored and the game would continue. The "refuses to continue to play" has simply not been a part of the standard as implemented. If you want to see this, just log on to ICC and start a game and have your program send a "result 1-0 {white mates}" after every move and see what happens. The game will be played as if the result was never sent. So how can it be that the engine has refused to play, if xboard allows it to do so? Answer is that is not the interpretation of the result command we used when defining or using it.
A good interface should decide if to accept the claim of the engine or to decide that the result is different .
I agree 100% and have been saying this since the beginning.
If you want a command to allow engines to claim draw without terminating the game(as done by the fide rules) then you need a different command because it is not logical to change the meaning of existing interface commands.
(1) This still assumes that everyone uses the result command to say "I refuse to play on." I do not believe this to be the case, else on ICC and FICS we would have seen way too many games lost on time when an engine sent the result and was then forced to play on because of the draw race bug.
(2) I don't want a command from a program that terminates the game, other than "resign". A program should be able to resign and stop playing. But it should not be able to claim any other result, that should be the GUI's responsibility.
Today offer draw is command with that meaning but it is not consistent with the fide rules because based on the fide rules offering a draw when you can claim a draw does not finish the game if the opponent does not accept the draw.
Uri
"offer draw" simply tells the gui to send "draw" to the opponent. It is, as I have repeatedly mentioned, overloaded in the winboard protocol, and should be fixed.
To repeat.
result should be removed entirely.
"offer draw" and "claim draw" should be used to offer or claim a draw, respectively. "claim draw" should not imply "I won't continue so if you don't approve the claim, I resign..." It should simply mean "I claim a draw, if you (the arbiter) disagree, I will continue to play.