When to claim repetition and 50 move draws?

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

When to claim repetition and 50 move draws?

Postby peterhughes » 26 Mar 2005, 15:34

According to http://fideonline.com/official/handbook.asp?level=EE101:

9.2 The game is drawn, upon a correct claim by the player having the move, when the same position, for at least the third time (not necessarily by sequential repetition of moves)

1. is about to appear, if he first writes his move on his scoresheet and declares to the arbiter his intention to make this move, or
2. has just appeared, and the player claiming the draw has the move.

Positions as in (a) and (b) are considered the same, if the same player has the move, pieces of the same kind and colour occupy the same squares, and the possible moves of all the pieces of both players are the same.
Positions are not the same if a pawn that could have been captured en passant can no longer be captured or if the right to castle has been changed temporarily or permanently.

9.3 The game is drawn, upon a correct claim by the player having the move, if


1. he writes on his scoresheet, and declares to the arbiter his intention to make a move which shall result in the last 50 moves having been made by each player without the movement of any pawn and without the capture of any piece, or
2. the last 50 consecutive moves have been made by each player without the movement of any pawn and without the capture of any piece.



So, in both types of draw, there are 2 different times when a draw can be claimed:

Case 1) The player-to-play (A) moves into a draw position, and at the same time claims a draw.

Case 2) "Case 1" must have just occured , but player (A) has not claimed a draw, and therefore player (B) has the opportunity to claim a draw.

In Case 1 (where I'm about to move into a draw), when should I send the WinBoard "draw" command? Do I send "draw" immediately after I send my "move" command, or should I send it immedidately before the "move" command, or should I not send "draw" at all, and just wait for my opponent to claim "draw", as per Case 2?

Thanks
Peter Hughes
peterhughes
 
Posts: 42
Joined: 18 Jan 2005, 23:37

Re: When to claim repetition and 50 move draws?

Postby Pallav Nawani » 26 Mar 2005, 18:20

In my engine, I do this:
(a) If it is my turn to move, and it is either 3 rep draw or 50 moves draw, I don't make a move, I just claim the draw.
(b) If it is a draw after my move, I don't claim a draw, I just make the move. This is probably not the best thing to do.

Pallav
User avatar
Pallav Nawani
 
Posts: 147
Joined: 26 Sep 2004, 20:00
Location: Dehradun, India

Re: When to claim repetition and 50 move draws?

Postby Sven Schüle » 26 Mar 2005, 19:03

peterhughes wrote:In Case 1 (where I'm about to move into a draw), when should I send the WinBoard "draw" command? Do I send "draw" immediately after I send my "move" command, or should I send it immedidately before the "move" command, or should I not send "draw" at all, and just wait for my opponent to claim "draw", as per Case 2?
Hi Peter,

the first thing to remark is that "draw" is not the correct WinBoard command to claim a draw. Send "result 1/2-1/2 {Draw by repetition}" for example (the text in curly brackets can be defined by your engine). The "draw" command is sent by WinBoard if your engine's opponent offers a draw (i.e. has sent the "offer draw" command). Refer to Tim Mann's page for more details; there you find the following text:
When your engine detects that the game has ended by rule, your engine must output a line of the form "RESULT {comment}" (without the quotes), where RESULT is a PGN result code (1-0, 0-1, or 1/2-1/2), and comment is the reason. Here "by rule" means that the game is definitely over because of what happened on the board. In normal chess, this includes checkmate, stalemate, triple repetition, the 50 move rule, or insufficient material; [...]

And now to answer your question: it is not exactly defined. I can only tell you how I do it in my engine.

- If it's the engine's turn and a draw by repetition or by 50-moves-rule is detected before the engine starts thinking about its next move, it claims the draw and does not make a move.

- If the engine makes its move and detects a repetition or 50-moves draw after that move, it immediately sends the draw claim, too.

Perhaps it would be better to have a WinBoard protocol element which allows to make a move and claim a draw together in one atomic action, to make the latter case less error prone (currently it could happen in theory that something comes in between, and my "result" command then appears to be out of order).

Sven
User avatar
Sven Schüle
 
Posts: 240
Joined: 26 Sep 2004, 20:19
Location: Berlin, Germany

Re: When to claim repetition and 50 move draws?

Postby Anonymous » 26 Mar 2005, 19:07

Pallav Nawani wrote:In my engine, I do this:
(a) If it is my turn to move, and it is either 3 rep draw or 50 moves draw, I don't make a move, I just claim the draw.
(b) If it is a draw after my move, I don't claim a draw, I just make the move. This is probably not the best thing to do.


Indeed, this is a problem. It is actually a problem in the WB protocol that was pointed out a couple of times, and fixes were also proposed. In practice, what you do should be the best thing to do. WB (the GUI) always believes draw claims, but other GUI might not. Also there can be a timing issue when playing on a ICS and claiming a draw after a move (which is also not in accordance to FIDE rules). I send the move, WB sends it to ICS, it replies immediately, while WB sends the draw to the ICS (and this may be too late).

At some time I thought, it won't matter anyway. If we have the position already the third time after my move, we will also get another position a third time, when I am moving, and then I can claim a draw without problems (and without moving). So far true. I thought similar for the 50 moves rule. But this is not really true here. For example there are TB-mates in 101 plies. Also, Yace lost a game like this vs. Comet. The search did not know about the WB-protocol, and assumed just any 50th move that does not capture/pus a pawn would be good for a draw. So it offered a piece with the 100th ply. Comet took the offer and won.

BTW. I think it would be better to change the rules for computer games. It does not need any skill by the computer to count the number of times the position happened (it does of course need some programming). When a program moves into a 3-time repetition, it should be a draw, always! Not only if one side claims it (before it moves, which makes this a bit unsuited for the typical engine GUI communication). The engine really wants a draw than without doubt. Such a rule would also have avoided all those discussions at the CC WC in Graz 1 1/2 years ago.

Regards,
Dieter


Regards,
Dieter
Anonymous
 


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 21 guests