Geschrieben von: / Posted by: Dieter Bürßner at 13 June 2000 11:40:20:
Als Antwort auf: / As an answer to: Re: Yace oddities following a draw (mainly to Dieter) geschrieben von: / posted by: U.Türke at 12 June 2000 22:13:53:
Sometimes, after a draw, Yace does something weird like this:
[White "Comet"]
[Black "Yace"]
1. e4 Rh8xd8
{Draw} 1/2-1/2
It does not happen after a win or a loss
The move Rh8xd8 refers to the previous game. Winboard does not know this >because it had already sent the "new" command.
Dieter, do you use
fflush(stdout)
after output of a move ?
If I am right, then your search is continuing until you receive the "new"
command.
In this case, it could help to use the "result" command, sent by winboard and
indicating game-end in order to terminate the search earlier.
I think, I have found this bug. For the curious, I had an early exit
in the search, when only one move is possible. This exit was before the
drawing logic. Seems to be fixed now.
Yes, after any output the stream will be flushed.
It really is even more primitive. When I receive a move, Yace searches as long
as it finds suitable (or reports a Draw or Mate). Until now, Yace cannot
be interrupted from winboard. But this should be enough, when the
opponent either moves or sends an result (or mates and sends an result).
If it's a draw, Yace should detect it (with the exception of the bug
I mentioned earlier) and replies by 1/2 - 1/2 without sending a move.
When I receive the result command, I have already answered the last move ...
The fix I indicated won't solve the problems with Crafty. From an
answer to Dann:
I have analyzed a few such cases with Crafty. At least in those
cases, IHMO this was Crafty's fault. Crafty makes a move, and then
claims draw by 3-fold repetition. Due to my understanding of the
chess rules, this is not allowed. (Please correct me, if I am wrong.)
Also, I think making a move and then resigning or claiming a draw, is
somewhat against (my very terse and new understanding) of the spirit
of the winboard protocol. By this spirit, I mean, that winboard
allows the engine to process the commands like a queue. When Crafty
sends a move, Yace will receive it and process it. Crafty immediately
after this sends a result (resign or draw). But Yace will answer the
last move first ...
And from the PGN Dann Corbit sent me, at least in two cases, Crafty
seems even to claim a draw by 3-fold repetition too early.
[White "Yace"]
[Black "Crafty"]
38. Rf6 gxf3 39. Rf5+ Kg6 40. Rf6+ Kg5 41. Rf5+ Kg6 42. Rf6+ Kg5
{Drawn by 3-fold repetition} 1/2-1/2
I might seem very stupid, but I cannot see a 3-fold repetition here.
Crafty's last move, Kg5 is only the second move of the king to g5
after the last capture (39. ... gxf3) (The message comes from Crafy,
Yace doesn't say "3-fold".)
In a later game:
Qd2 Qf1 39. Qf4 Qa1 40. Qd6 Bc8 41. a3 Qf1 42. Qf4 Qa1 43. Qd6 Qf1 44. Qf4
Qa1 45. Qd6
{Drawn by 3-fold repetition} 1/2-1/2
The last irreversible move is 41. a3. After that the queen moved to
d6 only two times.
As was indicated by Mogens Larsen, the problem should be fixed by
telling winboard to not reuse the engines in a match. I use the
following switches at the command-line:
winboard /reuseFirst=false /reuseSecond=false
Best wishes,
Dieter