these are the tuned values I get for outposts (knight, bishop) (middlegame, endgame). they seem to be reasonable values.
Code: Select all
Score outpost_bonus[2] = { Score(25, 5), Score(28, 0), };
Code: Select all
if (pt == KNIGHT || pt == BISHOP)
{
if (outpost(pos.piece_bitboard[make_piece(PAWN, them)], pos.piece_bitboard[make_piece(PAWN, us)], sq, us))
score[us] += outpost_bonus[pt % KNIGHT];
}
Code: Select all
// outpost stockfish description:
// Outpost[knight/bishop] contains bonuses for each knight or bishop occupying a
// pawn protected square on rank 4 to 6 which is also safe from a pawn attack.
//this is an old attempt at knight outpost conditions that did not produce an improvement
bool outpost(Bitboard enemy_pawns, Bitboard friendly_pawns, Square sq, Colour side) {
return (pawn_attacks[other_side(side)][sq] & friendly_pawns) && (outpost_masks[side] & sq) && !(enemy_pawns & passed_masks[side][sq]);
}
edit: it looks like the posts are formatted to trim repeating spaces, so these are a bit difficult to read. still it should be rather clear what they are.
+---+---+---+---+---+---+---+---+
| | | | | | | | |8
+---+---+---+---+---+---+---+---+
| | | | | | | | |7
+---+---+---+---+---+---+---+---+
| X | X | X | X | X | X | X | X |6
+---+---+---+---+---+---+---+---+
| X | X | X | X | X | X | X | X |5
+---+---+---+---+---+---+---+---+
| X | X | X | X | X | X | X | X |4
+---+---+---+---+---+---+---+---+
| | | | | | | | |3
+---+---+---+---+---+---+---+---+
| | | | | | | | |2
+---+---+---+---+---+---+---+---+
| | | | | | | | |1
+---+---+---+---+---+---+---+---+
a b c d e f g h
this is the bitboard for outpost_masks[BLACK]
+---+---+---+---+---+---+---+---+
| | | | | | | | |8
+---+---+---+---+---+---+---+---+
| | | | | | | | |7
+---+---+---+---+---+---+---+---+
| | | | | | | | |6
+---+---+---+---+---+---+---+---+
| X | X | X | X | X | X | X | X |5
+---+---+---+---+---+---+---+---+
| X | X | X | X | X | X | X | X |4
+---+---+---+---+---+---+---+---+
| X | X | X | X | X | X | X | X |3
+---+---+---+---+---+---+---+---+
| | | | | | | | |2
+---+---+---+---+---+---+---+---+
| | | | | | | | |1
+---+---+---+---+---+---+---+---+
a b c d e f g h
this is the bitboard for passed_masks[WHITE][E5]
+---+---+---+---+---+---+---+---+
| | | | X | X | X | | |8
+---+---+---+---+---+---+---+---+
| | | | X | X | X | | |7
+---+---+---+---+---+---+---+---+
| | | | X | X | X | | |6
+---+---+---+---+---+---+---+---+
| | | | | | | | |5
+---+---+---+---+---+---+---+---+
| | | | | | | | |4
+---+---+---+---+---+---+---+---+
| | | | | | | | |3
+---+---+---+---+---+---+---+---+
| | | | | | | | |2
+---+---+---+---+---+---+---+---+
| | | | | | | | |1
+---+---+---+---+---+---+---+---+
a b c d e f g h