mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Bonus for a pawn in front of knight/bishop
Idea originated from a post of Don Dailey on talkchess and reported by Eelco. This is the last succesful attempt of a long series of trials (as usually happens, the 'idea' alone is not enough). Passed both short 15secs TC LLR: 2.97 (-2.94,2.94) Total: 7629 W: 1645 L: 1515 D: 4469 And long 60secs TC LLR: 2.96 (-2.94,2.94) Total: 10218 W: 1932 L: 1775 D: 6511 bench: 4944581
This commit is contained in:
parent
4d14f97482
commit
bd8f463b7e
1 changed files with 11 additions and 4 deletions
|
@ -530,10 +530,17 @@ Value do_evaluate(const Position& pos, Value& margin) {
|
||||||
if (Piece == BISHOP)
|
if (Piece == BISHOP)
|
||||||
score -= BishopPawns * ei.pi->pawns_on_same_color_squares(Us, s);
|
score -= BishopPawns * ei.pi->pawns_on_same_color_squares(Us, s);
|
||||||
|
|
||||||
// Bishop and knight outposts squares
|
if (Piece == BISHOP || Piece == KNIGHT)
|
||||||
if ( (Piece == BISHOP || Piece == KNIGHT)
|
{
|
||||||
&& !(pos.pieces(Them, PAWN) & pawn_attack_span(Us, s)))
|
// Bishop and knight outposts squares
|
||||||
score += evaluate_outposts<Piece, Us>(pos, ei, s);
|
if (!(pos.pieces(Them, PAWN) & pawn_attack_span(Us, s)))
|
||||||
|
score += evaluate_outposts<Piece, Us>(pos, ei, s);
|
||||||
|
|
||||||
|
// Pawn in front of knight/bishop
|
||||||
|
if ( relative_rank(Us, s) < RANK_5
|
||||||
|
&& (pos.pieces(PAWN) & (s + pawn_push(Us))))
|
||||||
|
score += make_score(16, 0);
|
||||||
|
}
|
||||||
|
|
||||||
if ( (Piece == ROOK || Piece == QUEEN)
|
if ( (Piece == ROOK || Piece == QUEEN)
|
||||||
&& relative_rank(Us, s) >= RANK_5)
|
&& relative_rank(Us, s) >= RANK_5)
|
||||||
|
|
Loading…
Add table
Reference in a new issue