Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Repetition detection in TSCP

Author: David Hanley

Date: 08:50:36 01/16/02

Go up one level in this thread


I can formally prove it will **NOT** work.

Your sequence of moves did make it work though.  I ran it through the code.

The algorithm has NO information as to what pieces are on what squares.  It only
has information about what moves were played.

What this algorithm is basically doing is incrementing a square when a piece
moves to it, incrementing it when it moves away.  When the board is zero, the
initial position has repeated.

This is interesting, but i can think of a few ways to fool it.

If there's a pawn on b5 Nc3-b5 an Nb5-c3 is not a repitition.  If there's no
pawn there, it is.

If that were the only flaw, you could have the loop stop when it hit a capture
move.  That would be OK.

But think of the sequence
 d3-e4
 e4-f5
 f3-e4
 e4-d5
 d5-e4
 e4-d3
 f5-e4
 e4-f3

The algorithm will think the initial position has repeated on move 8, but it
hasn't; the pieces on d3 and f3 have swapped positions.  The same moves have
been played and unplayed, but ina different order, which changed the position.

Then again, i bet the algorithm works OK 97% of the time in real life.

dave



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.