mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Queen vs. Minors imbalance
Addition of correction values in case of Imbalance of queens, depending on the number of light pieces on the side without a queen. Passed patch: STC: LLR: 2.95 (-2.94,2.94) [0.00,5.00] Total: 29036 W: 5379 L: 5130 D: 18527 LTC: LLR: 2.96 (-2.94,2.94) [0.00,5.00] Total: 13680 W: 1836 L: 1674 D: 10170 Bench: 6258930 Closes #1155
This commit is contained in:
parent
802fca6fdd
commit
c8e5384c3a
1 changed files with 10 additions and 0 deletions
|
@ -58,6 +58,12 @@ namespace {
|
||||||
24, -32, 107, -51, 117, -9, -126, -21, 31
|
24, -32, 107, -51, 117, -9, -126, -21, 31
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// QueenMinorsImbalance[opp_minor_count] is applied when only one side has a queen.
|
||||||
|
// It contains a bonus/malus for the side with the queen.
|
||||||
|
const int QueenMinorsImbalance[16] = {
|
||||||
|
31, -8, -15, -25, -5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
};
|
||||||
|
|
||||||
// Endgame evaluation and scaling functions are accessed directly and not through
|
// Endgame evaluation and scaling functions are accessed directly and not through
|
||||||
// the function maps because they correspond to more than one material hash key.
|
// the function maps because they correspond to more than one material hash key.
|
||||||
Endgame<KXK> EvaluateKXK[] = { Endgame<KXK>(WHITE), Endgame<KXK>(BLACK) };
|
Endgame<KXK> EvaluateKXK[] = { Endgame<KXK>(WHITE), Endgame<KXK>(BLACK) };
|
||||||
|
@ -111,6 +117,10 @@ namespace {
|
||||||
bonus += pieceCount[Us][pt1] * v;
|
bonus += pieceCount[Us][pt1] * v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Special handling of Queen vs. Minors
|
||||||
|
if (pieceCount[Us][QUEEN] == 1 && pieceCount[Them][QUEEN] == 0)
|
||||||
|
bonus += QueenMinorsImbalance[pieceCount[Them][KNIGHT] + pieceCount[Them][BISHOP]];
|
||||||
|
|
||||||
return bonus;
|
return bonus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue