Convert gains to use a piece-to mapping
[stockfish] / src / search.cpp
index 987b954a6cd5554fe252f051e12de6447dfd14d0..9d4c6d248c1bac2e39b763d6fce611563f974d92 100644 (file)
@@ -1607,7 +1607,7 @@ namespace {
               if (predictedDepth >= OnePly)
                   preFutilityValueMargin = FutilityMargins[int(predictedDepth)];
 
               if (predictedDepth >= OnePly)
                   preFutilityValueMargin = FutilityMargins[int(predictedDepth)];
 
-              preFutilityValueMargin += H.gain(pos.piece_on(move_from(move)), move_from(move), move_to(move)) + 45;
+              preFutilityValueMargin += H.gain(pos.piece_on(move_from(move)), move_to(move)) + 45;
 
               futilityValueScaled = ss[ply].eval + preFutilityValueMargin - moveCount * IncrementalFutilityMargin;
 
 
               futilityValueScaled = ss[ply].eval + preFutilityValueMargin - moveCount * IncrementalFutilityMargin;
 
@@ -2704,7 +2704,7 @@ namespace {
         && pos.captured_piece() == NO_PIECE_TYPE
         && !move_is_castle(m)
         && !move_is_promotion(m))
         && pos.captured_piece() == NO_PIECE_TYPE
         && !move_is_castle(m)
         && !move_is_promotion(m))
-        H.set_gain(pos.piece_on(move_to(m)), move_from(m), move_to(m), -(before + after));
+        H.set_gain(pos.piece_on(move_to(m)), move_to(m), -(before + after));
   }
 
 
   }