Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Repetition Detection

Author: Michel Langeveld

Date: 10:28:04 12/02/04

Go up one level in this thread


On December 02, 2004 at 06:41:59, Volker Annuss wrote:

>On December 01, 2004 at 17:01:34, Michel Langeveld wrote:

Ok I made a test to check what is faster.
I wanted to check the Spanish opening but did this position, not a big problem.
I did this test not for the starting position but after some moves to be sure
fifty has most of the time a value bigger a 0.

[D}rnbqkb1r/pppp1ppp/5n2/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R b KQkq -

tscp> e2e4
tscp> e7e5
tscp> g1f3
tscp> g8f6
tscp> f1b5
tscp> sd 11
FIXED DEPTH = 11

With:

int reps(void)
{
   int i;
   int r = 0;

   for (i = hply - fifty; i < hply; ++i)
      if (hist_dat[i].hash == dynhash)
         ++r;
   return r;
}

11*   3279  34786451     13  c7c6 b5d3 f8c5 f3e5 d8e7 e5f3 f6e4 d1e2 c5f2 e1f1 f
7f5 d3e4 f5e4 f1f2 e4f3 e2e7 e8e7 f2f3

With:

int reps(void)
{
   int i;
   int r = 0;

   for (i = 0; i < hply; i++)
      if (hist_dat[i].hash == dynhash)
         ++r;
   return r;
}

11*   3242  34786451     13  c7c6 b5d3 f8c5 f3e5 d8e7 e5f3 f6e4 d1e2 c5f2 e1f1 f
7f5 d3e4 f5e4 f1f2 e4f3 e2e7 e8e7 f2f3

int reps(void)
{
   int i;
   int r = 0;

   for (i = hply-4; i >= hply - fifty; i -= 2)
      if (hist_dat[i].hash == dynhash)
         ++r;
   return r;
}

11*   3228  34786451     13  c7c6 b5d3 f8c5 f3e5 d8e7 e5f3 f6e4 d1e2 c5f2 e1f1 f
7f5 d3e4 f5e4 f1f2 e4f3 e2e7 e8e7 f2f3

With:

int reps(void)
{
   int i;
   int minimum = hply - fifty;
   int r = 0;

   for (i = hply-4; i >= minimum; i -= 2)
      if (hist_dat[i].hash == dynhash)
         ++r;
   return r;
}

11*   3170  34786451     13  c7c6 b5d3 f8c5 f3e5 d8e7 e5f3 f6e4 d1e2 c5f2 e1f1 f
7f5 d3e4 f5e4 f1f2 e4f3 e2e7 e8e7 f2f3

int reps(void)
{
   int i;
   int minimum = hply - fifty;
   int r = 0;

   if (fifty < 3) return 0;

   for (i = hply-4; i >= minimum; i -= 2)
      if (hist_dat[i].hash == dynhash)
         ++r;
   return r;
}

11*   3165  34786451     13  c7c6 b5d3 f8c5 f3e5 d8e7 e5f3 f6e4 d1e2 c5f2 e1f1 f
7f5 d3e4 f5e4 f1f2 e4f3 e2e7 e8e7 f2f3

int reps(void)
{
   int minimum, i, r;

   if (fifty < 3) return 0;

   minimum = hply - fifty;
   r = 0;

   for (i = hply-4; i >= minimum; i -= 2)
      if (hist_dat[i].hash == dynhash)
         ++r;
   return r;
}

11*   3164  34786451     13  c7c6 b5d3 f8c5 f3e5 d8e7 e5f3 f6e4 d1e2 c5f2 e1f1 f
7f5 d3e4 f5e4 f1f2 e4f3 e2e7 e8e7 f2f3

int reps(void)
{
   int i, minimum, r;

   if (fifty < 3) return 0;

   minimum = hply - fifty;
   r = 0;

   for (i = hply-4; i >= minimum; i -= 2)
      if (hist_dat[i].hash == dynhash)
         ++r;
   return r;
}
11*   3160  34786451     13  c7c6 b5d3 f8c5 f3e5 d8e7 e5f3 f6e4 d1e2 c5f2 e1f1 f
7f5 d3e4 f5e4 f1f2 e4f3 e2e7 e8e7 f2f3

Not a bad improvement. Thanks to all for the ideas!



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.