Broader condition for dangerous pawn moves

Instead of a passed pawn now we just require the pawn to
be in the opponent camp to be considered a dangerous
move. Added some renaming to reflect the change.

Passed both short TC test
LLR: 2.95 (-2.94,2.94) [-1.50,4.50]
Total: 10358 W: 2033 L: 1900 D: 6425

And long TC
LLR: 2.95 (-2.94,2.94) [0.00,6.00]
Total: 21459 W: 3486 L: 3286 D: 14687

bench: 8322172
This commit is contained in:
Chris Caino
2013-12-03 21:58:39 +00:00
committed by Marco Costalba
parent 2408243cf4
commit 69a14554ee
3 changed files with 7 additions and 8 deletions

View File

@@ -123,7 +123,7 @@ public:
bool capture(Move m) const;
bool capture_or_promotion(Move m) const;
bool gives_check(Move m, const CheckInfo& ci) const;
bool passed_pawn_push(Move m) const;
bool advanced_pawn_push(Move m) const;
Piece moved_piece(Move m) const;
PieceType captured_piece_type() const;
@@ -326,10 +326,8 @@ inline bool Position::pawn_passed(Color c, Square s) const {
return !(pieces(~c, PAWN) & passed_pawn_mask(c, s));
}
inline bool Position::passed_pawn_push(Move m) const {
return type_of(moved_piece(m)) == PAWN
&& pawn_passed(sideToMove, to_sq(m));
inline bool Position::advanced_pawn_push(Move m) const {
return pieces(PAWN) & TheirHalf[sideToMove] & from_sq(m);
}
inline Key Position::key() const {