pawn hash and ep
Moderators: hgm, Rebel, chrisw
-
- Posts: 778
- Joined: Sat Jul 01, 2006 7:11 am
pawn hash and ep
I am implementing pawn hash and am wondering if it is useful to encode ep status. I see that crafty does this, but the info I am currently planning to store does not depend on ep status.
-
- Posts: 27811
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: pawn hash and ep
Doesn't that simply depend on whether your Pawn evaluation takes the e.p. status into account?
My guess is that it would be better not to, because whether you can afford to actually capture depends on a lot more than just the Pawns. (E.g. a double-push that creates a protected passer might deliver a discovered attack on your Queen, or the Pawn that presumably could capture it can be pinned on your King.) The capture presumably will be searched in QS, so you can evaluate like the capture is not possible.
My guess is that it would be better not to, because whether you can afford to actually capture depends on a lot more than just the Pawns. (E.g. a double-push that creates a protected passer might deliver a discovered attack on your Queen, or the Pawn that presumably could capture it can be pinned on your King.) The capture presumably will be searched in QS, so you can evaluate like the capture is not possible.
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: pawn hash and ep
No, it is more subtle. If you reach position P from two pathways, one where the last move was a double pawn push creating an en passant capture possibility, and the second where the last move was not that double push, you can do a probe and get a completely wrong score/bound/etc. This is similar to ignoring white to move, just not as critical. But it does make a difference, that's easy enough to check.hgm wrote:Doesn't that simply depend on whether your Pawn evaluation takes the e.p. status into account?
My guess is that it would be better not to, because whether you can afford to actually capture depends on a lot more than just the Pawns. (E.g. a double-push that creates a protected passer might deliver a discovered attack on your Queen, or the Pawn that presumably could capture it can be pinned on your King.) The capture presumably will be searched in QS, so you can evaluate like the capture is not possible.
-
- Posts: 690
- Joined: Mon Apr 19, 2010 7:07 pm
- Location: Sweden
- Full name: Peter Osterlund
Re: pawn hash and ep
I don't see where crafty 25.0 does that. If you look at validate.c, lines 210-236, you can see that the pawn hash key does not include EP status.jwes wrote:I am implementing pawn hash and am wondering if it is useful to encode ep status. I see that crafty does this,
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: pawn hash and ep
I misread the original post. I correct the normal hash signature for EP, but NOT the pawn hash, as the eval does not care about EP status.
-
- Posts: 778
- Joined: Sat Jul 01, 2006 7:11 am
Re: pawn hash and ep
That was my thought. I was wondering if there was something I hadn't thought of.hgm wrote:Doesn't that simply depend on whether your Pawn evaluation takes the e.p. status into account?