Draw Rules (halfmoveclock,repetition)

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
Desperado
Posts: 879
Joined: Mon Dec 15, 2008 11:45 am

Re: Draw Rules (halfmoveclock,repetition)

Post by Desperado »

hgm wrote:...Castling is considered reversible. ...
...if you are the player that moves to create the draw condition, you must claim the draw before you move...
Hello HGM :),

1. ok, clear statement with castling-move (happy about that) :)

2. if player creates draw condition... is also a clear statement,
but the question was, does the player create this condition
(is ply 100 accepted as 100 by the referee) _before_ he gives up the
right to move or (does ply 100 counts)
_after_ he gives up the right to move.

(i think that was a qualified question)

Well, it is definitely _before_.

cheers Michael
User avatar
hgm
Posts: 28390
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Draw Rules (halfmoveclock,repetition)

Post by hgm »

I am not sure what you mean by "give up the right to move". Is that the same as "move"?

The only thing confusing here IMO is the protocol for doing the atomic move+claim in draw-after-the-move situations. In stead of moving by touching the pieces on the board, you move by writing down the move and stopping the clock.
User avatar
Desperado
Posts: 879
Joined: Mon Dec 15, 2008 11:45 am

Re: Draw Rules (halfmoveclock,repetition)

Post by Desperado »

OnTheBoard example:
==================

as long as i do not press the clock, the "right to move" is mine.
independent of the fact that i already moved the piece on the board.

Confusion _was_:
=============

So at the beginning of the thread there were two possiblities
to consider a move as executed (at least for me).

case A:

move the piece on board + press the clock (now right to move is by the opponent)

That _would_ imply that hmc(ply 100) becomes valid,when the opponent
gets the _right to move_. Further the 1st chance to claim _would_ be
move 51(ply 101).

case B:

move the piece on board (don t press the clock,keeping the right to move. So it is still not the opponents turn)

Conclusion:
============

case B is the definition of a _move is done_.
(article 4.3 refering article 3)
(The german translation is: A4.3: "Ein Zug gilt als ausgeführt..." -> "a move is considered as executed..." word by word translation).
so the hmc increment is valid on ply 100 (hmc>=100 as condition where i want to refer to the example i posted somewhere before.)
User avatar
hgm
Posts: 28390
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Draw Rules (halfmoveclock,repetition)

Post by hgm »

Well, unfortunately the FIDE rules are selfcontradictory in this respect. Your opponent will be considered checkmated after you perform the move on the board, even if you do not press the clock. So the game is finished before the move finishing the game is finished, as it were...

The moment you release the piece you moved cunts as performing the ceckmate, not the pressing of the clock.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Draw Rules (halfmoveclock,repetition)

Post by bob »

xsadar wrote:
bob wrote:
Fguy64 wrote:
bob wrote:
Fguy64 wrote:well, in a real OTB game, if you are the player making the claim, then you must do so before you press your clock. In OTB chess you are within your rights to say "I am about to make this move which creates a 3-fold repetition and claim a draw" stop the clock, and ask for a ruling from the tournament director or arbiter if need be.

not sure if that helps you answer your question though.

as for 50 move, I would say 50 moves by player making the claim, the second player need only have made 49
It is actually _both_. Both players must have made 50 moves since the last non-capture/non-pawn-push. Once that is satisfied, the side on move can make the claim, or not if he so chooses. But both have to have made 50 reversible moves for a claim to be made.
well lets put it differently. Suppose that from the start of the game, both players just move their knights, and no captures are made. The claim that I am making is that Black is the first player that can claim a draw. If you agree with me on this point, then it's just a matter of semantics. If you are saying that White is the first player that can claim the draw, then I will have to stand corrected.
That is not quite correct. FIDE rules say that _both players must have played reversible moves for the previous 50 moves. In your example, black could claim the draw, and after that either side could claim the draw on their move unless a non-reversible move is played.
Sorry Bob, but you are not quite correct yourself. From the FIDE Laws of Chess:
9.3 The game is drawn, upon a correct claim by the player having the move, if:
a. he writes his move on his scoresheet and declares to the arbiter his intention to make this move, which shall result in thelast50 moves having been made by each player without the movement of any pawn and without any capture, or
b. the last 50 consecutive moves have been made by each playerwithout the movement of any pawn and without any capture.
http://www.fide.com/component/handbook/ ... ew=article

