1
0
Fork 0

Improve the Chess960 correction for cornered bishops

As Chess960 patches can not be tested on fishtest, this was locally tuned
and tested:

Elo: 2.36 +- 1.07
LOS: 0.999992

closes https://github.com/official-stockfish/Stockfish/pull/3730

Bench: 5714575
pull/3722/head
Joost VandeVondele 2021-10-05 22:14:13 +02:00 committed by Stéphane Nicolet
parent 371b522e9e
commit 329bdbd9cf
1 changed files with 6 additions and 10 deletions

View File

@ -1053,26 +1053,22 @@ make_v:
if ( pos.piece_on(SQ_A1) == W_BISHOP
&& pos.piece_on(SQ_B2) == W_PAWN)
correction += !pos.empty(SQ_B3) ? -CorneredBishop * 4
: -CorneredBishop * 3;
correction -= CorneredBishop;
if ( pos.piece_on(SQ_H1) == W_BISHOP
&& pos.piece_on(SQ_G2) == W_PAWN)
correction += !pos.empty(SQ_G3) ? -CorneredBishop * 4
: -CorneredBishop * 3;
correction -= CorneredBishop;
if ( pos.piece_on(SQ_A8) == B_BISHOP
&& pos.piece_on(SQ_B7) == B_PAWN)
correction += !pos.empty(SQ_B6) ? CorneredBishop * 4
: CorneredBishop * 3;
correction += CorneredBishop;
if ( pos.piece_on(SQ_H8) == B_BISHOP
&& pos.piece_on(SQ_G7) == B_PAWN)
correction += !pos.empty(SQ_G6) ? CorneredBishop * 4
: CorneredBishop * 3;
correction += CorneredBishop;
return pos.side_to_move() == WHITE ? Value(correction)
: -Value(correction);
return pos.side_to_move() == WHITE ? Value(5 * correction)
: -Value(5 * correction);
}
} // namespace Eval