Skip to content

Commit 329bdbd

Browse files
vondelesnicolet
authored andcommitted
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 #3730 Bench: 5714575
1 parent 371b522 commit 329bdbd

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/evaluate.cpp

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,26 +1053,22 @@ namespace {
10531053

10541054
if ( pos.piece_on(SQ_A1) == W_BISHOP
10551055
&& pos.piece_on(SQ_B2) == W_PAWN)
1056-
correction += !pos.empty(SQ_B3) ? -CorneredBishop * 4
1057-
: -CorneredBishop * 3;
1056+
correction -= CorneredBishop;
10581057

10591058
if ( pos.piece_on(SQ_H1) == W_BISHOP
10601059
&& pos.piece_on(SQ_G2) == W_PAWN)
1061-
correction += !pos.empty(SQ_G3) ? -CorneredBishop * 4
1062-
: -CorneredBishop * 3;
1060+
correction -= CorneredBishop;
10631061

10641062
if ( pos.piece_on(SQ_A8) == B_BISHOP
10651063
&& pos.piece_on(SQ_B7) == B_PAWN)
1066-
correction += !pos.empty(SQ_B6) ? CorneredBishop * 4
1067-
: CorneredBishop * 3;
1064+
correction += CorneredBishop;
10681065

10691066
if ( pos.piece_on(SQ_H8) == B_BISHOP
10701067
&& pos.piece_on(SQ_G7) == B_PAWN)
1071-
correction += !pos.empty(SQ_G6) ? CorneredBishop * 4
1072-
: CorneredBishop * 3;
1068+
correction += CorneredBishop;
10731069

1074-
return pos.side_to_move() == WHITE ? Value(correction)
1075-
: -Value(correction);
1070+
return pos.side_to_move() == WHITE ? Value(5 * correction)
1071+
: -Value(5 * correction);
10761072
}
10771073

10781074
} // namespace Eval

0 commit comments

Comments
 (0)