X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=510784e593e8e1d5ab811d98177f295c6ada56e5;hp=173de0c081c59396996b1d6b1d244e38bc1747d0;hb=3ed603cd64624d27de3f3f6e8f4e5dfccaaed420;hpb=f637ddc1e87c9e825ce63f66974348347439f493 diff --git a/src/position.h b/src/position.h index 173de0c0..510784e5 100644 --- a/src/position.h +++ b/src/position.h @@ -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);