Condition (a) means 50 reversible (or castling) moves must have been played by one player and 49 by the other so long as his 50th move would have also been reversible (or a castling move) if he had made it on the board.

In computer chess we typically make the move and then claim the draw on the opponent's turn instead of (a), but that is problematic since the opponent could potentially move before we make our draw claim. As an example, one time in a human vs. human game on FICS I ran into this problem. I sent a draw offer (since ics doesn't distinguish between an offer and a claim) followed by my drawing move. Unfortunately my opponent was quick (and abusing the system besides) and rejected my draw offer before I made my drawing move and used premove to get a move in before I could send another draw offer, so FICS didn't give me the draw that rightfully should have been mine. (Fortunately I did get it a little later though.)
I believe that is exactly what I said. We were not discussing the "how" of claiming a 50 move draw, we were discussing the "when". Which is after both sides have made 50 reversible moves. Of course the _last_ such move is not actually "made" on the board, but it is "made" on the score sheet and if the arbiter disagrees with your 50 move claim, you do not get to "change your mind" and play some other move instead. So it is "made" even though the piece is not moved.

The "how" has already been discussed here (CCC) at length in the past. I've specifically made Crafty do this exactly according to the FIDE rules of chess. Playing on a server is an issue. ICC solved this after I had a _long_ conversation with Danny Sleator years ago about this very problem. But for real chess, the FIDE system works just fine.

I had exactly the same problem in the past. We used to have to send the move, since prior to the move the "draw" command simply offers a draw, and then we would send "draw". But there is a window where the opponent can see the move, reply, which makes the draw claim appear to be another draw offer since it is already your move again. ICC now deals with this by asking "A offered a draw. Was the game actually drawn (by repetition, 50 move) after his last move, if we ignore the opponent's reply? If so, the game ends instantly although I don't know what happens to that now extra move made by the opponent with respect to the PGN.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Draw Rules (halfmoveclock,repetition)

Post by bob »

Desperado wrote:1.
=========

example:

turn: w hmc: 0 moved: true hmcInc: 1 claimDraw: false PressingClock(switchRightToMove): true
turn: b hmc: 1 moved: true hmcInc: 2 claimDraw: false PressingClock(switchRightToMove): true
...
turn: b hmc: 99 moved: true(*) hmcInc: 100 claimDraw: YES PressingClock(switchRightToMove): FALSE

*: here the move is considered as done(that makes the confusion)!

white doesn t get back the turn.
In other words Black can(has to,if he wants) claim draw,
before giving up the right to move.


2. (to Mike)
==========

That castle is(or counts) a reversible move is new to me !
is that really the case ?

regards.
I do not think so. As a matter of practicality, it probably never happens that you have not castled, still can castle, and have made 50 reversible moves.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Draw Rules (halfmoveclock,repetition)

Post by bob »

Desperado wrote:
Desperado wrote:1.
=========

example:

turn: w hmc: 0 moved: true hmcInc: 1 claimDraw: false PressingClock(switchRightToMove): true
turn: b hmc: 1 moved: true hmcInc: 2 claimDraw: false PressingClock(switchRightToMove): true
...
turn: b hmc: 99 moved: true(*) hmcInc: 100 claimDraw: YES PressingClock(switchRightToMove): FALSE

*: here the move is considered as done(that makes the confusion)!

white doesn t get back the turn.
In other words Black can(has to,if he wants) claim draw,
before giving up the right to move.


2. (to Mike)
==========

That castle is(or counts) a reversible move is new to me !
is that really the case ?

regards.
PS on 1: while hmc is incremented on the conditions of article 9.3
PS on 2: because castling isnt neither a pawn move nor a capture
it should be incremented too, although it is a non-reversible
move ?!? (correct ?)
I do not reset on castle, only on pawn pushes or captures, as that is what my rule book said when I wrote this code 15 years ago.
User avatar
hgm
Posts: 28390
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Draw Rules (halfmoveclock,repetition)

Post by hgm »

Perhaps it is good to mention one exception: If the 100th consecutive reversible ply checkmates the opponent, it is a win, not a draw.

Some engines test this in the wrong order, and then let themselves be checkmated on the 50th move, because they think it will be draw anyway! :lol:
User avatar
xsadar
Posts: 147
Joined: Wed Jun 06, 2007 10:01 am
Location: United States
Full name: Mike Leany

Re: Draw Rules (halfmoveclock,repetition)

