1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00:00

Revert stalemate detection in evaluation

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
This commit is contained in:
Marco Costalba 2014-05-04 09:42:05 +02:00
parent f1240483fb
commit 145d293142

View 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;