LCOV - code coverage report
Current view: top level - src - stored.cpp (source / functions) Hit Total Coverage
Test: test_coverage.info Lines: 2 42 4.8 %
Date: 2017-06-21 14:32:49 Functions: 2 5 40.0 %

          Line data    Source code
       1             : /*
       2             : * Copyright (C) 2014  Fulvio Benini
       3             : 
       4             : * This file is part of Scid (Shane's Chess Information Database).
       5             : *
       6             : * Scid is free software: you can redistribute it and/or modify
       7             : * it under the terms of the GNU General Public License as published by
       8             : * the Free Software Foundation.
       9             : *
      10             : * Scid is distributed in the hope that it will be useful,
      11             : * but WITHOUT ANY WARRANTY; without even the implied warranty of
      12             : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      13             : * GNU General Public License for more details.
      14             : *
      15             : * You should have received a copy of the GNU General Public License
      16             : * along with Scid.  If not, see <http://www.gnu.org/licenses/>.
      17             : */
      18             : 
      19             : #include "stored.h"
      20             : #include <cstring>
      21             : 
      22             : // Stored line codes: used to speed up tree searches.
      23             : 
      24             : // The basic idea is: keep a fixed dictionary of popular opening lines where
      25             : // move order is significant (e.g. 1.d4 e6 2.e4 is NOT equal to 1.e4 e6 2.d4).
      26             : // For each game, the longest sequence of initial moves found in the
      27             : // dictionary is stored in the index file, as an integer value.
      28             : 
      29             : // When tree-searching for a position, each stored line is searched
      30             : // first and if an exact match is found for one (and it has a further
      31             : // move), all games with that stored line code can be found as matches
      32             : // without decoding.
      33             : // Furthermore, if we detect that a line cannot possibly lead to a match
      34             : // because of its end material value or pawn configuration, all games with
      35             : // that stored line code can be excluded and skipped without decoding.
      36             : 
      37             : namespace {
      38             :         
      39             : class Board {
      40             :         pieceT b_[64];
      41             : 
      42             : public:
      43           0 :         Board(const pieceT* b) {
      44           0 :                 for (int i=0; i < 64; i++) b_[i] = b[i];
      45             :         }
      46           0 :         void doMove(FullMove m) {
      47             :                 //No promo, no null moves, no queenside castle
      48           0 :                 if (! m.isCastle()) {
      49           0 :                         b_[m.getFrom()] = EMPTY;
      50           0 :                         b_[m.getTo()] = piece_Make(m.getColor(), m.getPiece());
      51             :                 } else {
      52           0 :                         b_[m.getFrom()] = EMPTY;
      53           0 :                         b_[m.getTo()] = EMPTY;
      54           0 :                         int black = (m.getColor() == BLACK) ? 56 : 0;
      55           0 :                         b_[black + G1] = piece_Make(m.getColor(), KING);
      56           0 :                         b_[black + F1] = piece_Make(m.getColor(), ROOK);
      57             :                 }
      58           0 :         }
      59             :         bool operator==(const Board& b) const {
      60           0 :                 return (std::memcmp(b_, b.b_, sizeof b_) == 0);
      61             :         }
      62           0 :         bool neverMatch(const Board& m) const {
      63             :                 // Pawns allows to exclude some games:
      64           0 :                 int p[3][8] = {{0}};
      65           0 :                 for (int i=0; i < 64; i++) {
      66           0 :                         pieceT a = b_[i];
      67           0 :                         pieceT b = m.b_[i];
      68             :                         // 1) because a pawn will never go back to home position
      69           0 :                         if (b == WP && a != WP && (i/8) == 1) return true;
      70           0 :                         if (b == BP && a != BP && (i/8) == 6) return true;
      71           0 :                         p[piece_Color(a)][piece_Type(a)] += 1;
      72           0 :                         p[piece_Color(b)][piece_Type(b)] -= 1;
      73             :                 }
      74             :                 int df[2] = {0};
      75           0 :                 for (pieceT i=QUEEN; i < PAWN; i++) {
      76           0 :                         if (p[WHITE][i] < 0) df[WHITE] -= p[WHITE][i];
      77           0 :                         if (p[BLACK][i] < 0) df[BLACK] -= p[BLACK][i];
      78             :                 }
      79             :                 // 2) because only extra pawns can be promoted to create other pieces.
      80           0 :                 if (p[WHITE][PAWN] < df[WHITE] || p[BLACK][PAWN] < df[BLACK]) return true;
      81           0 :                 return false;
      82             :         }
      83             : };
      84             : 
      85             : FullMove fm[] = {
      86             :  // "1.b3"
      87             :  0x6000251,
      88             :  // "1.c4"
      89             :  0x600029a,
      90             :  // "1.c4 c5"
      91             :  0x600029a, 0xe000ca2,
      92             :  // "1.c4 c5 2.Nf3"
      93             :  0x600029a, 0xe000ca2, 0x5000195,
      94             :  // "1.c4 e5"
      95             :  0x600029a, 0xe000d24,
      96             :  // "1.c4 e5 2.Nc3"
      97             :  0x600029a, 0xe000d24, 0x5000052,
      98             :  // "1.c4 e5 2.Nc3 Nf6"
      99             :  0x600029a, 0xe000d24, 0x5000052, 0xd000fad,
     100             :  // "1.c4 e6"
     101             :  0x600029a, 0xe000d2c,
     102             :  // "1.c4 e6 2.Nf3"
     103             :  0x600029a, 0xe000d2c, 0x5000195,
     104             :  // "1.c4 g6"
     105             :  0x600029a, 0xe000dae,
     106             :  // "1.c4 Nf6"
     107             :  0x600029a, 0xd000fad,
     108             :  // "1.c4 Nf6 2.Nc3"
     109             :  0x600029a, 0xd000fad, 0x5000052,
     110             :  // "1.c4 Nf6 2.Nc3 e6"
     111             :  0x600029a, 0xd000fad, 0x5000052, 0xe000d2c,
     112             :  // "1.c4 Nf6 2.Nc3 g6"
     113             :  0x600029a, 0xd000fad, 0x5000052, 0xe000dae,
     114             :  // "1.d4"
     115             :  0x60002db,
     116             :  // "1.d4 d5"
     117             :  0x60002db, 0xe000ce3,
     118             :  // "1.d4 d5 2.c4"
     119             :  0x60002db, 0xe000ce3, 0x600029a,
     120             :  // "1.d4 d5 2.c4 c6"
     121             :  0x60002db, 0xe000ce3, 0x600029a, 0xe000caa,
     122             :  // "1.d4 d5 2.c4 c6 3.Nc3"
     123             :  0x60002db, 0xe000ce3, 0x600029a, 0xe000caa, 0x5000052,
     124             :  // "1.d4 d5 2.c4 c6 3.Nc3 Nf6"
     125             :  0x60002db, 0xe000ce3, 0x600029a, 0xe000caa, 0x5000052, 0xd000fad,
     126             :  // "1.d4 d5 2.c4 c6 3.Nc3 Nf6 4.Nf3"
     127             :  0x60002db, 0xe000ce3, 0x600029a, 0xe000caa, 0x5000052, 0xd000fad, 0x5000195,
     128             :  // "1.d4 d5 2.c4 c6 3.Nf3"
     129             :  0x60002db, 0xe000ce3, 0x600029a, 0xe000caa, 0x5000195,
     130             :  // "1.d4 d5 2.c4 c6 3.Nf3 Nf6"
     131             :  0x60002db, 0xe000ce3, 0x600029a, 0xe000caa, 0x5000195, 0xd000fad,
     132             :  // "1.d4 d5 2.c4 c6 3.Nf3 Nf6 4.Nc3"
     133             :  0x60002db, 0xe000ce3, 0x600029a, 0xe000caa, 0x5000195, 0xd000fad, 0x5000052,
     134             :  // "1.d4 d5 2.c4 c6 3.Nf3 Nf6 4.Nc3 e6"
     135             :  0x60002db, 0xe000ce3, 0x600029a, 0xe000caa, 0x5000195, 0xd000fad, 0x5000052, 0xe000d2c,
     136             :  // "1.d4 d5 2.c4 dxc4"
     137             :  0x60002db, 0xe000ce3, 0x600029a, 0xec008da,
     138             :  // "1.d4 d5 2.c4 dxc4 3.Nf3"
     139             :  0x60002db, 0xe000ce3, 0x600029a, 0xec008da, 0x5000195,
     140             :  // "1.d4 d5 2.c4 dxc4 3.Nf3 Nf6"
     141             :  0x60002db, 0xe000ce3, 0x600029a, 0xec008da, 0x5000195, 0xd000fad,
     142             :  // "1.d4 d5 2.c4 e6"
     143             :  0x60002db, 0xe000ce3, 0x600029a, 0xe000d2c,
     144             :  // "1.d4 d5 2.c4 e6 3.Nc3"
     145             :  0x60002db, 0xe000ce3, 0x600029a, 0xe000d2c, 0x5000052,
     146             :  // "1.d4 d5 2.c4 e6 3.Nc3 c6"
     147             :  0x60002db, 0xe000ce3, 0x600029a, 0xe000d2c, 0x5000052, 0xe000caa,
     148             :  // "1.d4 d5 2.c4 e6 3.Nc3 Nf6"
     149             :  0x60002db, 0xe000ce3, 0x600029a, 0xe000d2c, 0x5000052, 0xd000fad,
     150             :  // "1.d4 d5 2.c4 e6 3.Nf3"
     151             :  0x60002db, 0xe000ce3, 0x600029a, 0xe000d2c, 0x5000195,
     152             :  // "1.d4 d5 2.Nf3"
     153             :  0x60002db, 0xe000ce3, 0x5000195,
     154             :  // "1.d4 d5 2.Nf3 Nf6"
     155             :  0x60002db, 0xe000ce3, 0x5000195, 0xd000fad,
     156             :  // "1.d4 d5 2.Nf3 Nf6 3.c4"
     157             :  0x60002db, 0xe000ce3, 0x5000195, 0xd000fad, 0x600029a,
     158             :  // "1.d4 d5 2.Nf3 Nf6 3.c4 c6"
     159             :  0x60002db, 0xe000ce3, 0x5000195, 0xd000fad, 0x600029a, 0xe000caa,
     160             :  // "1.d4 d5 2.Nf3 Nf6 3.c4 e6"
     161             :  0x60002db, 0xe000ce3, 0x5000195, 0xd000fad, 0x600029a, 0xe000d2c,
     162             :  // "1.d4 d6"
     163             :  0x60002db, 0xe000ceb,
     164             :  // "1.d4 d6 2.Nf3"
     165             :  0x60002db, 0xe000ceb, 0x5000195,
     166             :  // "1.d4 e6"
     167             :  0x60002db, 0xe000d2c,
     168             :  // "1.d4 e6 2.c4"
     169             :  0x60002db, 0xe000d2c, 0x600029a,
     170             :  // "1.d4 e6 2.c4 Nf6"
     171             :  0x60002db, 0xe000d2c, 0x600029a, 0xd000fad,
     172             :  // "1.d4 f5"
     173             :  0x60002db, 0xe000d65,
     174             :  // "1.d4 f5 2.g3 Nf6 3.Bg2"
     175             :  0x60002db, 0xe000d65, 0x6000396, 0xd000fad, 0x400014e,
     176             :  // "1.d4 g6"
     177             :  0x60002db, 0xe000dae,
     178             :  // "1.d4 g6 2.c4 Bg7"
     179             :  0x60002db, 0xe000dae, 0x600029a, 0xc000f76,
     180             :  // "1.d4 Nf6"
     181             :  0x60002db, 0xd000fad,
     182             :  // "1.d4 Nf6 2.Bg5"
     183             :  0x60002db, 0xd000fad, 0x40000a6,
     184             :  // "1.d4 Nf6 2.Bg5 Ne4"
     185             :  0x60002db, 0xd000fad, 0x40000a6, 0xd000b5c,
     186             :  // "1.d4 Nf6 2.c4"
     187             :  0x60002db, 0xd000fad, 0x600029a,
     188             :  // "1.d4 Nf6 2.c4 c5"
     189             :  0x60002db, 0xd000fad, 0x600029a, 0xe000ca2,
     190             :  // "1.d4 Nf6 2.c4 c5 3.d5"
     191             :  0x60002db, 0xd000fad, 0x600029a, 0xe000ca2, 0x60006e3,
     192             :  // "1.d4 Nf6 2.c4 c5 3.d5 b5"
     193             :  0x60002db, 0xd000fad, 0x600029a, 0xe000ca2, 0x60006e3, 0xe000c61,
     194             :  // "1.d4 Nf6 2.c4 c5 3.d5 b5 4.cxb5 a6"
     195             :  0x60002db, 0xd000fad, 0x600029a, 0xe000ca2, 0x60006e3, 0xe000c61, 0x6c006a1, 0xe000c28,
     196             :  // "1.d4 Nf6 2.c4 e6 3.g3"
     197             :  0x60002db, 0xd000fad, 0x600029a, 0xe000d2c, 0x6000396,
     198             :  // "1.d4 Nf6 2.c4 e6 3.g3 d5"
     199             :  0x60002db, 0xd000fad, 0x600029a, 0xe000d2c, 0x6000396, 0xe000ce3,
     200             :  // "1.d4 Nf6 2.c4 e6 3.Nc3"
     201             :  0x60002db, 0xd000fad, 0x600029a, 0xe000d2c, 0x5000052,
     202             :  // "1.d4 Nf6 2.c4 e6 3.Nc3 Bb4"
     203             :  0x60002db, 0xd000fad, 0x600029a, 0xe000d2c, 0x5000052, 0xc000f59,
     204             :  // "1.d4 Nf6 2.c4 e6 3.Nc3 Bb4 4.e3"
     205             :  0x60002db, 0xd000fad, 0x600029a, 0xe000d2c, 0x5000052, 0xc000f59, 0x6000314,
     206             :  // "1.d4 Nf6 2.c4 e6 3.Nc3 Bb4 4.e3 O-O"
     207             :  0x60002db, 0xd000fad, 0x600029a, 0xe000d2c, 0x5000052, 0xc000f59, 0x6000314, 0x900cf3f,
     208             :  // "1.d4 Nf6 2.c4 e6 3.Nc3 Bb4 4.Qc2"
     209             :  0x60002db, 0xd000fad, 0x600029a, 0xe000d2c, 0x5000052, 0xc000f59, 0x20000ca,
     210             :  // "1.d4 Nf6 2.c4 e6 3.Nc3 Bb4 4.Qc2 O-O"
     211             :  0x60002db, 0xd000fad, 0x600029a, 0xe000d2c, 0x5000052, 0xc000f59, 0x20000ca, 0x900cf3f,
     212             :  // "1.d4 Nf6 2.c4 e6 3.Nc3 Bb4 4.Qc2 O-O 5.a3 Bxc3+ 6.Qxc3"
     213             :  0x60002db, 0xd000fad, 0x600029a, 0xe000d2c, 0x5000052, 0xc000f59, 0x20000ca, 0x900cf3f, 0x6000210, 0x4ca00652, 0x2800292,
     214             :  // "1.d4 Nf6 2.c4 e6 3.Nc3 d5"
     215             :  0x60002db, 0xd000fad, 0x600029a, 0xe000d2c, 0x5000052, 0xe000ce3,
     216             :  // "1.d4 Nf6 2.c4 e6 3.Nf3"
     217             :  0x60002db, 0xd000fad, 0x600029a, 0xe000d2c, 0x5000195,
     218             :  // "1.d4 Nf6 2.c4 e6 3.Nf3 b6"
     219             :  0x60002db, 0xd000fad, 0x600029a, 0xe000d2c, 0x5000195, 0xe000c69,
     220             :  // "1.d4 Nf6 2.c4 e6 3.Nf3 b6 4.a3"
     221             :  0x60002db, 0xd000fad, 0x600029a, 0xe000d2c, 0x5000195, 0xe000c69, 0x6000210,
     222             :  // "1.d4 Nf6 2.c4 e6 3.Nf3 b6 4.g3"
     223             :  0x60002db, 0xd000fad, 0x600029a, 0xe000d2c, 0x5000195, 0xe000c69, 0x6000396,
     224             :  // "1.d4 Nf6 2.c4 e6 3.Nf3 b6 4.g3 Ba6"
     225             :  0x60002db, 0xd000fad, 0x600029a, 0xe000d2c, 0x5000195, 0xe000c69, 0x6000396, 0xc000ea8,
     226             :  // "1.d4 Nf6 2.c4 e6 3.Nf3 Bb4+"
     227             :  0x60002db, 0xd000fad, 0x600029a, 0xe000d2c, 0x5000195, 0x4c000f59,
     228             :  // "1.d4 Nf6 2.c4 e6 3.Nf3 d5"
     229             :  0x60002db, 0xd000fad, 0x600029a, 0xe000d2c, 0x5000195, 0xe000ce3,
     230             :  // "1.d4 Nf6 2.c4 e6 3.Nf3 d5 4.Nc3"
     231             :  0x60002db, 0xd000fad, 0x600029a, 0xe000d2c, 0x5000195, 0xe000ce3, 0x5000052,
     232             :  // "1.d4 Nf6 2.c4 g6"
     233             :  0x60002db, 0xd000fad, 0x600029a, 0xe000dae,
     234             :  // "1.d4 Nf6 2.c4 g6 3.Nc3 Bg7"
     235             :  0x60002db, 0xd000fad, 0x600029a, 0xe000dae, 0x5000052, 0xc000f76,
     236             :  // "1.d4 Nf6 2.c4 g6 3.Nc3 Bg7 4.e4"
     237             :  0x60002db, 0xd000fad, 0x600029a, 0xe000dae, 0x5000052, 0xc000f76, 0x600031c,
     238             :  // "1.d4 Nf6 2.c4 g6 3.Nc3 Bg7 4.e4 d6"
     239             :  0x60002db, 0xd000fad, 0x600029a, 0xe000dae, 0x5000052, 0xc000f76, 0x600031c, 0xe000ceb,
     240             :  // "1.d4 Nf6 2.c4 g6 3.Nc3 Bg7 4.e4 d6 5.Be2 O-O"
     241             :  0x60002db, 0xd000fad, 0x600029a, 0xe000dae, 0x5000052, 0xc000f76, 0x600031c, 0xe000ceb, 0x400014c, 0x900cf3f,
     242             :  // "1.d4 Nf6 2.c4 g6 3.Nc3 Bg7 4.e4 d6 5.Be2 O-O 6.Nf3"
     243             :  0x60002db, 0xd000fad, 0x600029a, 0xe000dae, 0x5000052, 0xc000f76, 0x600031c, 0xe000ceb, 0x400014c, 0x900cf3f, 0x5000195,
     244             :  // "1.d4 Nf6 2.c4 g6 3.Nc3 Bg7 4.e4 d6 5.f3"
     245             :  0x60002db, 0xd000fad, 0x600029a, 0xe000dae, 0x5000052, 0xc000f76, 0x600031c, 0xe000ceb, 0x6000355,
     246             :  // "1.d4 Nf6 2.c4 g6 3.Nc3 Bg7 4.e4 d6 5.f3 O-O"
     247             :  0x60002db, 0xd000fad, 0x600029a, 0xe000dae, 0x5000052, 0xc000f76, 0x600031c, 0xe000ceb, 0x6000355, 0x900cf3f,
     248             :  // "1.d4 Nf6 2.c4 g6 3.Nc3 Bg7 4.e4 d6 5.f3 O-O 6.Be3"
     249             :  0x60002db, 0xd000fad, 0x600029a, 0xe000dae, 0x5000052, 0xc000f76, 0x600031c, 0xe000ceb, 0x6000355, 0x900cf3f, 0x4000094,
     250             :  // "1.d4 Nf6 2.c4 g6 3.Nc3 Bg7 4.e4 d6 5.Nf3 O-O"
     251             :  0x60002db, 0xd000fad, 0x600029a, 0xe000dae, 0x5000052, 0xc000f76, 0x600031c, 0xe000ceb, 0x5000195, 0x900cf3f,
     252             :  // "1.d4 Nf6 2.c4 g6 3.Nc3 Bg7 4.e4 d6 5.Nf3 O-O 6.Be2"
     253             :  0x60002db, 0xd000fad, 0x600029a, 0xe000dae, 0x5000052, 0xc000f76, 0x600031c, 0xe000ceb, 0x5000195, 0x900cf3f, 0x400014c,
     254             :  // "1.d4 Nf6 2.c4 g6 3.Nc3 Bg7 4.e4 d6 5.Nf3 O-O 6.Be2 e5"
     255             :  0x60002db, 0xd000fad, 0x600029a, 0xe000dae, 0x5000052, 0xc000f76, 0x600031c, 0xe000ceb, 0x5000195, 0x900cf3f, 0x400014c, 0xe000d24,
     256             :  // "1.d4 Nf6 2.c4 g6 3.Nc3 Bg7 4.e4 d6 5.Nf3 O-O 6.Be2 e5 7.O-O"
     257             :  0x60002db, 0xd000fad, 0x600029a, 0xe000dae, 0x5000052, 0xc000f76, 0x600031c, 0xe000ceb, 0x5000195, 0x900cf3f, 0x400014c, 0xe000d24, 0x100c107,
     258             :  // "1.d4 Nf6 2.c4 g6 3.Nc3 Bg7 4.e4 d6 5.Nf3 O-O 6.Be2 e5 7.O-O Nc6 8.d5 Ne7"
     259             :  0x60002db, 0xd000fad, 0x600029a, 0xe000dae, 0x5000052, 0xc000f76, 0x600031c, 0xe000ceb, 0x5000195, 0x900cf3f, 0x400014c, 0xe000d24, 0x100c107, 0xd000e6a, 0x60006e3, 0xd000ab4,
     260             :  // "1.d4 Nf6 2.c4 g6 3.Nc3 d5"
     261             :  0x60002db, 0xd000fad, 0x600029a, 0xe000dae, 0x5000052, 0xe000ce3,
     262             :  // "1.d4 Nf6 2.c4 g6 3.Nc3 d5 4.Nf3"
     263             :  0x60002db, 0xd000fad, 0x600029a, 0xe000dae, 0x5000052, 0xe000ce3, 0x5000195,
     264             :  // "1.d4 Nf6 2.c4 g6 3.Nc3 d5 4.cxd5 Nxd5"
     265             :  0x60002db, 0xd000fad, 0x600029a, 0xe000dae, 0x5000052, 0xe000ce3, 0x6c006a3, 0xdc00b63,
     266             :  // "1.d4 Nf6 2.c4 g6 3.Nc3 d5 4.cxd5 Nxd5 5.e4 Nxc3 6.bxc3 Bg7"
     267             :  0x60002db, 0xd000fad, 0x600029a, 0xe000dae, 0x5000052, 0xe000ce3, 0x6c006a3, 0xdc00b63, 0x600031c, 0xda008d2, 0x6a00252, 0xc000f76,
     268             :  // "1.d4 Nf6 2.Nf3"
     269             :  0x60002db, 0xd000fad, 0x5000195,
     270             :  // "1.d4 Nf6 2.Nf3 c5"
     271             :  0x60002db, 0xd000fad, 0x5000195, 0xe000ca2,
     272             :  // "1.d4 Nf6 2.Nf3 d5"
     273             :  0x60002db, 0xd000fad, 0x5000195, 0xe000ce3,
     274             :  // "1.d4 Nf6 2.Nf3 e6"
     275             :  0x60002db, 0xd000fad, 0x5000195, 0xe000d2c,
     276             :  // "1.d4 Nf6 2.Nf3 e6 3.Bg5"
     277             :  0x60002db, 0xd000fad, 0x5000195, 0xe000d2c, 0x40000a6,
     278             :  // "1.d4 Nf6 2.Nf3 e6 3.c4"
     279             :  0x60002db, 0xd000fad, 0x5000195, 0xe000d2c, 0x600029a,
     280             :  // "1.d4 Nf6 2.Nf3 g6"
     281             :  0x60002db, 0xd000fad, 0x5000195, 0xe000dae,
     282             :  // "1.d4 Nf6 2.Nf3 g6 3.Bg5"
     283             :  0x60002db, 0xd000fad, 0x5000195, 0xe000dae, 0x40000a6,
     284             :  // "1.d4 Nf6 2.Nf3 g6 3.c4"
     285             :  0x60002db, 0xd000fad, 0x5000195, 0xe000dae, 0x600029a,
     286             :  // "1.d4 Nf6 2.Nf3 g6 3.c4 Bg7"
     287             :  0x60002db, 0xd000fad, 0x5000195, 0xe000dae, 0x600029a, 0xc000f76,
     288             :  // "1.d4 Nf6 2.Nf3 g6 3.c4 Bg7 4.Nc3"
     289             :  0x60002db, 0xd000fad, 0x5000195, 0xe000dae, 0x600029a, 0xc000f76, 0x5000052,
     290             :  // "1.d4 Nf6 2.Nf3 g6 3.c4 Bg7 4.Nc3 O-O"
     291             :  0x60002db, 0xd000fad, 0x5000195, 0xe000dae, 0x600029a, 0xc000f76, 0x5000052, 0x900cf3f,
     292             :  // "1.d4 Nf6 2.Nf3 g6 3.g3"
     293             :  0x60002db, 0xd000fad, 0x5000195, 0xe000dae, 0x6000396,
     294             :  // "1.d4 Nf6 2.Nf3 g6 3.g3 Bg7 4.Bg2"
     295             :  0x60002db, 0xd000fad, 0x5000195, 0xe000dae, 0x6000396, 0xc000f76, 0x400014e,
     296             :  // "1.e4"
     297             :  0x600031c,
     298             :  // "1.e4 c5"
     299             :  0x600031c, 0xe000ca2,
     300             :  // "1.e4 c5 2.c3"
     301             :  0x600031c, 0xe000ca2, 0x6000292,
     302             :  // "1.e4 c5 2.c3 d5 3.exd5 Qxd5 4.d4"
     303             :  0x600031c, 0xe000ca2, 0x6000292, 0xe000ce3, 0x6c00723, 0xac00ee3, 0x60002db,
     304             :  // "1.e4 c5 2.c3 d5 3.exd5 Qxd5 4.d4 Nf6"
     305             :  0x600031c, 0xe000ca2, 0x6000292, 0xe000ce3, 0x6c00723, 0xac00ee3, 0x60002db, 0xd000fad,
     306             :  // "1.e4 c5 2.c3 Nf6 3.e5 Nd5"
     307             :  0x600031c, 0xe000ca2, 0x6000292, 0xd000fad, 0x6000724, 0xd000b63,
     308             :  // "1.e4 c5 2.c3 Nf6 3.e5 Nd5 4.d4 cxd4"
     309             :  0x600031c, 0xe000ca2, 0x6000292, 0xd000fad, 0x6000724, 0xd000b63, 0x60002db, 0xec0089b,
     310             :  // "1.e4 c5 2.d4 cxd4"
     311             :  0x600031c, 0xe000ca2, 0x60002db, 0xec0089b,
     312             :  // "1.e4 c5 2.Nc3"
     313             :  0x600031c, 0xe000ca2, 0x5000052,
     314             :  // "1.e4 c5 2.Nc3 Nc6"
     315             :  0x600031c, 0xe000ca2, 0x5000052, 0xd000e6a,
     316             :  // "1.e4 c5 2.Nc3 Nc6 3.g3"
     317             :  0x600031c, 0xe000ca2, 0x5000052, 0xd000e6a, 0x6000396,
     318             :  // "1.e4 c5 2.Nc3 Nc6 3.g3 g6"
     319             :  0x600031c, 0xe000ca2, 0x5000052, 0xd000e6a, 0x6000396, 0xe000dae,
     320             :  // "1.e4 c5 2.Nc3 Nc6 3.g3 g6 4.Bg2 Bg7"
     321             :  0x600031c, 0xe000ca2, 0x5000052, 0xd000e6a, 0x6000396, 0xe000dae, 0x400014e, 0xc000f76,
     322             :  // "1.e4 c5 2.Nc3 Nc6 3.g3 g6 4.Bg2 Bg7 5.d3"
     323             :  0x600031c, 0xe000ca2, 0x5000052, 0xd000e6a, 0x6000396, 0xe000dae, 0x400014e, 0xc000f76, 0x60002d3,
     324             :  // "1.e4 c5 2.Nf3"
     325             :  0x600031c, 0xe000ca2, 0x5000195,
     326             :  // "1.e4 c5 2.Nf3 d6"
     327             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000ceb,
     328             :  // "1.e4 c5 2.Nf3 d6 3.Bb5+"
     329             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000ceb, 0x44000161,
     330             :  // "1.e4 c5 2.Nf3 d6 3.d4"
     331             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000ceb, 0x60002db,
     332             :  // "1.e4 c5 2.Nf3 d6 3.d4 cxd4"
     333             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000ceb, 0x60002db, 0xec0089b,
     334             :  // "1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4"
     335             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000ceb, 0x60002db, 0xec0089b, 0x5c0055b,
     336             :  // "1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6"
     337             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000ceb, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad,
     338             :  // "1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3"
     339             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000ceb, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052,
     340             :  // "1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 a6"
     341             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000ceb, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052, 0xe000c28,
     342             :  // "1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 a6 6.Bc4"
     343             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000ceb, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052, 0xe000c28, 0x400015a,
     344             :  // "1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 a6 6.Be2"
     345             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000ceb, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052, 0xe000c28, 0x400014c,
     346             :  // "1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 a6 6.Be3"
     347             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000ceb, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052, 0xe000c28, 0x4000094,
     348             :  // "1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 a6 6.Bg5"
     349             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000ceb, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052, 0xe000c28, 0x40000a6,
     350             :  // "1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 a6 6.Bg5 e6"
     351             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000ceb, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052, 0xe000c28, 0x40000a6, 0xe000d2c,
     352             :  // "1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 g6"
     353             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000ceb, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052, 0xe000dae,
     354             :  // "1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 g6 6.Be3 Bg7 7.f3"
     355             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000ceb, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052, 0xe000dae, 0x4000094, 0xc000f76, 0x6000355,
     356             :  // "1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 g6 6.Be3 Bg7 7.f3 O-O"
     357             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000ceb, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052, 0xe000dae, 0x4000094, 0xc000f76, 0x6000355, 0x900cf3f,
     358             :  // "1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 Nc6"
     359             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000ceb, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052, 0xd000e6a,
     360             :  // "1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 Nc6 6.Bg5"
     361             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000ceb, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052, 0xd000e6a, 0x40000a6,
     362             :  // "1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 Nc6 6.Bg5 e6 7.Qd2"
     363             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000ceb, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052, 0xd000e6a, 0x40000a6, 0xe000d2c, 0x20000cb,
     364             :  // "1.e4 c5 2.Nf3 e6"
     365             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000d2c,
     366             :  // "1.e4 c5 2.Nf3 e6 3.d3"
     367             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000d2c, 0x60002d3,
     368             :  // "1.e4 c5 2.Nf3 e6 3.d4 cxd4 4.Nxd4"
     369             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000d2c, 0x60002db, 0xec0089b, 0x5c0055b,
     370             :  // "1.e4 c5 2.Nf3 e6 3.d4 cxd4 4.Nxd4 a6"
     371             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000d2c, 0x60002db, 0xec0089b, 0x5c0055b, 0xe000c28,
     372             :  // "1.e4 c5 2.Nf3 e6 3.d4 cxd4 4.Nxd4 a6 5.Bd3"
     373             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000d2c, 0x60002db, 0xec0089b, 0x5c0055b, 0xe000c28, 0x4000153,
     374             :  // "1.e4 c5 2.Nf3 e6 3.d4 cxd4 4.Nxd4 Nc6"
     375             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000d2c, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000e6a,
     376             :  // "1.e4 c5 2.Nf3 e6 3.d4 cxd4 4.Nxd4 Nc6 5.Nc3"
     377             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000d2c, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000e6a, 0x5000052,
     378             :  // "1.e4 c5 2.Nf3 e6 3.d4 cxd4 4.Nxd4 Nc6 5.Nc3 Qc7"
     379             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000d2c, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000e6a, 0x5000052, 0xa000ef2,
     380             :  // "1.e4 c5 2.Nf3 e6 3.d4 cxd4 4.Nxd4 Nf6"
     381             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000d2c, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad,
     382             :  // "1.e4 c5 2.Nf3 e6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3"
     383             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000d2c, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052,
     384             :  // "1.e4 c5 2.Nf3 e6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 d6"
     385             :  0x600031c, 0xe000ca2, 0x5000195, 0xe000d2c, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052, 0xe000ceb,
     386             :  // "1.e4 c5 2.Nf3 Nc6"
     387             :  0x600031c, 0xe000ca2, 0x5000195, 0xd000e6a,
     388             :  // "1.e4 c5 2.Nf3 Nc6 3.Bb5"
     389             :  0x600031c, 0xe000ca2, 0x5000195, 0xd000e6a, 0x4000161,
     390             :  // "1.e4 c5 2.Nf3 Nc6 3.Bb5 g6"
     391             :  0x600031c, 0xe000ca2, 0x5000195, 0xd000e6a, 0x4000161, 0xe000dae,
     392             :  // "1.e4 c5 2.Nf3 Nc6 3.d4 cxd4 4.Nxd4"
     393             :  0x600031c, 0xe000ca2, 0x5000195, 0xd000e6a, 0x60002db, 0xec0089b, 0x5c0055b,
     394             :  // "1.e4 c5 2.Nf3 Nc6 3.d4 cxd4 4.Nxd4 e5"
     395             :  0x600031c, 0xe000ca2, 0x5000195, 0xd000e6a, 0x60002db, 0xec0089b, 0x5c0055b, 0xe000d24,
     396             :  // "1.e4 c5 2.Nf3 Nc6 3.d4 cxd4 4.Nxd4 g6"
     397             :  0x600031c, 0xe000ca2, 0x5000195, 0xd000e6a, 0x60002db, 0xec0089b, 0x5c0055b, 0xe000dae,
     398             :  // "1.e4 c5 2.Nf3 Nc6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3"
     399             :  0x600031c, 0xe000ca2, 0x5000195, 0xd000e6a, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052,
     400             :  // "1.e4 c5 2.Nf3 Nc6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 d6"
     401             :  0x600031c, 0xe000ca2, 0x5000195, 0xd000e6a, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052, 0xe000ceb,
     402             :  // "1.e4 c5 2.Nf3 Nc6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 d6 6.Bg5"
     403             :  0x600031c, 0xe000ca2, 0x5000195, 0xd000e6a, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052, 0xe000ceb, 0x40000a6,
     404             :  // "1.e4 c5 2.Nf3 Nc6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 e5"
     405             :  0x600031c, 0xe000ca2, 0x5000195, 0xd000e6a, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052, 0xe000d24,
     406             :  // "1.e4 c5 2.Nf3 Nc6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 e5 6.Ndb5 d6"
     407             :  0x600031c, 0xe000ca2, 0x5000195, 0xd000e6a, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052, 0xe000d24, 0x150006e1, 0xe000ceb,
     408             :  // "1.e4 c5 2.Nf3 Nc6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 e5 6.Ndb5 d6 7.Bg5 a6"
     409             :  0x600031c, 0xe000ca2, 0x5000195, 0xd000e6a, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052, 0xe000d24, 0x150006e1, 0xe000ceb, 0x40000a6, 0xe000c28,
     410             :  // "1.e4 c5 2.Nf3 Nc6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 e5 6.Ndb5 d6 7.Bg5 a6 8.Na3 b5"
     411             :  0x600031c, 0xe000ca2, 0x5000195, 0xd000e6a, 0x60002db, 0xec0089b, 0x5c0055b, 0xd000fad, 0x5000052, 0xe000d24, 0x150006e1, 0xe000ceb, 0x40000a6, 0xe000c28, 0x5000850, 0xe000c61,
     412             :  // "1.e4 c6"
     413             :  0x600031c, 0xe000caa,
     414             :  // "1.e4 c6 2.d4 d5"
     415             :  0x600031c, 0xe000caa, 0x60002db, 0xe000ce3,
     416             :  // "1.e4 c6 2.d4 d5 3.e5"
     417             :  0x600031c, 0xe000caa, 0x60002db, 0xe000ce3, 0x6000724,
     418             :  // "1.e4 c6 2.d4 d5 3.e5 Bf5"
     419             :  0x600031c, 0xe000caa, 0x60002db, 0xe000ce3, 0x6000724, 0xc000ea5,
     420             :  // "1.e4 c6 2.d4 d5 3.exd5 cxd5"
     421             :  0x600031c, 0xe000caa, 0x60002db, 0xe000ce3, 0x6c00723, 0xec00aa3,
     422             :  // "1.e4 c6 2.d4 d5 3.exd5 cxd5 4.c4 Nf6 5.Nc3"
     423             :  0x600031c, 0xe000caa, 0x60002db, 0xe000ce3, 0x6c00723, 0xec00aa3, 0x600029a, 0xd000fad, 0x5000052,
     424             :  // "1.e4 c6 2.d4 d5 3.Nc3"
     425             :  0x600031c, 0xe000caa, 0x60002db, 0xe000ce3, 0x5000052,
     426             :  // "1.e4 c6 2.d4 d5 3.Nc3 dxe4 4.Nxe4"
     427             :  0x600031c, 0xe000caa, 0x60002db, 0xe000ce3, 0x5000052, 0xec008dc, 0x5c0049c,
     428             :  // "1.e4 c6 2.d4 d5 3.Nd2 dxe4 4.Nxe4"
     429             :  0x600031c, 0xe000caa, 0x60002db, 0xe000ce3, 0x500004b, 0xec008dc, 0x5c002dc,
     430             :  // "1.e4 d5 2.exd5 Nf6"
     431             :  0x600031c, 0xe000ce3, 0x6c00723, 0xd000fad,
     432             :  // "1.e4 d5 2.exd5 Qxd5"
     433             :  0x600031c, 0xe000ce3, 0x6c00723, 0xac00ee3,
     434             :  // "1.e4 d5 2.exd5 Qxd5 3.Nc3"
     435             :  0x600031c, 0xe000ce3, 0x6c00723, 0xac00ee3, 0x5000052,
     436             :  // "1.e4 d5 2.exd5 Qxd5 3.Nc3 Qa5"
     437             :  0x600031c, 0xe000ce3, 0x6c00723, 0xac00ee3, 0x5000052, 0xa0008e0,
     438             :  // "1.e4 d6"
     439             :  0x600031c, 0xe000ceb,
     440             :  // "1.e4 d6 2.d4"
     441             :  0x600031c, 0xe000ceb, 0x60002db,
     442             :  // "1.e4 d6 2.d4 Nf6"
     443             :  0x600031c, 0xe000ceb, 0x60002db, 0xd000fad,
     444             :  // "1.e4 d6 2.d4 Nf6 3.Nc3"
     445             :  0x600031c, 0xe000ceb, 0x60002db, 0xd000fad, 0x5000052,
     446             :  // "1.e4 d6 2.d4 Nf6 3.Nc3 g6"
     447             :  0x600031c, 0xe000ceb, 0x60002db, 0xd000fad, 0x5000052, 0xe000dae,
     448             :  // "1.e4 d6 2.d4 Nf6 3.Nc3 g6 4.f4 Bg7 5.Nf3"
     449             :  0x600031c, 0xe000ceb, 0x60002db, 0xd000fad, 0x5000052, 0xe000dae, 0x600035d, 0xc000f76, 0x5000195,
     450             :  // "1.e4 d6 2.d4 Nf6 3.Nc3 g6 4.Nf3 Bg7"
     451             :  0x600031c, 0xe000ceb, 0x60002db, 0xd000fad, 0x5000052, 0xe000dae, 0x5000195, 0xc000f76,
     452             :  // "1.e4 e5"
     453             :  0x600031c, 0xe000d24,
     454             :  // "1.e4 e5 2.f4"
     455             :  0x600031c, 0xe000d24, 0x600035d,
     456             :  // "1.e4 e5 2.Nc3"
     457             :  0x600031c, 0xe000d24, 0x5000052,
     458             :  // "1.e4 e5 2.Nf3"
     459             :  0x600031c, 0xe000d24, 0x5000195,
     460             :  // "1.e4 e5 2.Nf3 Nc6"
     461             :  0x600031c, 0xe000d24, 0x5000195, 0xd000e6a,
     462             :  // "1.e4 e5 2.Nf3 Nc6 3.Bb5"
     463             :  0x600031c, 0xe000d24, 0x5000195, 0xd000e6a, 0x4000161,
     464             :  // "1.e4 e5 2.Nf3 Nc6 3.Bb5 a6"
     465             :  0x600031c, 0xe000d24, 0x5000195, 0xd000e6a, 0x4000161, 0xe000c28,
     466             :  // "1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4"
     467             :  0x600031c, 0xe000d24, 0x5000195, 0xd000e6a, 0x4000161, 0xe000c28, 0x4000858,
     468             :  // "1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6"
     469             :  0x600031c, 0xe000d24, 0x5000195, 0xd000e6a, 0x4000161, 0xe000c28, 0x4000858, 0xd000fad,
     470             :  // "1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.O-O"
     471             :  0x600031c, 0xe000d24, 0x5000195, 0xd000e6a, 0x4000161, 0xe000c28, 0x4000858, 0xd000fad, 0x100c107,
     472             :  // "1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.O-O b5 6.Bb3"
     473             :  0x600031c, 0xe000d24, 0x5000195, 0xd000e6a, 0x4000161, 0xe000c28, 0x4000858, 0xd000fad, 0x100c107, 0xe000c61, 0x4000611,
     474             :  // "1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.O-O Be7"
     475             :  0x600031c, 0xe000d24, 0x5000195, 0xd000e6a, 0x4000161, 0xe000c28, 0x4000858, 0xd000fad, 0x100c107, 0xc000f74,
     476             :  // "1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.O-O Be7 6.Re1 b5 7.Bb3 d6"
     477             :  0x600031c, 0xe000d24, 0x5000195, 0xd000e6a, 0x4000161, 0xe000c28, 0x4000858, 0xd000fad, 0x100c107, 0xc000f74, 0x3000144, 0xe000c61, 0x4000611, 0xe000ceb,
     478             :  // "1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.O-O Be7 6.Re1 b5 7.Bb3 d6 8.c3 O-O"
     479             :  0x600031c, 0xe000d24, 0x5000195, 0xd000e6a, 0x4000161, 0xe000c28, 0x4000858, 0xd000fad, 0x100c107, 0xc000f74, 0x3000144, 0xe000c61, 0x4000611, 0xe000ceb, 0x6000292, 0x900cf3f,
     480             :  // "1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.O-O Be7 6.Re1 b5 7.Bb3 d6 8.c3 O-O 9.h3"
     481             :  0x600031c, 0xe000d24, 0x5000195, 0xd000e6a, 0x4000161, 0xe000c28, 0x4000858, 0xd000fad, 0x100c107, 0xc000f74, 0x3000144, 0xe000c61, 0x4000611, 0xe000ceb, 0x6000292, 0x900cf3f, 0x60003d7,
     482             :  // "1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.O-O Be7 6.Re1 b5 7.Bb3 d6 8.c3 O-O 9.h3 Na5 10.Bc2 c5 11.d4"
     483             :  0x600031c, 0xe000d24, 0x5000195, 0xd000e6a, 0x4000161, 0xe000c28, 0x4000858, 0xd000fad, 0x100c107, 0xc000f74, 0x3000144, 0xe000c61, 0x4000611, 0xe000ceb, 0x6000292, 0x900cf3f, 0x60003d7, 0xd000aa0, 0x400044a, 0xe000ca2, 0x60002db,
     484             :  // "1.e4 e5 2.Nf3 Nc6 3.Bb5 a6 4.Ba4 Nf6 5.O-O Be7 6.Re1 b5 7.Bb3 O-O"
     485             :  0x600031c, 0xe000d24, 0x5000195, 0xd000e6a, 0x4000161, 0xe000c28, 0x4000858, 0xd000fad, 0x100c107, 0xc000f74, 0x3000144, 0xe000c61, 0x4000611, 0x900cf3f,
     486             :  // "1.e4 e5 2.Nf3 Nc6 3.Bb5 Nf6"
     487             :  0x600031c, 0xe000d24, 0x5000195, 0xd000e6a, 0x4000161, 0xd000fad,
     488             :  // "1.e4 e5 2.Nf3 Nc6 3.Bc4"
     489             :  0x600031c, 0xe000d24, 0x5000195, 0xd000e6a, 0x400015a,
     490             :  // "1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6"
     491             :  0x600031c, 0xe000d24, 0x5000195, 0xd000e6a, 0x400015a, 0xd000fad,
     492             :  // "1.e4 e5 2.Nf3 Nc6 3.d4 exd4"
     493             :  0x600031c, 0xe000d24, 0x5000195, 0xd000e6a, 0x60002db, 0xec0091b,
     494             :  // "1.e4 e5 2.Nf3 Nc6 3.d4 exd4 4.Nxd4"
     495             :  0x600031c, 0xe000d24, 0x5000195, 0xd000e6a, 0x60002db, 0xec0091b, 0x5c0055b,
     496             :  // "1.e4 e5 2.Nf3 Nc6 3.Nc3"
     497             :  0x600031c, 0xe000d24, 0x5000195, 0xd000e6a, 0x5000052,
     498             :  // "1.e4 e5 2.Nf3 Nc6 3.Nc3 Nf6"
     499             :  0x600031c, 0xe000d24, 0x5000195, 0xd000e6a, 0x5000052, 0xd000fad,
     500             :  // "1.e4 e5 2.Nf3 Nf6"
     501             :  0x600031c, 0xe000d24, 0x5000195, 0xd000fad,
     502             :  // "1.e4 e5 2.Nf3 Nf6 3.Nxe5 d6"
     503             :  0x600031c, 0xe000d24, 0x5000195, 0xd000fad, 0x5c00564, 0xe000ceb,
     504             :  // "1.e4 e6"
     505             :  0x600031c, 0xe000d2c,
     506             :  // "1.e4 e6 2.d3"
     507             :  0x600031c, 0xe000d2c, 0x60002d3,
     508             :  // "1.e4 e6 2.d4"
     509             :  0x600031c, 0xe000d2c, 0x60002db,
     510             :  // "1.e4 e6 2.d4 d5"
     511             :  0x600031c, 0xe000d2c, 0x60002db, 0xe000ce3,
     512             :  // "1.e4 e6 2.d4 d5 3.e5 c5"
     513             :  0x600031c, 0xe000d2c, 0x60002db, 0xe000ce3, 0x6000724, 0xe000ca2,
     514             :  // "1.e4 e6 2.d4 d5 3.e5 c5 4.c3"
     515             :  0x600031c, 0xe000d2c, 0x60002db, 0xe000ce3, 0x6000724, 0xe000ca2, 0x6000292,
     516             :  // "1.e4 e6 2.d4 d5 3.Nc3"
     517             :  0x600031c, 0xe000d2c, 0x60002db, 0xe000ce3, 0x5000052,
     518             :  // "1.e4 e6 2.d4 d5 3.Nc3 Bb4"
     519             :  0x600031c, 0xe000d2c, 0x60002db, 0xe000ce3, 0x5000052, 0xc000f59,
     520             :  // "1.e4 e6 2.d4 d5 3.Nc3 Bb4 4.e5"
     521             :  0x600031c, 0xe000d2c, 0x60002db, 0xe000ce3, 0x5000052, 0xc000f59, 0x6000724,
     522             :  // "1.e4 e6 2.d4 d5 3.Nc3 Bb4 4.e5 c5"
     523             :  0x600031c, 0xe000d2c, 0x60002db, 0xe000ce3, 0x5000052, 0xc000f59, 0x6000724, 0xe000ca2,
     524             :  // "1.e4 e6 2.d4 d5 3.Nc3 Bb4 4.e5 c5 5.a3 Bxc3+ 6.bxc3"
     525             :  0x600031c, 0xe000d2c, 0x60002db, 0xe000ce3, 0x5000052, 0xc000f59, 0x6000724, 0xe000ca2, 0x6000210, 0x4ca00652, 0x6800252,
     526             :  // "1.e4 e6 2.d4 d5 3.Nc3 Nf6"
     527             :  0x600031c, 0xe000d2c, 0x60002db, 0xe000ce3, 0x5000052, 0xd000fad,
     528             :  // "1.e4 e6 2.d4 d5 3.Nc3 Nf6 4.Bg5"
     529             :  0x600031c, 0xe000d2c, 0x60002db, 0xe000ce3, 0x5000052, 0xd000fad, 0x40000a6,
     530             :  // "1.e4 e6 2.d4 d5 3.Nd2"
     531             :  0x600031c, 0xe000d2c, 0x60002db, 0xe000ce3, 0x500004b,
     532             :  // "1.e4 e6 2.d4 d5 3.Nd2 c5"
     533             :  0x600031c, 0xe000d2c, 0x60002db, 0xe000ce3, 0x500004b, 0xe000ca2,
     534             :  // "1.e4 e6 2.d4 d5 3.Nd2 Nf6"
     535             :  0x600031c, 0xe000d2c, 0x60002db, 0xe000ce3, 0x500004b, 0xd000fad,
     536             :  // "1.e4 e6 2.d4 d5 3.Nd2 Nf6 4.e5 Nfd7"
     537             :  0x600031c, 0xe000d2c, 0x60002db, 0xe000ce3, 0x500004b, 0xd000fad, 0x6000724, 0x1d000b73,
     538             :  // "1.e4 e6 2.d4 d5 3.Nd2 Nf6 4.e5 Nfd7 5.Bd3 c5 6.c3 Nc6 7.Ne2"
     539             :  0x600031c, 0xe000d2c, 0x60002db, 0xe000ce3, 0x500004b, 0xd000fad, 0x6000724, 0x1d000b73, 0x4000153, 0xe000ca2, 0x6000292, 0xd000e6a, 0x500018c,
     540             :  // "1.e4 g6"
     541             :  0x600031c, 0xe000dae,
     542             :  // "1.e4 g6 2.d4"
     543             :  0x600031c, 0xe000dae, 0x60002db,
     544             :  // "1.e4 g6 2.d4 Bg7"
     545             :  0x600031c, 0xe000dae, 0x60002db, 0xc000f76,
     546             :  // "1.e4 g6 2.d4 Bg7 3.Nc3"
     547             :  0x600031c, 0xe000dae, 0x60002db, 0xc000f76, 0x5000052,
     548             :  // "1.e4 g6 2.d4 Bg7 3.Nc3 d6"
     549             :  0x600031c, 0xe000dae, 0x60002db, 0xc000f76, 0x5000052, 0xe000ceb,
     550             :  // "1.e4 Nf6"
     551             :  0x600031c, 0xd000fad,
     552             :  // "1.e4 Nf6 2.e5 Nd5"
     553             :  0x600031c, 0xd000fad, 0x6000724, 0xd000b63,
     554             :  // "1.e4 Nf6 2.e5 Nd5 3.d4 d6"
     555             :  0x600031c, 0xd000fad, 0x6000724, 0xd000b63, 0x60002db, 0xe000ceb,
     556             :  // "1.e4 Nf6 2.e5 Nd5 3.d4 d6 4.Nf3"
     557             :  0x600031c, 0xd000fad, 0x6000724, 0xd000b63, 0x60002db, 0xe000ceb, 0x5000195,
     558             :  // "1.f4"
     559             :  0x600035d,
     560             :  // "1.g3"
     561             :  0x6000396,
     562             :  // "1.Nf3"
     563             :  0x5000195,
     564             :  // "1.Nf3 c5"
     565             :  0x5000195, 0xe000ca2,
     566             :  // "1.Nf3 c5 2.c4"
     567             :  0x5000195, 0xe000ca2, 0x600029a,
     568             :  // "1.Nf3 d5"
     569             :  0x5000195, 0xe000ce3,
     570             :  // "1.Nf3 d5 2.c4"
     571             :  0x5000195, 0xe000ce3, 0x600029a,
     572             :  // "1.Nf3 d5 2.d4"
     573             :  0x5000195, 0xe000ce3, 0x60002db,
     574             :  // "1.Nf3 d5 2.g3"
     575             :  0x5000195, 0xe000ce3, 0x6000396,
     576             :  // "1.Nf3 g6"
     577             :  0x5000195, 0xe000dae,
     578             :  // "1.Nf3 Nf6"
     579             :  0x5000195, 0xd000fad,
     580             :  // "1.Nf3 Nf6 2.c4"
     581             :  0x5000195, 0xd000fad, 0x600029a,
     582             :  // "1.Nf3 Nf6 2.c4 c5"
     583             :  0x5000195, 0xd000fad, 0x600029a, 0xe000ca2,
     584             :  // "1.Nf3 Nf6 2.c4 e6"
     585             :  0x5000195, 0xd000fad, 0x600029a, 0xe000d2c,
     586             :  // "1.Nf3 Nf6 2.c4 g6"
     587             :  0x5000195, 0xd000fad, 0x600029a, 0xe000dae,
     588             :  // "1.Nf3 Nf6 2.c4 g6 3.Nc3"
     589             :  0x5000195, 0xd000fad, 0x600029a, 0xe000dae, 0x5000052,
     590             :  // "1.Nf3 Nf6 2.g3"
     591             :  0x5000195, 0xd000fad, 0x6000396,
     592             :  // "1.Nf3 Nf6 2.g3 g6"
     593             :  0x5000195, 0xd000fad, 0x6000396, 0xe000dae
     594        1560 : };
     595             : } // End of anonymous namespace
     596             : 
     597             : const FullMove* StoredLine::Moves_ [STORED_LINES +1] = {
     598             : // index zero is unused
     599             : // last index ( Moves_[STORED_LINES] ) is used to detect the end of the array
     600             : fm +   0, fm +   0, fm +   1, fm +   2, fm +   4, fm +   7, fm +   9, fm +  12,
     601             : fm +  16, fm +  18, fm +  21, fm +  23, fm +  25, fm +  28, fm +  32, fm +  36,
     602             : fm +  37, fm +  39, fm +  42, fm +  46, fm +  51, fm +  57, fm +  64, fm +  69,
     603             : fm +  75, fm +  82, fm +  90, fm +  94, fm +  99, fm + 105, fm + 109, fm + 114,
     604             : fm + 120, fm + 126, fm + 131, fm + 134, fm + 138, fm + 143, fm + 149, fm + 155,
     605             : fm + 157, fm + 160, fm + 162, fm + 165, fm + 169, fm + 171, fm + 176, fm + 178,
     606             : fm + 182, fm + 184, fm + 187, fm + 191, fm + 194, fm + 198, fm + 203, fm + 209,
     607             : fm + 217, fm + 222, fm + 228, fm + 233, fm + 239, fm + 246, fm + 254, fm + 261,
     608             : fm + 269, fm + 280, fm + 286, fm + 291, fm + 297, fm + 304, fm + 311, fm + 319,
     609             : fm + 325, fm + 331, fm + 338, fm + 342, fm + 348, fm + 355, fm + 363, fm + 373,
     610             : fm + 384, fm + 393, fm + 403, fm + 414, fm + 424, fm + 435, fm + 447, fm + 460,
     611             : fm + 476, fm + 482, fm + 489, fm + 497, fm + 509, fm + 512, fm + 516, fm + 520,
     612             : fm + 524, fm + 529, fm + 534, fm + 538, fm + 543, fm + 548, fm + 554, fm + 561,
     613             : fm + 569, fm + 574, fm + 581, fm + 582, fm + 584, fm + 587, fm + 594, fm + 602,
     614             : fm + 608, fm + 616, fm + 620, fm + 623, fm + 627, fm + 632, fm + 638, fm + 646,
     615             : fm + 655, fm + 658, fm + 662, fm + 667, fm + 672, fm + 678, fm + 685, fm + 693,
     616             : fm + 702, fm + 712, fm + 723, fm + 734, fm + 745, fm + 756, fm + 768, fm + 778,
     617             : fm + 791, fm + 805, fm + 815, fm + 826, fm + 839, fm + 843, fm + 848, fm + 855,
     618             : fm + 863, fm + 872, fm + 880, fm + 889, fm + 899, fm + 907, fm + 916, fm + 926,
     619             : fm + 930, fm + 935, fm + 941, fm + 948, fm + 956, fm + 964, fm + 973, fm + 983,
     620             : fm + 994, fm +1004, fm +1016, fm +1030, fm +1046, fm +1048, fm +1052, fm +1057,
     621             : fm +1063, fm +1069, fm +1078, fm +1083, fm +1090, fm +1097, fm +1101, fm +1105,
     622             : fm +1110, fm +1116, fm +1118, fm +1121, fm +1125, fm +1130, fm +1136, fm +1145,
     623             : fm +1153, fm +1155, fm +1158, fm +1161, fm +1164, fm +1168, fm +1173, fm +1179,
     624             : fm +1186, fm +1194, fm +1203, fm +1214, fm +1224, fm +1238, fm +1254, fm +1271,
     625             : fm +1292, fm +1306, fm +1312, fm +1317, fm +1323, fm +1329, fm +1336, fm +1341,
     626             : fm +1347, fm +1351, fm +1357, fm +1359, fm +1362, fm +1365, fm +1369, fm +1375,
     627             : fm +1382, fm +1387, fm +1393, fm +1400, fm +1408, fm +1419, fm +1425, fm +1432,
     628             : fm +1437, fm +1443, fm +1449, fm +1457, fm +1470, fm +1472, fm +1475, fm +1479,
     629             : fm +1484, fm +1490, fm +1492, fm +1496, fm +1502, fm +1509, fm +1510, fm +1511,
     630             : fm +1512, fm +1514, fm +1517, fm +1519, fm +1522, fm +1525, fm +1528, fm +1530,
     631             : fm +1532, fm +1535, fm +1539, fm +1543, fm +1547, fm +1552, fm +1555, fm +1559
     632             : };
     633             : 
     634           0 : StoredLine::StoredLine(const pieceT* board, colorT toMove)
     635             : {
     636             :         Board search(board);
     637           0 :         for (uint line = 1; line < STORED_LINES; line++) {
     638           0 :                 Board b(START_BOARD);
     639           0 :                 const FullMove* end = Moves_[line +1];
     640           0 :                 for (int ply=0; ply < 99; ply++) {
     641           0 :                         if (((ply %2) == toMove) && b == search) {
     642           0 :                                 matches_[line] = ply;
     643           0 :                                 break;
     644             :                         }
     645           0 :                         const FullMove* m = Moves_[line] + ply;
     646           0 :                         if (m == end) {
     647           0 :                                 matches_[line] = b.neverMatch(search) ? -2 : -1;
     648           0 :                                 break;
     649             :                         }
     650           0 :                         b.doMove(*m);
     651             :                 }
     652             :         }
     653           3 : }
     654             : 

Generated by: LCOV version 1.12