1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-11 19:49:14 +00:00

Long Diagonal Tweaks

a) Reduce PSQT values along the long diagonals on non-central squares
and increase the LongDiagonal bonus accordingly. The effect is to penalise
bishops on the long diagonal which can not "see" the 2 central squares.
The "good" bishops still have more or less the same bonus as current master.

b) For a bishop on a central square, because of the "| s" term in the code,
the LongDiagonalBonus was always given. So while being there, remove the "| s"
and compensate the central Bishop PSQT accordingly.

Passed STC
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 44498 W: 9658 L: 9323 D: 25517
http://tests.stockfishchess.org/tests/view/5b8992770ebc592cf2748942

Passed LTC
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 63092 W: 10324 L: 9975 D: 42793
http://tests.stockfishchess.org/tests/view/5b89a17a0ebc592cf2748b59

Closes https://github.com/official-stockfish/Stockfish/pull/1760

bench: 4693901
This commit is contained in:
Rocky640 2018-08-31 09:30:16 -04:00 committed by Stéphane Nicolet
parent e846a9306d
commit f923dc0fe5
2 changed files with 10 additions and 10 deletions

View file

@ -162,7 +162,7 @@ namespace {
constexpr Score HinderPassedPawn = S( 8, 0);
constexpr Score KingProtector = S( 6, 6);
constexpr Score KnightOnQueen = S( 21, 11);
constexpr Score LongDiagonalBishop = S( 22, 0);
constexpr Score LongDiagonalBishop = S( 46, 0);
constexpr Score MinorBehindPawn = S( 16, 0);
constexpr Score Overload = S( 13, 6);
constexpr Score PawnlessFlank = S( 19, 84);
@ -351,7 +351,7 @@ namespace {
* (1 + popcount(blocked & CenterFiles));
// Bonus for bishop on a long diagonal which can "see" both center squares
if (more_than_one(Center & (attacks_bb<BISHOP>(s, pos.pieces(PAWN)) | s)))
if (more_than_one(attacks_bb<BISHOP>(s, pos.pieces(PAWN)) & Center))
score += LongDiagonalBishop;
}

View file

@ -57,14 +57,14 @@ constexpr Score Bonus[][RANK_NB][int(FILE_NB) / 2] = {
{ S(-195,-109), S(-67,-89), S(-42,-50), S(-29,-13) }
},
{ // Bishop
{ S(-44,-58), S(-13,-31), S(-25,-37), S(-34,-19) },
{ S(-20,-34), S( 20, -9), S( 12,-14), S( 1, 4) },
{ S( -9,-23), S( 27, 0), S( 21, -3), S( 11, 16) },
{ S(-11,-26), S( 28, -3), S( 21, -5), S( 10, 16) },
{ S(-11,-26), S( 27, -4), S( 16, -7), S( 9, 14) },
{ S(-17,-24), S( 16, -2), S( 12, 0), S( 2, 13) },
{ S(-23,-34), S( 17,-10), S( 6,-12), S( -2, 6) },
{ S(-35,-55), S(-11,-32), S(-19,-36), S(-29,-17) }
{ S(-64,-58), S(-13,-31), S(-25,-37), S(-34,-19) },
{ S(-20,-34), S( 0, -9), S( 12,-14), S( 1, 4) },
{ S( -9,-23), S( 27, 0), S( 1, -3), S( 11, 16) },
{ S(-11,-26), S( 28, -3), S( 21, -5), S( 32, 16) },
{ S(-11,-26), S( 27, -4), S( 16, -7), S( 31, 14) },
{ S(-17,-24), S( 16, -2), S( -8, 0), S( 2, 13) },
{ S(-23,-34), S( -3,-10), S( 6,-12), S( -2, 6) },
{ S(-55,-55), S(-11,-32), S(-19,-36), S(-29,-17) }
},
{ // Rook
{ S(-25, 0), S(-16, 0), S(-16, 0), S(-9, 0) },