X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmaterial.cpp;h=a1eff233302982c1a6728da40c603075864dc5a2;hp=62ff1a747990b6ee043864224a20f26f78636226;hb=153309e28702d8e5f49f4772bfb61f9f9ed965fc;hpb=c9dcda6ac488c0058ebd567e1f52e30b8cd0db20 diff --git a/src/material.cpp b/src/material.cpp index 62ff1a74..a1eff233 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -246,6 +246,16 @@ Entry* probe(const Position& pos, Table& entries, Endgames& endgames) { (npm_w == npm_b || npm_b < RookValueMg ? 0 : NoPawnsSF[std::min(pos.count(BLACK), 2)]); } + if (pos.count(WHITE) == 1 && npm_w - npm_b <= BishopValueMg) + { + e->factor[WHITE] = (uint8_t) SCALE_FACTOR_ONEPAWN; + } + + if (pos.count(BLACK) == 1 && npm_b - npm_w <= BishopValueMg) + { + e->factor[BLACK] = (uint8_t) SCALE_FACTOR_ONEPAWN; + } + // Compute the space weight if (npm_w + npm_b >= 2 * QueenValueMg + 4 * RookValueMg + 2 * KnightValueMg) {