Why ask the obvious?bob wrote:Why would you include kings in a "pawn hash"???tpetzke wrote:I don't get a 99,5% hit rate even with more slots. Last time I measured I had something like 97% which went down to 93% when I included the kings into the hash.
http://macechess.blogspot.de/2013/07/po ... -pawn.html
Buckets for pawn hash?
Moderators: hgm, Rebel, chrisw
-
- Posts: 5563
- Joined: Tue Feb 28, 2012 11:56 pm
Re: Buckets for pawn hash?
-
- Posts: 686
- Joined: Thu Mar 03, 2011 4:57 pm
- Location: Germany
Re: Buckets for pawn hash?
Because then I can hash in terms that are dependent on the king position too. If you look in my blog you find a comment from Don Daily that Komodo does/did it as well, so it is not as crazy as you think.Why would you include kings in a "pawn hash"???
-
- Posts: 893
- Joined: Mon Jan 15, 2007 11:23 am
- Location: Warsza
Re: Buckets for pawn hash?
If pawn shield/pawn storm is evaluated separately from piece attacks on the king (which I know not to be the case in Crafty), then it can as well be hashed.Why would you include kings in a "pawn hash"???
My engine goes a bit further, doing some additional evaluation of king's indian pawn chain, taking into account king's position - and I know that it is a slight gain, but only if this is hashed. Otherwhise would be too slow.
Pawel Koziol
http://www.pkoziol.cal24.pl/rodent/rodent.htm
http://www.pkoziol.cal24.pl/rodent/rodent.htm
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Buckets for pawn hash?
Because I can't think of a single reason???syzygy wrote:Why ask the obvious?bob wrote:Why would you include kings in a "pawn hash"???tpetzke wrote:I don't get a 99,5% hit rate even with more slots. Last time I measured I had something like 97% which went down to 93% when I included the kings into the hash.
http://macechess.blogspot.de/2013/07/po ... -pawn.html
-
- Posts: 893
- Joined: Mon Jan 15, 2007 11:23 am
- Location: Warsza
Re: Buckets for pawn hash?
As I said before, there's no reason to add pawn hash to Crafty's eval, but it can help in engines that use different approach to king safety. In Rodent pawn hash was useless until I started hashing king-related stuff.
Pawel Koziol
http://www.pkoziol.cal24.pl/rodent/rodent.htm
http://www.pkoziol.cal24.pl/rodent/rodent.htm
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Buckets for pawn hash?
That was why I asked. I only consider pawns for one multiplier of king safety, and it is trivial to hash all potential castled king positions and store this without the king affecting the hash signature. All the other work to produce the other multiplier is dependent on pieces which can't be hashed unless they are folded into the hash signature. King positions basically multiple total pawn positions by a factor of 2^12, which reduces hash hits significantly, or increases the memory required for the "pawn" hash by that size.PK wrote:As I said before, there's no reason to add pawn hash to Crafty's eval, but it can help in engines that use different approach to king safety. In Rodent pawn hash was useless until I started hashing king-related stuff.