Revert stalemate detection in evaluation
authorMarco Costalba <mcostalba@gmail.com>
Sun, 4 May 2014 07:42:05 +0000 (09:42 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 4 May 2014 07:42:32 +0000 (09:42 +0200)
Unfortunatly we have a slow down that causes
a regression in STC with no-regression mode:

LLR: -2.96 (-2.94,2.94) [-3.00,1.00]
Total: 22454 W: 3836 L: 4029 D: 14589

bench: 8678654

src/evaluate.cpp

index 34a8777..341b506 100644 (file)
@@ -787,13 +787,6 @@ namespace {
              sf = ScaleFactor(50 * sf / SCALE_FACTOR_NORMAL);
     }
 
-    // Stealmate detection
-    Color stm = pos.side_to_move();
-    if (   (ei.attackedBy[stm][ALL_PIECES] == ei.attackedBy[stm][KING])
-        && (!(ei.attackedBy[stm][KING] & ~ei.attackedBy[~stm][ALL_PIECES]))
-        && !MoveList<LEGAL>(pos).size())
-        sf = SCALE_FACTOR_DRAW;
-
     // Interpolate between a middlegame and a (scaled by 'sf') endgame score
     Value v =  mg_value(score) * int(ei.mi->game_phase())
              + eg_value(score) * int(PHASE_MIDGAME - ei.mi->game_phase()) * sf / SCALE_FACTOR_NORMAL;