X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=45f50a6353c649b1eb80eb1ca6b082a509fbfdde;hb=d8f683760c9eb6d2c4714ec83e717dd2143de55c;hp=c54c1269089ed9237558f4adb18595573235b4ea;hpb=e0504ab876a997321102f040ab88203cb893db12;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index c54c1269..45f50a63 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -2,7 +2,7 @@ Stockfish, a UCI chess playing engine derived from Glaurung 2.1 Copyright (C) 2004-2008 Tord Romstad (Glaurung author) Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad - Copyright (C) 2015-2016 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad + Copyright (C) 2015-2017 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -212,7 +212,7 @@ void Search::clear() { for (Thread* th : Threads) { th->counterMoves.clear(); - th->fromTo.clear(); + th->history.clear(); th->counterMoveHistory.clear(); th->resetCalls = true; } @@ -985,7 +985,7 @@ moves_loop: // When in check search starts from here ss->history = (cmh ? (*cmh )[moved_piece][to_sq(move)] : VALUE_ZERO) + (fmh ? (*fmh )[moved_piece][to_sq(move)] : VALUE_ZERO) + (fmh2 ? (*fmh2)[moved_piece][to_sq(move)] : VALUE_ZERO) - + thisThread->fromTo.get(~pos.side_to_move(), move) + + thisThread->history.get(~pos.side_to_move(), move) - 8000; // Correction factor // Decrease/increase reduction by comparing opponent's stat score @@ -1415,7 +1415,7 @@ moves_loop: // When in check search starts from here Color c = pos.side_to_move(); Thread* thisThread = pos.this_thread(); - thisThread->fromTo.update(c, move, bonus); + thisThread->history.update(c, move, bonus); update_cm_stats(ss, pos.moved_piece(move), to_sq(move), bonus); if ((ss-1)->counterMoves) @@ -1427,7 +1427,7 @@ moves_loop: // When in check search starts from here // Decrease all the other played quiet moves for (int i = 0; i < quietsCnt; ++i) { - thisThread->fromTo.update(c, quiets[i], -bonus); + thisThread->history.update(c, quiets[i], -bonus); update_cm_stats(ss, pos.moved_piece(quiets[i]), to_sq(quiets[i]), -bonus); } }