Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: 0x88 vs 144 (or 12x12)

Author: Dan Newman

Date: 01:06:39 10/26/02

Go up one level in this thread


On October 26, 2002 at 03:01:15, Russell Reagan wrote:

>What I mean is, there are (approx) 75,484,103,766,819,471,360,000 different pawn
>formations for all pawns on the board, minus some that are duplicates and not
>possible to reach, and then plus all of the 8 black pawns vs. 7 white pawns, 7
>black pawns vs. 8 white pawns, 7 vs 7, 6 vs 7, 7 vs, 6, etc...and then if you
>add in the king like you say, that makes for a lot of positions, and I would
>assume that the pawn hash table is smaller than the normal hash table, so
>there's no way to store information about all of the pawn formations, and you're
>probably going to have more collisions than you do in the normal transposition
>table. It makes me wonder if there are ever errors caused by this. Using
>bitboards, you could just calculate this stuff on the fly and it will always be
>correct.
>
>Russell

Luckily you only hit a very tiny fraction of those pawn configurations
inside a search.  Typically one gets a hit rate of between 98 and 99
percent, even using a small pawn hash table.  This means that you can
make extremely expensive pawn-only calculations and stuff their results
into this table, making such calculations nearly free.  (This is
incredibly useful since as we all know: "Pawns _are_ the soul of chess".)

Typically you don't just store a pawn structure score (the sum of the
scores for doubled pawns, backward pawns, isolated pawns, pawn islands,
pawn duos, passed pawns, and so forth) but also the results of other
(partial) calculations that can be completed only by knowing the
location of other pieces than the pawns.

An example of this last might be to calculate pawn shelter terms for
both king and queen side.  (Remember, this is almost free since it will
be retrieved from the hash table most of the time.)  Then when doing
the king safety calculation, you can simply choose the correct pawn
shelter term.

Other things to store might be bitmaps to indicate which files are open
or half open, on which squares it is safe to post a bishop or knight,
which pawns are passed, weak, etc.

I suspect that most of us don't also hash the king into this table.
Some have tried this, but, as I understand it, it tends to massively
lower the hit rate.  How massively I don't know, but if you just
dropped it from 98 to 90 percent, you'd bump the cost of the pawn
calculations up by a factor of five.

-Dan.



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.