Better solution would be a "hit the clock" command so that I can send anything I want, a move, a draw offer/claim, etc, and my "move" is not completed (by the FIDE rules of chess) until I press the clock button.
Yes, WB protocol is far from optimal, but there are 500+ engines using it, so we will have to make do with it. So what is "better" is not only a matter of taste, but also quite irrelevant. Changing the protocol in an uncompatible way is not an option.
3. Again, "offer draw" does this, in absence of a legal draw condition. If the GUI cannot grant the draw, because there is no legal basis to claim one, it sends "draw" to the opponent to inform it of the offer.
There is a significant difference between "offering a draw" and "claiming a draw". I see no sense in overloading the "offer draw" to behave as above.
Overloading is an unfortunate necessity to stay within the protocol. Furthermore I see no major objections against it. I see the difference between the two as very
insignificant. In both cases you
request a draw from the first party along the line authorized to grant you one. Sometimes the arbiter (=GUI or ICS) has the power to grant you one, sometimes the decision rests with the opponent. The GUI will know where it lies. So why use two different keywords. That the keyword is "offer" in stead of "request" is perhaps an unlucky choice, but who cares? It is just a protocol.
4. Same as 3. The engine can send "offer draw" at any time, before its move or after its move. It is a separate command.
It should not be able to send anything while the opponent is on move. We have already had interesting problems with this. I make a move, then while it is not my move I flood my opponent with draw offers to slow him down. In human games, it is against the rules to offer a draw while he is on move.
Is it so hard for you to imagine that the GUI would not pass on the information if the timing is not appropriote and it cannot handle the command itself? Or is it unknown to you that engines only communicate with the GUI, and never directly with each other?
5. Exactly. This is why WinBoard_F makes them forfeit the game when they claim a draw through the WinBoard RESULT command in a position that is not a legal draw. Remember that WinBoard protocol defines the RESULT command as what the engine sends when it is not possible or prepared under any circumstances to continue with the game. So when an engine sends it, the GUI has no option but to terminate the game; refusing the RESULT command and waiting for the engine to reconsider its decision, will just hang the game and the tournament.
So what exactly is your problem????
I want to see it done correctly, according to the rules of chess. I want two options. I want to be able to offer a draw, only when it is my move, otherwise the offer is simply ignored; I want to be able to claim a draw, only when it is my move, and the claim is accepted or rejected, but without causing me to lose the game. That is the way FIDE works. If a program can't handle a rejected draw claim, then let it lose on time since it is not playing legal chess.
Well, the "offer draw" command does exactly all that. So everything is exactly as FIDE works. It seems you are making all this fuss only because you think the required command should be worded differently, "claim draw" in stead of "offer draw". It is not only beyond childish to argue aboutmere wording of a command, but there are very good reasons NOT to introduce a new one: it would make engines that use it _incompatible_ with older versions of WinBoard.
If I would add, especially for your benifit, a _new_ command to WinBoard to claim the draw, so that you would not have to use the string "offer draw" to claim a draw after which you are prepared to play on, but could send some other string, say "iamanidiot" to WinBoard in stead, (although others could still use "offer draw" for that purpose), would that make you happy? I can even make it such that the string is ignored unless you enable it in the "feature" command, by saying "iamanidiot=TRUE".
I prefer one of the following, syntactically:
offer draw Re1+
{I am offering a draw, because I think the position is either eventually drawn or it is dead even at the moment. I am also playing the move Re1 whether he accepts the offer or not.}
Re1+ draw
{I am playing the move Re1+ and I claim it is a draw (it is up to the GUI to figure out if it is a 50 move draw, or a repetition, or insufficient material, or a double-flag, or whatever. Again I have to be prepared to play on if the GUI disagrees for whatever reason}
Re1+ draw stop clock or
draw Re1+ stop clock
{I give my move, a draw claim, and tell the GUI my move is complete by giving the stop clock. The GUI doesn't inform my opponent of the move until I "stop the clock" as in FIDE human games.}
To offer a draw, this would become:
re1+ offer draw stop clock
We also need the special case:
draw stop clock
as it is possible that the position before I even move is a repetition or 50-move rule draw and I don't have to make a move to make the claim (again by the FIDE rules).
Yes, very nice. I can see why you are so reluctant to get out of your world of fantasy.
But in the harsh reality what you propose is of course totally out of the question, as it would make engines that use it incompatible with older versions of WinBoard. The way I implement things in WinBoard_F stays within existing protocol, (no matter how obnoxious I think this protocol is...) so that engines would not have to support two different protocols tobe able to run in every WinBoard tournament.
ONLY if your fix is better than what we have. So far it does not seem to be so since it is violating FIDE rules in the way it behaves. For example, in FIDE rules, claiming a draw does not cause me to lose if the arbiter disallows the claim (perhaps I have an incomplete score sheet, or I incorrectly ignored enpassant on the first repetition or whatever... I just have to keep playing.
Your objections solely stem from the incorrect assumption that a 1/2-1/2 message is just a draw claim. But in fact it is defined as expressing the absolute refusal to play on. So tell me, what would the FIDE rules specify if you told the arbiter, after he ordered you to keep playing: "f** you, not n your life", and would leave the tournament hall? I doubt he would be staying up two more hours until your flag finally fell... And even if he was, you cannot expect such leniency from testers that donate their precious CPU time to testing your roque engine.
Any chance this can follow the _real_ rules of chess and not use some ad-hoc policy? If I claim a draw in a tournament, I don't lose if the draw is not upheld. I am forced to play on, sometimes with a time penalty, sometimes not. But I certainly do not lose.
You most certainly lose if you tell the referee you refuse to play on at the same time... And if you did not want to imply that, you should not have used the WinBoard command that is defined to imply that, but the other way to claim a draw (explicitly specify as "offer draw", how silly that might sound).
Thinking doesn't make it so, however. If an engine refuses to play on, let it lose on time, as it would in a FIDE event.
Not a chance any tester would accept or adopt a rule that would waste so much of their CPU time for no reason or benifit at all.