mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Bonus for rook on same file as their queen
This patch creates a simple bonus for a rook that is on the same file as the opponent's queen. STC 10+0.1 th 1 : LLR: 2.95 (-2.94,2.94) [0.50,4.50] Total: 45609 W: 10120 L: 9733 D: 25756 http://tests.stockfishchess.org/tests/view/5d79895a0ebc5902d385484a LTC 60+0.6 th 1 : LLR: 2.96 (-2.94,2.94) [0.00,3.50] Total: 51651 W: 8606 L: 8288 D: 34757 http://tests.stockfishchess.org/tests/view/5d79a0850ebc5902d3854d27 Many thanks to @noobpwnftw for providing the extra cpu resources for fishtest, which led to me doing these tests. Closes https://github.com/official-stockfish/Stockfish/pull/2297 Bench: 4024461
This commit is contained in:
parent
270b241ec1
commit
36e4a86c08
1 changed files with 5 additions and 0 deletions
|
@ -140,6 +140,7 @@ namespace {
|
|||
constexpr Score PawnlessFlank = S( 17, 95);
|
||||
constexpr Score RestrictedPiece = S( 7, 7);
|
||||
constexpr Score RookOnPawn = S( 10, 32);
|
||||
constexpr Score RookOnQueenFile = S( 11, 4);
|
||||
constexpr Score SliderOnQueen = S( 59, 18);
|
||||
constexpr Score ThreatByKing = S( 24, 89);
|
||||
constexpr Score ThreatByPawnPush = S( 48, 39);
|
||||
|
@ -346,6 +347,10 @@ namespace {
|
|||
if (relative_rank(Us, s) >= RANK_5)
|
||||
score += RookOnPawn * popcount(pos.pieces(Them, PAWN) & PseudoAttacks[ROOK][s]);
|
||||
|
||||
// Bonus for rook on same file as their queen
|
||||
if (file_bb(s) & pos.pieces(Them, QUEEN))
|
||||
score += RookOnQueenFile;
|
||||
|
||||
// Bonus for rook on an open or semi-open file
|
||||
if (pos.is_on_semiopen_file(Us, s))
|
||||
score += RookOnFile[bool(pos.is_on_semiopen_file(Them, s))];
|
||||
|
|
Loading…
Add table
Reference in a new issue