mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Introduce attacks on space area
This patch introduces a small malus for every square in our space mask that is attacked by enemy. The value of the malus is completely arbitrary and is something we can tweak, also maybe we can gain some elo with tweaking space threshold after this addition. Passed STC http://tests.stockfishchess.org/tests/view/5d10ce590ebc5925cf0af30b LLR: 2.96 (-2.94,2.94) [0.50,4.50] Total: 7082 W: 1648 L: 1449 D: 3985 Passed LTC http://tests.stockfishchess.org/tests/view/5d10d2d80ebc5925cf0af3fd LLR: 2.96 (-2.94,2.94) [0.00,3.50] Total: 79494 W: 13727 L: 13324 D: 52443 Closes https://github.com/official-stockfish/Stockfish/pull/2207 bench 3516460
This commit is contained in:
parent
8b4521df83
commit
dab66631e8
1 changed files with 3 additions and 0 deletions
|
@ -133,6 +133,7 @@ namespace {
|
|||
};
|
||||
|
||||
// Assorted bonuses and penalties
|
||||
constexpr Score AttacksOnSpaceArea = S( 4, 0);
|
||||
constexpr Score BishopPawns = S( 3, 7);
|
||||
constexpr Score CorneredBishop = S( 50, 50);
|
||||
constexpr Score FlankAttacks = S( 8, 0);
|
||||
|
@ -711,6 +712,8 @@ namespace {
|
|||
int weight = pos.count<ALL_PIECES>(Us) - 1;
|
||||
Score score = make_score(bonus * weight * weight / 16, 0);
|
||||
|
||||
score -= AttacksOnSpaceArea * popcount(attackedBy[Them][ALL_PIECES] & behind & safe);
|
||||
|
||||
if (T)
|
||||
Trace::add(SPACE, Us, score);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue