mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 09:13:08 +00:00
Remove undefended minors
Tested in "no regression" mode. Passed both STC LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 68026 W: 12277 L: 12236 D: 43513 And LTC LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 85682 W: 12861 L: 12836 D: 59985 bench: 7311935
This commit is contained in:
parent
696d6cedb9
commit
a3c8c4b70d
1 changed files with 1 additions and 9 deletions
|
@ -169,7 +169,6 @@ namespace {
|
||||||
const Score RookSemiopenFile = make_score(19, 10);
|
const Score RookSemiopenFile = make_score(19, 10);
|
||||||
const Score BishopPawns = make_score( 8, 12);
|
const Score BishopPawns = make_score( 8, 12);
|
||||||
const Score MinorBehindPawn = make_score(16, 0);
|
const Score MinorBehindPawn = make_score(16, 0);
|
||||||
const Score UndefendedMinor = make_score(25, 10);
|
|
||||||
const Score TrappedRook = make_score(90, 0);
|
const Score TrappedRook = make_score(90, 0);
|
||||||
const Score Unstoppable = make_score( 0, 20);
|
const Score Unstoppable = make_score( 0, 20);
|
||||||
|
|
||||||
|
@ -520,16 +519,9 @@ namespace {
|
||||||
|
|
||||||
const Color Them = (Us == WHITE ? BLACK : WHITE);
|
const Color Them = (Us == WHITE ? BLACK : WHITE);
|
||||||
|
|
||||||
Bitboard b, undefendedMinors, weakEnemies;
|
Bitboard b, weakEnemies;
|
||||||
Score score = SCORE_ZERO;
|
Score score = SCORE_ZERO;
|
||||||
|
|
||||||
// Undefended minors get penalized even if they are not under attack
|
|
||||||
undefendedMinors = pos.pieces(Them, BISHOP, KNIGHT)
|
|
||||||
& ~ei.attackedBy[Them][ALL_PIECES];
|
|
||||||
|
|
||||||
if (undefendedMinors)
|
|
||||||
score += UndefendedMinor;
|
|
||||||
|
|
||||||
// Enemies not defended by a pawn and under our attack
|
// Enemies not defended by a pawn and under our attack
|
||||||
weakEnemies = pos.pieces(Them)
|
weakEnemies = pos.pieces(Them)
|
||||||
& ~ei.attackedBy[Them][PAWN]
|
& ~ei.attackedBy[Them][PAWN]
|
||||||
|
|
Loading…
Add table
Reference in a new issue