Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: A few hashing questions.

Author: Robert Hyatt

Date: 07:15:28 12/02/01

Go up one level in this thread


On December 02, 2001 at 10:06:56, Severi Salminen wrote:

>Hi!
>
>I implemented pawn hashtable to my engine. A good thing is that it works and was
>quite easy to program. The bad thing is that my engine just slowed down by 10%
>or so. I update the pawn hashkey incrementally during makemove(). The hit rate
>is usually over 90% so it is working efficiently. Maybe my engine could benefit
>more if the evaluation of pawns was more complex, now I only check for doubled
>and isolated pawns, center comtrol and passed pawns. Pawns also affect on open
>file evaluation for rooks, that's why I include also rooks in pawnhashkey.
>
>1. Do you update the pawn hashkey incrementally (or decrementally?) also in
>unmakemove() or do you use an array of different keys: pawnhashkey[ply]?

Two things.  First, if your pawn structure evaluation is pretty simple, hashing
may be a loser for you.  Because you update the signature on every pawn move,
but only evaluate pawns at endpoint positions.  If the signature update adds
up to more "cost" than the evaluation it replaces, you lose some.

Second, I update incrementally, but simply "restore" by copying from an array
where the original signature was saved in MakeMove().






>
>2. What pieces do you include in your pawnhashkey? I include all the pawns and
>rooks. Adding more pieces might result more stored info to hash table but also
>slow the makemove down.


No pieces at all.  With just pawns I hash over 99% of all possible positions.
Adding rooks will drop that significantly.




>
>3.-9. Any suggestions or is my result only because my eval() is very simple?
>
>Severi


That is probably the problem.  The idea behind hashing is to replace a more
complex task (evaluation) with a "cheaper" one (look-up).



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.