]> git.sesse.net Git - stockfish/commitdiff
Remove insufficient material rule
authorjoergoster <osterj165@googlemail.com>
Wed, 6 Aug 2014 10:36:04 +0000 (18:36 +0800)
committerlucasart <lucas.braesch@gmail.com>
Wed, 6 Aug 2014 10:42:10 +0000 (18:42 +0800)
The eval already returns zero in KK, KBK, KNK (see material.cpp). The difference is:
- we lose the "TB pruning" benefit of the draw rule (ie. search goes on even if eval is zero)
- we gain some speed by removing a useless test from the hot path

STC:
LLR: 0.05 (-2.94,2.94) [-3.00,1.00]
Total: 128000 W: 21357 L: 21560 D: 85083

LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 33023 W: 4613 L: 4509 D: 23901

bench 7461881

src/position.cpp

index 23370ca3f73d4ed8fedbd14595c8b30af2b332b7..7b067723925a5559b949b80f8024c3192b481103 100644 (file)
@@ -1116,10 +1116,6 @@ Value Position::see(Move m) const {
 
 bool Position::is_draw() const {
 
-  if (   !pieces(PAWN)
-      && (non_pawn_material(WHITE) + non_pawn_material(BLACK) <= BishopValueMg))
-      return true;
-
   if (st->rule50 > 99 && (!checkers() || MoveList<LEGAL>(*this).size()))
       return true;