: attacks_bb<Pt>(s, pos.pieces());
if (pos.blockers_for_king(Us) & s)
- b &= LineBB[pos.square<KING>(Us)][s];
+ b &= line_bb(pos.square<KING>(Us), s);
attackedBy2[Us] |= attackedBy[Us][ALL_PIECES] & b;
attackedBy[Us][Pt] |= b;
+ 24 * infiltration
+ 51 * !pos.non_pawn_material()
- 43 * almostUnwinnable
- - 2 * pos.rule50_count()
-110 ;
Value mg = mg_value(score);
Trace::add(MOBILITY, mobility[WHITE], mobility[BLACK]);
}
+ // Evaluation grain
+ v = (v / 16) * 16;
+
// Side to move point of view
- return (pos.side_to_move() == WHITE ? v : -v) + Tempo;
+ v = (pos.side_to_move() == WHITE ? v : -v) + Tempo;
+
+ // Damp down the evaluation linearly when shuffling
+ v = v * (100 - pos.rule50_count()) / 100;
+
+ return v;
}
} // namespace