X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=cc2a06134d6cf15ce939c7af175a906c9af8c236;hp=16c46c9104fed8f75e10835959fd866a216c5cf7;hb=c1b60269a26b2ba1c8882b8f382f0e3e435c1962;hpb=e1ed67aacbe7fb4b462b9141d3137bed0a3ea70b diff --git a/src/search.cpp b/src/search.cpp index 16c46c91..cc2a0613 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -207,6 +207,9 @@ namespace { // Search depth at iteration 1 const Depth InitialDepth = OnePly /*+ OnePly/2*/; + // History tables + History H; + // Node counters int NodesSincePoll; int NodesBetweenPolls = 30000; @@ -330,8 +333,6 @@ int ActiveThreads = 1; // but it could turn out to be useful for debugging. Lock IOLock; -History H; // Should be made local? - // SearchStack::init() initializes a search stack. Used at the beginning of a // new search from the root. @@ -1056,7 +1057,7 @@ namespace { // Initialize a MovePicker object for the current position, and prepare // to search all moves - MovePicker mp = MovePicker(pos, true, ttMove, depth, &ss[ply]); + MovePicker mp = MovePicker(pos, true, ttMove, depth, H, &ss[ply]); Move move, movesSearched[256]; int moveCount = 0; @@ -1317,7 +1318,7 @@ namespace { // Initialize a MovePicker object for the current position, and prepare // to search all moves: - MovePicker mp = MovePicker(pos, false, ttMove, depth, &ss[ply]); + MovePicker mp = MovePicker(pos, false, ttMove, depth, H, &ss[ply]); Move move, movesSearched[256]; int moveCount = 0; @@ -1538,7 +1539,7 @@ namespace { // Initialize a MovePicker object for the current position, and prepare // to search the moves. Because the depth is <= 0 here, only captures, // queen promotions and checks (only if depth == 0) will be generated. - MovePicker mp = MovePicker(pos, pvNode, ttMove, depth); + MovePicker mp = MovePicker(pos, pvNode, ttMove, depth, H); Move move; int moveCount = 0; Bitboard dcCandidates = mp.discovered_check_candidates();