From: Steinar H. Gunderson Date: Tue, 1 May 2018 11:44:33 +0000 (+0200) Subject: Add support for 7-man Syzygy tablebases. X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=827f485e27e73e10580db877f4edd2711e7ccbda;hp=12485ed0524598d3ebfbce6daf4ad0014c4af566 Add support for 7-man Syzygy tablebases. --- diff --git a/src/syzygy/tbprobe.cpp b/src/syzygy/tbprobe.cpp index 235fe195..8194f4b4 100644 --- a/src/syzygy/tbprobe.cpp +++ b/src/syzygy/tbprobe.cpp @@ -74,7 +74,7 @@ int MapB1H1H7[SQUARE_NB]; int MapA1D1D4[SQUARE_NB]; int MapKK[10][SQUARE_NB]; // [MapA1D1D4][SQUARE_NB] -int Binomial[6][SQUARE_NB]; // [k][n] k elements from a set of n elements +int Binomial[7][SQUARE_NB]; // [k][n] k elements from a set of n elements int LeadPawnIdx[6][SQUARE_NB]; // [leadPawnsCnt][SQUARE_NB] int LeadPawnsSize[6][4]; // [leadPawnsCnt][FILE_A..FILE_D] @@ -1291,7 +1291,7 @@ void Tablebases::init(const std::string& paths) { Binomial[0][0] = 1; for (int n = 1; n < 64; n++) // Squares - for (int k = 0; k < 6 && k <= n; ++k) // Pieces + for (int k = 0; k < 7 && k <= n; ++k) // Pieces Binomial[k][n] = (k > 0 ? Binomial[k - 1][n - 1] : 0) + (k < n ? Binomial[k ][n - 1] : 0);