Update Stockfish to development version from 2020-06-17

This commit is contained in:
Peter Osterlund
2020-06-19 11:49:56 +02:00
parent a64eab03cc
commit 6bcbd6d080
34 changed files with 1445 additions and 885 deletions

View File

@@ -84,7 +84,7 @@ namespace {
template<Color Us>
int imbalance(const int pieceCount[][PIECE_TYPE_NB]) {
constexpr Color Them = (Us == WHITE ? BLACK : WHITE);
constexpr Color Them = ~Us;
int bonus = 0;
@@ -129,7 +129,7 @@ Entry* probe(const Position& pos) {
Value npm_w = pos.non_pawn_material(WHITE);
Value npm_b = pos.non_pawn_material(BLACK);
Value npm = clamp(npm_w + npm_b, EndgameLimit, MidgameLimit);
Value npm = Utility::clamp(npm_w + npm_b, EndgameLimit, MidgameLimit);
// Map total non-pawn material into [PHASE_ENDGAME, PHASE_MIDGAME]
e->gamePhase = Phase(((npm - EndgameLimit) * PHASE_MIDGAME) / (MidgameLimit - EndgameLimit));