]> git.sesse.net Git - stockfish/blobdiff - src/pawns.h
Use a formula for chain membership bonus
[stockfish] / src / pawns.h
index 7292606b8451b95a06716bc65a6157a7668d1971..f6be84e774ed122d86cd8d8be9a351c64bc1340b 100644 (file)
@@ -37,7 +37,8 @@ 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]; }
-  int pawns_on_same_color_squares(Color c, Square s) const { return pawnsOnSquares[c][!!(BlackSquares & s)]; }
+  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];
@@ -71,6 +73,7 @@ struct Entry {
 
 typedef HashTable<Entry, 16384> Table;
 
+void init();
 Entry* probe(const Position& pos, Table& entries);
 
 }