Computer Chess Club Archives




Subject: Re: Does your program understand castling/en passant rights on 3x repetition

Author: Richard A. Fowell (

Date: 10:57:15 02/27/00

Go up one level in this thread

On February 27, 2000 at 08:31:53, Manfred Schubert wrote:

>>I noticed today that six of the seven chess programs that I tried
>>(three freeware, four commercial) failed to pass the two tests below.
>>Which chess programs (other than Screamer) get these right?
>You didn't test ExaChess and Fritz, did you?
>>P.S.: Of course, programs (or humans) don't HAVE to claim the draw.
>I know, but i think the usual practice that chess programs claim draw (for both
>sides) even if they don't have to, is not illegal.
>>      But, for programs that do, they can't claim it
>I don't understand this.

Sorry - I was too terse.

What I meant was - if are going to have the program claim triple repetition
of position, then you should have it do so correctly. If your program claims
this in a computer-human game (or even a computer-computer tournament) and
refuses to move, it will probably be forfeited.

Of course, this will happen rarely, and one can choose to take the position
that the code required would be better put against something else, as some
have chosen not to add the necessary code to win kbnK endings.

I bring it up because I suspect that some programs do this improperly simply

1) the programmer is not fully familiar with the draw by repetition rules
2) knows the rule, but didn't realize his code does not implement it correctly
3) is aware of the issue, but it seems too awkward to deal with.

I thought that bringing it up would help address the first two items,
and that the programmers that did handle it correctly might describe the
techniques they use for this - it may be trivial.

Rob Hyatt's comment is that his hash includes castling rights and en passant
possibility, so his program will not (absent hash collision) get this wrong.

[Oh - as one person pointed out, in the second example, Black's move was b5,
not b4. 14,0000 hours of using descriptive notation has left its mark, I fear.]

In some sense, this is a perennial issue - I saw a thread on r.g.c.c on this
a year or two back, and one of the other items in this thread mentioned
testing a number of programs for this a long time back.

Richard A. Fowell (

This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.