X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=1ae6b892c8d4d245b18f4fb9d730c799a8d01d4a;hb=bb7713c8e92c9373f0294a4317101cccda0e17e5;hp=0318d63138ea41dd9913808c221e2540d617f8b0;hpb=ca9d40c1455ee721d84b234f60afcdc5a2e5b0fa;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 0318d631..1ae6b892 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -318,8 +318,8 @@ void init_search() { } -/// perft() is our utility to verify move generation. All the legal moves up to -/// given depth are generated and counted and the sum returned. +/// perft() is our utility to verify move generation. All the leaf nodes up to +/// the given depth are generated and counted and the sum returned. int64_t perft(Position& pos, Depth depth) { @@ -736,7 +736,7 @@ namespace { excludedMove = ss->excludedMove; posKey = excludedMove ? pos.get_exclusion_key() : pos.get_key(); - tte = TT.retrieve(posKey); + tte = TT.probe(posKey); ttMove = tte ? tte->move() : MOVE_NONE; // At PV nodes we check for exact scores, while at non-PV nodes we check for @@ -872,7 +872,7 @@ namespace { ss->skipNullMove = false; ttMove = ss->bestMove; - tte = TT.retrieve(posKey); + tte = TT.probe(posKey); } split_point_start: // At split points actual search starts from here @@ -1277,7 +1277,7 @@ split_point_start: // At split points actual search starts from here // Transposition table lookup. At PV nodes, we don't use the TT for // pruning, but only for move ordering. - tte = TT.retrieve(pos.get_key()); + tte = TT.probe(pos.get_key()); ttMove = (tte ? tte->move() : MOVE_NONE); if (!PvNode && tte && ok_to_use_TT(tte, ttDepth, beta, ss->ply)) @@ -1987,7 +1987,7 @@ split_point_start: // At split points actual search starts from here pos.do_move(pv[0], *st++); - while ( (tte = TT.retrieve(pos.get_key())) != NULL + while ( (tte = TT.probe(pos.get_key())) != NULL && tte->move() != MOVE_NONE && pos.move_is_legal(tte->move()) && ply < PLY_MAX @@ -2017,7 +2017,7 @@ split_point_start: // At split points actual search starts from here do { k = pos.get_key(); - tte = TT.retrieve(k); + tte = TT.probe(k); // Don't overwrite existing correct entries if (!tte || tte->move() != pv[ply])