Skip to content

Commit b2edac7

Browse files
committed
Remove useless razoring condition
STC: LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 20626 W: 3977 L: 3855 D: 12794 LTC: LLR: 3.10 (-2.94,2.94) [-3.00,1.00] Total: 87334 W: 13675 L: 13648 D: 60011 Retire also the now unused pawn_on_7th() helper. bench: 8248166
1 parent aa0dc16 commit b2edac7

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

src/movepick.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
/// The Stats struct stores moves statistics. According to the template parameter
3333
/// the class can store History and Countermoves. History records how often
3434
/// different moves have been successful or unsuccessful during the current search
35-
/// and is used for reduction and move ordering decisions.
35+
/// and is used for reduction and move ordering decisions.
3636
/// Countermoves store the move that refute a previous one. Entries are stored
3737
/// using only the moving piece and destination square, hence two moves with
3838
/// different origin but same destination and piece will be considered identical.
@@ -54,7 +54,7 @@ struct Stats {
5454
void update(Piece pc, Square to, Value v) {
5555

5656
if (abs(table[pc][to] + v) < Max)
57-
table[pc][to] += v;
57+
table[pc][to] += v;
5858
}
5959

6060
private:

src/position.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ class Position {
141141

142142
// Piece specific
143143
bool pawn_passed(Color c, Square s) const;
144-
bool pawn_on_7th(Color c) const;
145144
bool opposite_bishops() const;
146145

147146
// Doing and undoing moves
@@ -366,10 +365,6 @@ inline bool Position::opposite_bishops() const {
366365
&& opposite_colors(pieceList[WHITE][BISHOP][0], pieceList[BLACK][BISHOP][0]);
367366
}
368367

369-
inline bool Position::pawn_on_7th(Color c) const {
370-
return pieces(c, PAWN) & rank_bb(relative_rank(c, RANK_7));
371-
}
372-
373368
inline bool Position::is_chess960() const {
374369
return chess960;
375370
}

src/search.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,8 +674,7 @@ namespace {
674674
if ( !PvNode
675675
&& depth < 4 * ONE_PLY
676676
&& eval + razor_margin(depth) <= alpha
677-
&& ttMove == MOVE_NONE
678-
&& !pos.pawn_on_7th(pos.side_to_move()))
677+
&& ttMove == MOVE_NONE)
679678
{
680679
if ( depth <= ONE_PLY
681680
&& eval + razor_margin(3 * ONE_PLY) <= alpha)

0 commit comments

Comments
 (0)