Bitbases

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

BBauer
Posts: 658
Joined: Wed Mar 08, 2006 8:58 pm

Re: Bitbases

Post by BBauer »

The new scorpio bitbases take 224.0 MB
kind regards
Bernhard
wgarvin
Posts: 838
Joined: Thu Jul 05, 2007 5:03 pm
Location: British Columbia, Canada

Re: Bitbases

Post by wgarvin »

Edmund Moshammer wrote:You can theoretically skip the implementation of en passant squares. A 1 ply search will resolve the issue too for these rare cases.
After thinking about it a bit, I now see that you are correct. The reason it works is because the enpassant "capture" opportunity expires if you don't play that move. So the successors of the position with enpassant are exactly the same as the successors of the regular position, except for the one extra successor representing the "capture" opportunity. So in the engine, its GTV can be evaluated by combining the GTV of the regular position, and the GTV of the result of the enpassant capture.

I'm not sure if the generator can completely ignore the existence of enpassant, though.

It seems to me that whenever it is resolving a position, and one of the moves is a double pawn push, and the double pawn push creates an "enpassant" capture opportunity -- the generator should evaluate that capture and get its GTV, and combine that with the GTV of the position with the pieces in same place but no enpassant opportunity. In effect, the player who makes the double pawn push might get a worse result from it if the enpassant opportunity gives the opponent a better result than his other options in that position. The generator can model this by scoring the double pawn push specially.

I guess you are correct that the generator can do this during its initialization pass, at the same time as the rest of the captures. This really is a bit of a special case, though--in effect it has to look "two" moves ahead instead of one. And if you use counting of unresolved successors, then it luckily still works for this special case, because a position with enpassant capture opportunity has exactly ONE predecessor, uniquely determined by the position of the enpassant square.

I would be very interested to know if there are any positions where this actually makes a difference. I'm not a chess player, but I would be very surprised if there were no positions whose GTV was affected by enpassant opportunities!