Post by xsadar »

Desperado wrote:1.
=========

example:

turn: w hmc: 0 moved: true hmcInc: 1 claimDraw: false PressingClock(switchRightToMove): true
turn: b hmc: 1 moved: true hmcInc: 2 claimDraw: false PressingClock(switchRightToMove): true
...
turn: b hmc: 99 moved: true(*) hmcInc: 100 claimDraw: YES PressingClock(switchRightToMove): FALSE

*: here the move is considered as done(that makes the confusion)!

white doesn t get back the turn.
In other words Black can(has to,if he wants) claim draw,
before giving up the right to move.


2. (to Mike)
==========

That castle is(or counts) a reversible move is new to me !
is that really the case ?

regards.
1. Once you press the clock you've given up the right to claim a draw until your next move.

2. Reversible is really a word that best applies to 3-fold repetition, not the 50 move rule. Castling is not reversible as you cannot possibly repeat a position that occurred prior to castling once you have castled.
For the 50 move rule, however, we're only concerned with captures and pawn pushes. Castling moves, while not reversible, do not reset the 50 move counter, because they are not captures or pawn pushes.
User avatar
xsadar
Posts: 147
Joined: Wed Jun 06, 2007 10:01 am
Location: United States
Full name: Mike Leany

Re: Draw Rules (halfmoveclock,repetition)

Post by xsadar »

bob wrote:
xsadar wrote:
bob wrote:
Fguy64 wrote:well lets put it differently. Suppose that from the start of the game, both players just move their knights, and no captures are made. The claim that I am making is that Black is the first player that can claim a draw. If you agree with me on this point, then it's just a matter of semantics. If you are saying that White is the first player that can claim the draw, then I will have to stand corrected.
That is not quite correct. FIDE rules say that _both players must have played reversible moves for the previous 50 moves. In your example, black could claim the draw, and after that either side could claim the draw on their move unless a non-reversible move is played.
Sorry Bob, but you are not quite correct yourself. From the FIDE Laws of Chess:
9.3 The game is drawn, upon a correct claim by the player having the move, if:
a. he writes his move on his scoresheet and declares to the arbiter his intention to make this move, which shall result in thelast50 moves having been made by each player without the movement of any pawn and without any capture, or
b. the last 50 consecutive moves have been made by each playerwithout the movement of any pawn and without any capture.
http://www.fide.com/component/handbook/ ... ew=article

Condition (a) means 50 reversible (or castling) moves must have been played by one player and 49 by the other so long as his 50th move would have also been reversible (or a castling move) if he had made it on the board.

In computer chess we typically make the move and then claim the draw on the opponent's turn instead of (a), but that is problematic since the opponent could potentially move before we make our draw claim. As an example, one time in a human vs. human game on FICS I ran into this problem. I sent a draw offer (since ics doesn't distinguish between an offer and a claim) followed by my drawing move. Unfortunately my opponent was quick (and abusing the system besides) and rejected my draw offer before I made my drawing move and used premove to get a move in before I could send another draw offer, so FICS didn't give me the draw that rightfully should have been mine. (Fortunately I did get it a little later though.)
I believe that is exactly what I said. We were not discussing the "how" of claiming a 50 move draw, we were discussing the "when". Which is after both sides have made 50 reversible moves. Of course the _last_ such move is not actually "made" on the board, but it is "made" on the score sheet and if the arbiter disagrees with your 50 move claim, you do not get to "change your mind" and play some other move instead. So it is "made" even though the piece is not moved.

The "how" has already been discussed here (CCC) at length in the past. I've specifically made Crafty do this exactly according to the FIDE rules of chess. Playing on a server is an issue. ICC solved this after I had a _long_ conversation with Danny Sleator years ago about this very problem. But for real chess, the FIDE system works just fine.

I had exactly the same problem in the past. We used to have to send the move, since prior to the move the "draw" command simply offers a draw, and then we would send "draw". But there is a window where the opponent can see the move, reply, which makes the draw claim appear to be another draw offer since it is already your move again. ICC now deals with this by asking "A offered a draw. Was the game actually drawn (by repetition, 50 move) after his last move, if we ignore the opponent's reply? If so, the game ends instantly although I don't know what happens to that now extra move made by the opponent with respect to the PGN.
OK, so we agree. That leaves me confused as to what you were referring to in the previous post when you said that Fred was not quite correct, but oh well.