Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Detecting three-fold repetition?

Author: KarinsDad

Date: 14:40:40 07/17/00

Go up one level in this thread


On July 17, 2000 at 16:33:53, Dann Corbit wrote:

>On July 17, 2000 at 16:25:56, KarinsDad wrote:
>[snip]
>>One additional thing you can do is shorten the list every time a move is made.
>
>Same thing for any capture: Just truncate the list to the current position in
>that case.  Castling is also not reversible.  Probably some others.
>
>>If a pawn is pushed, for example, then you can drop the list down to one element
>>(i.e. the root position).
>>
>>But to tell you the truth, this mechanism will not work for 3 move reps found
>>completely in the search, just for the start of 2 move reps where the first
>>position has already been made.
>
>You are going to have to generate each legal move anyway.  So from any position,
>you can know if any of the generated moves is a draw.  Something that happens
>deeply later could be a problem though.  Is that what you are talking about?


My point is that if you have a list of positions that have already occurred in
the game that could allow 3 move rep, then all you have to do is compare the
current move being searched (or scored or whatever) to the positions in that
short list. Actually, you would have 2 lists, one of white to move positions and
one of black to move positions. Relatively simple.

However, this will not detect 3 move rep for positions that have not yet been
made, but may rep in the search tree. That means that you will not find those
positions until you get to the first potential repping position in the real game
and by then, it may be too late to either prevent it from happening (by the time
you detect the 2nd move rep, you either allow it or lose the game or lose
material, etc.) or to make it happen (since you did not find it in the tree
because you did not make the move in the game that leads to it).

Effectively, this quasi-implements move by rep. If the move by rep is avoidable
once the position is first made in the game, then no big deal (although there
could have been an even better way to avoid it). This implementation is better
than no implementation whatsover, but is worse than a true implementation in the
search tree.

KarinsDad :)



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.