X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fposition.h;h=510784e593e8e1d5ab811d98177f295c6ada56e5;hb=3ed603cd;hp=8e29eb13458390ff2d4a405ffd61cebd794f46ee;hpb=772a37cd54212a7b045781b69eb190bd5d4e3161;p=stockfish diff --git a/src/position.h b/src/position.h index 8e29eb13..510784e5 100644 --- a/src/position.h +++ b/src/position.h @@ -312,8 +312,8 @@ private: template void update_checkers(Bitboard* pCheckersBB, Square ksq, Square from, Square to, Bitboard dcCandidates); - template - Bitboard hidden_checks(Color c, Square ksq, Bitboard& pinners) const; + template + Bitboard hidden_checkers(Color c) const; // Computing hash keys from scratch (for initialization and debugging) Key compute_key() const; @@ -650,15 +650,9 @@ inline Value Position::non_pawn_material(Color c) const { inline Phase Position::game_phase() const { - // The purpose of the Value(325) terms below is to make sure the difference - // between MidgameLimit and EndgameLimit is a power of 2, which should make - // the division at the end of the function a bit faster. - static const Value MidgameLimit = 2 * QueenValueMidgame - + 2 * RookValueMidgame - + 6 * BishopValueMidgame - + Value(325); - - static const Value EndgameLimit = 4 * RookValueMidgame - Value(325); + // Values modified by Joona Kiiski + static const Value MidgameLimit = Value(15713); + static const Value EndgameLimit = Value(4428); Value npm = non_pawn_material(WHITE) + non_pawn_material(BLACK);