Dynamic EP flag
Posted: Fri Oct 02, 2015 6:49 pm
i was looking through the CPW code and found some code that is used to optimize whether or not to set the EP flag after a pawn move.
the description given follows:
/* en-passant flag
First erase the current state of the ep-flag, then set it again
in case there has been a two square pawn move that allows such
capture. For example, 1.e4 in the initial position will not set
the en passant flag, because there are no black pawns on d4 and f4.
This soluion helps with opening book and increases the number of
transposition table hits.
*/
i can see why the flag is not necessary if there isn't a pawn that can recapture, but I don't understand how the claims would help otherwise. can two positions be identical with the only difference that the EP flag is set or not? can someone explain if this is valid?
the description given follows:
/* en-passant flag
First erase the current state of the ep-flag, then set it again
in case there has been a two square pawn move that allows such
capture. For example, 1.e4 in the initial position will not set
the en passant flag, because there are no black pawns on d4 and f4.
This soluion helps with opening book and increases the number of
transposition table hits.
*/
i can see why the flag is not necessary if there isn't a pawn that can recapture, but I don't understand how the claims would help otherwise. can two positions be identical with the only difference that the EP flag is set or not? can someone explain if this is valid?