mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 19:49:14 +00:00
Increase safe check bonus if multiple safe checks
Add 50% "safe checks" bonus when there are multiple safe checks from the same piece type. LTC LLR: 2.97 (-2.94,2.94) {0.25,1.75} Total: 128184 W: 16491 L: 15954 D: 95739 Ptnml(0-2): 884, 11793, 38267, 12198, 950 https://tests.stockfishchess.org/tests/view/5e97d1b6c9ada107a0370e03 STC LLR: 2.94 (-2.94,2.94) {-0.50,1.50} Total: 19022 W: 3733 L: 3514 D: 11775 Ptnml(0-2): 338, 2103, 4414, 2314, 342 https://tests.stockfishchess.org/tests/view/5e97c377c9ada107a0370ddf closes https://github.com/official-stockfish/Stockfish/pull/2636 Bench: 5057329
This commit is contained in:
parent
d87adcc006
commit
6f35af7ad3
1 changed files with 8 additions and 8 deletions
|
@ -398,9 +398,9 @@ namespace {
|
|||
|
||||
// Enemy rooks checks
|
||||
rookChecks = b1 & safe & attackedBy[Them][ROOK];
|
||||
|
||||
if (rookChecks)
|
||||
kingDanger += RookSafeCheck;
|
||||
kingDanger += more_than_one(rookChecks) ? RookSafeCheck * 3/2
|
||||
: RookSafeCheck;
|
||||
else
|
||||
unsafeChecks |= b1 & attackedBy[Them][ROOK];
|
||||
|
||||
|
@ -411,9 +411,9 @@ namespace {
|
|||
& safe
|
||||
& ~attackedBy[Us][QUEEN]
|
||||
& ~rookChecks;
|
||||
|
||||
if (queenChecks)
|
||||
kingDanger += QueenSafeCheck;
|
||||
kingDanger += more_than_one(queenChecks) ? QueenSafeCheck * 3/2
|
||||
: QueenSafeCheck;
|
||||
|
||||
// Enemy bishops checks: we count them only if they are from squares from
|
||||
// which we can't give a queen check, because queen checks are more valuable.
|
||||
|
@ -421,17 +421,17 @@ namespace {
|
|||
& attackedBy[Them][BISHOP]
|
||||
& safe
|
||||
& ~queenChecks;
|
||||
|
||||
if (bishopChecks)
|
||||
kingDanger += BishopSafeCheck;
|
||||
kingDanger += more_than_one(bishopChecks) ? BishopSafeCheck * 3/2
|
||||
: BishopSafeCheck;
|
||||
else
|
||||
unsafeChecks |= b2 & attackedBy[Them][BISHOP];
|
||||
|
||||
// Enemy knights checks
|
||||
knightChecks = pos.attacks_from<KNIGHT>(ksq) & attackedBy[Them][KNIGHT];
|
||||
|
||||
if (knightChecks & safe)
|
||||
kingDanger += KnightSafeCheck;
|
||||
kingDanger += more_than_one(knightChecks & safe) ? KnightSafeCheck * 3/2
|
||||
: KnightSafeCheck;
|
||||
else
|
||||
unsafeChecks |= knightChecks;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue