I like your idea of simply ending a game after you verify that the 50 move rule, or three-fold-repetition draw has actually happened. But turning the draw claim into a loss is not so hot...Matthias Gemuh wrote:Then "it shows an incredibly poor design" is simply wrong for ChessGUI that terminates games without allowing any races.bob wrote:The problem is the draw claim. If it is made _before_ a move is made, it should appear _before_ the move is sent. If it is made for the position _after_ the move is made, it should appear _after_ the move is sent. But that leaves the two-message race condition I have repeatedly shown. You get the move, you send it to the opponent, and you get a move back from him before you even see my draw claim. My process could be pre-empted. You might check for input on both descriptors and check my opponent's first as it is a lower number. Any number of events can cause you to read from two different descriptors and get data that is not in the order it was written with respect to time.Matthias Gemuh wrote:Please, clarify.bob wrote: No, but it shows an incredibly poor design. One doesn't use "time" to try to synchronize two parallel events. It never works.
The events of one engine don't even know that a second engine exists.
What has that got to do with synchronizing ?
What is the better design for Windows ?
The better design is to combine the offer/move, claim, or claim after move so that there is one command that does both, if one wants to do both. Not two commands that are separated in time that can stretch out further than one would expect.
Say that if it permits playing beyond "first occurence" without better sync.
Matthias.
In my referee, I ignore the results because more than one program gets that wrong anyway. But I don't want to penalize them for that because I care about the real game result for my testing, not the fact that someone screws up sending a wrong result. I also ignore draw stuff completely as well, since so many can't do that properly and I didn't want to write code to handle all the broken cases I have seen. I just let the games play out unless a real drawing condition on the board is recognized.