]> git.sesse.net Git - stockfish/blobdiff - src/movepick.cpp
Remove HistoryStats
[stockfish] / src / movepick.cpp
index 34d295626b80732930dfbf2100ada837d475530f..08dabe0a1eedb51af077cef8677da3a3a5938b2a 100644 (file)
@@ -140,7 +140,6 @@ void MovePicker::score<CAPTURES>() {
 template<>
 void MovePicker::score<QUIETS>() {
 
-  const HistoryStats& history = pos.this_thread()->history;
   const FromToStats& fromTo = pos.this_thread()->fromTo;
 
   const CounterMoveStats* cmh = (ss-1)->counterMoves;
@@ -150,8 +149,7 @@ void MovePicker::score<QUIETS>() {
   Color c = pos.side_to_move();
 
   for (auto& m : *this)
-      m.value =          history[pos.moved_piece(m)][to_sq(m)]
-               + (cmh  ?  (*cmh)[pos.moved_piece(m)][to_sq(m)] : VALUE_ZERO)
+      m.value =  (cmh  ?  (*cmh)[pos.moved_piece(m)][to_sq(m)] : VALUE_ZERO)
                + (fmh  ?  (*fmh)[pos.moved_piece(m)][to_sq(m)] : VALUE_ZERO)
                + (fmh2 ? (*fmh2)[pos.moved_piece(m)][to_sq(m)] : VALUE_ZERO)
                + fromTo.get(c, m);
@@ -159,17 +157,16 @@ void MovePicker::score<QUIETS>() {
 
 template<>
 void MovePicker::score<EVASIONS>() {
-  // Try captures ordered by MVV/LVA, then non-captures ordered by history value
-  const HistoryStats& history = pos.this_thread()->history;
+  // Try captures ordered by MVV/LVA, then non-captures ordered by stats heuristics
   const FromToStats& fromTo = pos.this_thread()->fromTo;
   Color c = pos.side_to_move();
 
   for (auto& m : *this)
       if (pos.capture(m))
           m.value =  PieceValue[MG][pos.piece_on(to_sq(m))]
-                   - Value(type_of(pos.moved_piece(m))) + HistoryStats::Max;
+                   - Value(type_of(pos.moved_piece(m))) + FromToStats::Max;
       else
-          m.value = history[pos.moved_piece(m)][to_sq(m)] + fromTo.get(c, m);
+          m.value = fromTo.get(c, m);
 }