mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 10:57:43 +00:00
Rewrite unstoppable pawns evaluation
Instead of current code, give a bonus according to the frontmost square among candidate + passed pawns. This is a big simplification that removes a lot of accurate code substituting it with a statistically based one using the common 'bonus' scheme, leaving to the search to sort out the details. Results are equivalent but code is much less and, as an added bonus, we now store candidates bitboard in pawns hash and allow this info to be used in evaluation. This paves the way to possible candidate pawns evaluations together with all the other pieces, as we do for passed. Patch passed short TC LLR: 2.96 (-2.94,2.94) [-1.50,4.50] Total: 16927 W: 3462 L: 3308 D: 10157 Then failed (quite quickly) at long TC LLR: -2.95 (-2.94,2.94) [0.00,6.00] Total: 8451 W: 1386 L: 1448 D: 5617 But when ran with a conclusive 40K fixed games at 60 secs it proved almost equivalent to original one. ELO: 1.08 +-2.0 (95%) LOS: 85.8% Total: 40000 W: 6739 L: 6615 D: 26646 bench: 3884003
This commit is contained in:
@@ -37,6 +37,7 @@ struct Entry {
|
||||
Score pawns_value() const { return value; }
|
||||
Bitboard pawn_attacks(Color c) const { return pawnAttacks[c]; }
|
||||
Bitboard passed_pawns(Color c) const { return passedPawns[c]; }
|
||||
Bitboard candidate_pawns(Color c) const { return candidatePawns[c]; }
|
||||
int pawns_on_same_color_squares(Color c, Square s) const { return pawnsOnSquares[c][!!(DarkSquares & s)]; }
|
||||
int semiopen(Color c, File f) const { return semiopenFiles[c] & (1 << int(f)); }
|
||||
int semiopen_on_side(Color c, File f, bool left) const {
|
||||
@@ -59,6 +60,7 @@ struct Entry {
|
||||
|
||||
Key key;
|
||||
Bitboard passedPawns[COLOR_NB];
|
||||
Bitboard candidatePawns[COLOR_NB];
|
||||
Bitboard pawnAttacks[COLOR_NB];
|
||||
Square kingSquares[COLOR_NB];
|
||||
int minKPdistance[COLOR_NB];
|
||||
|
||||
Reference in New Issue
Block a user