Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Detecting Draws using a Small Hash Table?

Author: Uri Blass

Date: 13:39:58 02/20/02

Go up one level in this thread


On February 20, 2002 at 13:10:01, Vincent Diepeveen wrote:

>On February 20, 2002 at 09:19:20, Uri Blass wrote:
>
>sounds very buggy to me.
>
>easier is storing an array with hashcodes. goes very fast.
>you can even skip step 2.
>
>what you do is pretty hard and not very smart IMHO.

I agree it was not easy and I agree that hash tables are probably better but I
wanted to get my program to participate in the 5th division of the winboard
engines and one of the conditions was repetition detection.

I did not want to copy from other programmers.
I may change it later after I learn about using hash tables in chess programs
but I guess that the speed difference relative to hash tables is not big and I
believe that my program does not waste more than 1% of it's time in repetition
detections(in most of the cases there is a conversion in the last 4 plies so I
can detect no repetition with no problem).

The main advantage of hash tables should be different then detection of
repetition.

some more details about my program:

It generates only legal moves and for that purpose it builds attack tables that
tells it for every square the directions that it is attacked and a pin array
that tells it for every piece if it is pinned.

Today it extends only positions when there is a single legal move or positions
when the king is in check.

It practically does not use today the fact that it generates only legal moves
except the single reply extension but I may use my attack tables for the
evaluation and for better search rules in the future.



>
>in the next line please tell me whether there is repetition:
>
>Ra1-a2 Rh7xh6 Ra2-c2 Kg7-h8 Kh1-h2 Kh8-g8 Rc2-a2 Rh6-h7 Kh2-h1 Rh7-h6 Ra2-c2

No repetition:
taking back one ply every time sho that the last position did not repeat:

Ra2-c2                                    white a2c2
Rh7-h6 Ra2-c2                             white a2c2      black h7h6
Kh2-h1 Rh7-h6 Ra2-c2                      white h2h1,a2c2 black h7h6
Rh6-h7 Kh2-h1 Rh7-h6 Ra2-c2               white h2h1,a2c2
Rc2-a2 Rh6-h7 Kh2-h1 Rh7-h6 Ra2-c2        white h2h1
Kh8-g8 Rc2-a2 Rh6-h7 Kh2-h1 Rh7-h6 Ra2-c2 white h2h1      black h8g8
Kh1-h2 Kh8-g8 Rc2-a2 Rh6-h7 Kh2-h1 Rh7-h6 Ra2-c2          black h8g8
Kg7-h8 Kh1-h2 Kh8-g8 Rc2-a2 Rh6-h7 Kh2-h1 Rh7-h6 Ra2-c2   black g7g8
Ra2-c2 Kg7-h8 Kh1-h2 Kh8-g8 Rc2-a2 Rh6-h7 Kh2-h1 Rh7-h6 Ra2-c2
white a2c2 black g7g8

Uri



This page took 0.01 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.