mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Pins or discovered attacks on the opponent's queen
Bonus for pins or discovered attacks on the opponent's queen STC: LLR: 2.96 (-2.94,2.94) [0.00,5.00] Total: 32020 W: 5914 L: 5652 D: 20454 LTC: LLR: 2.97 (-2.94,2.94) [0.00,5.00] Total: 10946 W: 1530 L: 1375 D: 8041 Bench: 7031649
This commit is contained in:
parent
abac509ccb
commit
07b247f943
1 changed files with 8 additions and 0 deletions
|
@ -187,6 +187,7 @@ namespace {
|
|||
const Score OtherCheck = S(10, 10);
|
||||
const Score ThreatByHangingPawn = S(71, 61);
|
||||
const Score LooseEnemies = S( 0, 25);
|
||||
const Score WeakQueen = S(35, 0);
|
||||
const Score Hanging = S(48, 27);
|
||||
const Score ThreatByPawnPush = S(38, 22);
|
||||
const Score Unstoppable = S( 0, 20);
|
||||
|
@ -488,6 +489,13 @@ namespace {
|
|||
& ~(ei.attackedBy[Us][ALL_PIECES] | ei.attackedBy[Them][ALL_PIECES]))
|
||||
score += LooseEnemies;
|
||||
|
||||
// Bonus for pin or discovered attack on the opponent queen
|
||||
if ( pos.count<QUEEN>(Them) == 1
|
||||
&& pos.slider_blockers(pos.pieces(),
|
||||
pos.pieces(Us, ROOK, BISHOP),
|
||||
pos.square<QUEEN>(Them)))
|
||||
score += WeakQueen;
|
||||
|
||||
// Non-pawn enemies attacked by a pawn
|
||||
weak = (pos.pieces(Them) ^ pos.pieces(Them, PAWN)) & ei.attackedBy[Us][PAWN];
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue