mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 09:39:36 +00:00
Retire rook contact checks
STC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 34114 W: 6363 L: 6265 D: 21486 LTC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 61776 W: 9349 L: 9289 D: 43138 LTC (after rebasing): LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 15261 W: 2343 L: 2214 D: 10704 Bench: 7523382 Resolves #442
This commit is contained in:
parent
08d6465d90
commit
55b46ffa90
1 changed files with 1 additions and 19 deletions
|
@ -220,9 +220,8 @@ namespace {
|
||||||
|
|
||||||
// Penalties for enemy's safe checks
|
// Penalties for enemy's safe checks
|
||||||
const int QueenContactCheck = 89;
|
const int QueenContactCheck = 89;
|
||||||
const int RookContactCheck = 71;
|
|
||||||
const int QueenCheck = 50;
|
const int QueenCheck = 50;
|
||||||
const int RookCheck = 37;
|
const int RookCheck = 45;
|
||||||
const int BishopCheck = 6;
|
const int BishopCheck = 6;
|
||||||
const int KnightCheck = 14;
|
const int KnightCheck = 14;
|
||||||
|
|
||||||
|
@ -421,23 +420,6 @@ namespace {
|
||||||
attackUnits += QueenContactCheck * popcount<Max15>(b);
|
attackUnits += QueenContactCheck * popcount<Max15>(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Analyse the enemy's safe rook contact checks. Firstly, find the
|
|
||||||
// undefended squares around the king reachable by the enemy rooks...
|
|
||||||
b = undefended & ei.attackedBy[Them][ROOK] & ~pos.pieces(Them);
|
|
||||||
|
|
||||||
// Consider only squares where the enemy's rook gives check
|
|
||||||
b &= PseudoAttacks[ROOK][ksq];
|
|
||||||
|
|
||||||
if (b)
|
|
||||||
{
|
|
||||||
// ...and then remove squares not supported by another enemy piece
|
|
||||||
b &= ( ei.attackedBy[Them][PAWN] | ei.attackedBy[Them][KNIGHT]
|
|
||||||
| ei.attackedBy[Them][BISHOP]);
|
|
||||||
|
|
||||||
if (b)
|
|
||||||
attackUnits += RookContactCheck * popcount<Max15>(b);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Analyse the enemy's safe distance checks for sliders and knights
|
// Analyse the enemy's safe distance checks for sliders and knights
|
||||||
safe = ~(ei.attackedBy[Us][ALL_PIECES] | pos.pieces(Them));
|
safe = ~(ei.attackedBy[Us][ALL_PIECES] | pos.pieces(Them));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue