mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 01:03:09 +00:00
Outpost array simplification
The ReachableOutpost values were almost exactly half the Outpost values. Passed STC http://tests.stockfishchess.org/tests/view/588020510ebc5915193f781e LLR: 3.86 (-2.94,2.94) [-3.00,1.00] Total: 119238 W: 21462 L: 21460 D: 76316 Passed LTC http://tests.stockfishchess.org/tests/view/5880ae090ebc5915193f7843 LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 23540 W: 3097 L: 2980 D: 17463 Curiously, using a division by 2, with slightly different values, did not passed http://tests.stockfishchess.org/tests/view/587fece00ebc5915193f780a bench: 5828283
This commit is contained in:
parent
243a9f5484
commit
9eed183489
1 changed files with 8 additions and 14 deletions
|
@ -135,19 +135,13 @@ namespace {
|
||||||
S(118,174), S(119,177), S(123,191), S(128,199) }
|
S(118,174), S(119,177), S(123,191), S(128,199) }
|
||||||
};
|
};
|
||||||
|
|
||||||
// Outpost[knight/bishop][supported by pawn] contains bonuses for knights and
|
// Outpost[knight/bishop][supported by pawn] contains bonuses for minor
|
||||||
// bishops outposts, bigger if outpost piece is supported by a pawn.
|
// pieces if they can reach an outpost square, bigger if that square is
|
||||||
|
// supported by a pawn. If the minor piece occupies an outpost square
|
||||||
|
// then score is doubled.
|
||||||
const Score Outpost[][2] = {
|
const Score Outpost[][2] = {
|
||||||
{ S(43,11), S(65,20) }, // Knights
|
{ S(22, 6), S(33, 9) }, // Knight
|
||||||
{ S(20, 3), S(29, 8) } // Bishops
|
{ S( 9, 2), S(14, 4) } // Bishop
|
||||||
};
|
|
||||||
|
|
||||||
// ReachableOutpost[knight/bishop][supported by pawn] contains bonuses for
|
|
||||||
// knights and bishops which can reach an outpost square in one move, bigger
|
|
||||||
// if outpost square is supported by a pawn.
|
|
||||||
const Score ReachableOutpost[][2] = {
|
|
||||||
{ S(21, 5), S(35, 8) }, // Knights
|
|
||||||
{ S( 8, 0), S(14, 4) } // Bishops
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// RookOnFile[semiopen/open] contains bonuses for each rook when there is no
|
// RookOnFile[semiopen/open] contains bonuses for each rook when there is no
|
||||||
|
@ -316,12 +310,12 @@ namespace {
|
||||||
// Bonus for outpost squares
|
// Bonus for outpost squares
|
||||||
bb = OutpostRanks & ~ei.pe->pawn_attacks_span(Them);
|
bb = OutpostRanks & ~ei.pe->pawn_attacks_span(Them);
|
||||||
if (bb & s)
|
if (bb & s)
|
||||||
score += Outpost[Pt == BISHOP][!!(ei.attackedBy[Us][PAWN] & s)];
|
score += Outpost[Pt == BISHOP][!!(ei.attackedBy[Us][PAWN] & s)] * 2;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bb &= b & ~pos.pieces(Us);
|
bb &= b & ~pos.pieces(Us);
|
||||||
if (bb)
|
if (bb)
|
||||||
score += ReachableOutpost[Pt == BISHOP][!!(ei.attackedBy[Us][PAWN] & bb)];
|
score += Outpost[Pt == BISHOP][!!(ei.attackedBy[Us][PAWN] & bb)];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bonus when behind a pawn
|
// Bonus when behind a pawn
|
||||||
|
|
Loading…
Add table
Reference in a new issue