]> git.sesse.net Git - stockfish/commitdiff
Remove useless razoring condition
authorMarco Costalba <mcostalba@gmail.com>
Tue, 30 Jun 2015 11:50:59 +0000 (13:50 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 9 Jul 2015 06:13:30 +0000 (08:13 +0200)
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

src/movepick.h
src/position.h
src/search.cpp

index 3c285c983ca52f195ad31d767d6b48611b4b346b..5896bbefab9e9d0c3876fc44942d41cc8c393d4e 100644 (file)
@@ -32,7 +32,7 @@
 /// The Stats struct stores moves statistics. According to the template parameter
 /// the class can store History and Countermoves. History records how often
 /// different moves have been successful or unsuccessful during the current search
 /// The Stats struct stores moves statistics. According to the template parameter
 /// the class can store History and Countermoves. History records how often
 /// different moves have been successful or unsuccessful during the current search
-/// and is used for reduction and move ordering decisions. 
+/// and is used for reduction and move ordering decisions.
 /// Countermoves store the move that refute a previous one. Entries are stored
 /// using only the moving piece and destination square, hence two moves with
 /// different origin but same destination and piece will be considered identical.
 /// Countermoves store the move that refute a previous one. Entries are stored
 /// using only the moving piece and destination square, hence two moves with
 /// different origin but same destination and piece will be considered identical.
@@ -54,7 +54,7 @@ struct Stats {
   void update(Piece pc, Square to, Value v) {
 
     if (abs(table[pc][to] + v) < Max)
   void update(Piece pc, Square to, Value v) {
 
     if (abs(table[pc][to] + v) < Max)
-        table[pc][to] +=  v;
+        table[pc][to] += v;
   }
 
 private:
   }
 
 private:
index 516f3f1b0c1bda1d2c3f2ba47f3f342ca7f22740..6378d0ba2ff07a3ce608ab9a9b89c5976d02a607 100644 (file)
@@ -141,7 +141,6 @@ public:
 
   // Piece specific
   bool pawn_passed(Color c, Square s) const;
 
   // Piece specific
   bool pawn_passed(Color c, Square s) const;
-  bool pawn_on_7th(Color c) const;
   bool opposite_bishops() const;
 
   // Doing and undoing moves
   bool opposite_bishops() const;
 
   // Doing and undoing moves
@@ -366,10 +365,6 @@ inline bool Position::opposite_bishops() const {
         && opposite_colors(pieceList[WHITE][BISHOP][0], pieceList[BLACK][BISHOP][0]);
 }
 
         && opposite_colors(pieceList[WHITE][BISHOP][0], pieceList[BLACK][BISHOP][0]);
 }
 
-inline bool Position::pawn_on_7th(Color c) const {
-  return pieces(c, PAWN) & rank_bb(relative_rank(c, RANK_7));
-}
-
 inline bool Position::is_chess960() const {
   return chess960;
 }
 inline bool Position::is_chess960() const {
   return chess960;
 }
index 865e477144042c2a99577ac8179e066718016585..7eab970a866ea27f30f3a500240affc98fac1b8b 100644 (file)
@@ -674,8 +674,7 @@ namespace {
     if (   !PvNode
         &&  depth < 4 * ONE_PLY
         &&  eval + razor_margin(depth) <= alpha
     if (   !PvNode
         &&  depth < 4 * ONE_PLY
         &&  eval + razor_margin(depth) <= alpha
-        &&  ttMove == MOVE_NONE
-        && !pos.pawn_on_7th(pos.side_to_move()))
+        &&  ttMove == MOVE_NONE)
     {
         if (   depth <= ONE_PLY
             && eval + razor_margin(3 * ONE_PLY) <= alpha)
     {
         if (   depth <= ONE_PLY
             && eval + razor_margin(3 * ONE_PLY) <= alpha)