X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.h;h=c19141820e3397804580a06fbc8b02df12e5e7a0;hp=6c8d9e10e3d9e05453d34424f123c47103b56b35;hb=352bd6f5aa348e15909f50266fc5bdc003df35bf;hpb=34e47ca87d82a420043f2bc9a1960eb1fad5c4f4 diff --git a/src/movepick.h b/src/movepick.h index 6c8d9e10..c1914182 100644 --- a/src/movepick.h +++ b/src/movepick.h @@ -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 @@ -39,9 +39,6 @@ struct HistoryStats { void clear() { std::memset(table, 0, sizeof(table)); } void update(Color c, Move m, Value v) { - if (abs(int(v)) >= 324) - return; - Square from = from_sq(m); Square to = to_sq(m); @@ -60,7 +57,7 @@ private: /// Entries are stored using only the moving piece and destination square, hence /// two moves with different origin but same destination and piece will be /// considered identical. -template +template struct Stats { const T* operator[](Piece pc) const { return table[pc]; } T* operator[](Piece pc) { return table[pc]; } @@ -68,10 +65,7 @@ struct Stats { void update(Piece pc, Square to, Move m) { table[pc][to] = m; } void update(Piece pc, Square to, Value v) { - if (abs(int(v)) >= 324) - return; - - table[pc][to] -= table[pc][to] * abs(int(v)) / (CM ? 936 : 324); + table[pc][to] -= table[pc][to] * abs(int(v)) / 936; table[pc][to] += int(v) * 32; } @@ -80,7 +74,7 @@ private: }; typedef Stats MoveStats; -typedef Stats CounterMoveStats; +typedef Stats CounterMoveStats; typedef Stats CounterMoveHistoryStats; @@ -101,7 +95,7 @@ public: MovePicker(const Position&, Move, Depth, Square); MovePicker(const Position&, Move, Depth, Search::Stack*); - Move next_move(); + Move next_move(bool skipQuiets = false); private: template void score();