X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.cpp;h=e3cc1880ce55cd5902b5c86e9f38ad8f3fc77ab0;hp=63f77dbaebfc14570cb4ff56408348fa4b15adb0;hb=4aeffc8c9a7ba870702974f62d1d3553ed227c00;hpb=dc5caff6385c8802b20470efda1d1e0c5d16cfaa diff --git a/src/movepick.cpp b/src/movepick.cpp index 63f77dba..e3cc1880 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -94,7 +94,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h, { // Consider sligtly negative captures as good if at low // depth and far from beta. - if (ss && ss->eval < beta - PawnValueMidgame && d < 3 * OnePly) + if (ss && ss->eval < beta - PawnValueMidgame && d < 3 * ONE_PLY) badCaptureThreshold = -PawnValueMidgame; phasePtr = MainSearchPhaseTable; @@ -221,7 +221,6 @@ void MovePicker::score_noncaptures() { Move m; Piece piece; Square from, to; - int hs; for (MoveStack* cur = moves; cur != lastMove; cur++) { @@ -229,14 +228,7 @@ void MovePicker::score_noncaptures() { from = move_from(m); to = move_to(m); piece = pos.piece_on(from); - hs = H.move_ordering_score(piece, to); - - // Ensure history has always highest priority - if (hs > 0) - hs += 10000; - - // Gain table based scoring - cur->score = hs + 16 * H.gain(piece, to); + cur->score = H.value(piece, to) + H.gain(piece, to); } } @@ -261,7 +253,7 @@ void MovePicker::score_evasions_or_checks() { cur->score = pos.midgame_value_of_piece_on(move_to(m)) - pos.type_of_piece_on(move_from(m)) + HistoryMax; else - cur->score = H.move_ordering_score(pos.piece_on(move_from(m)), move_to(m)); + cur->score = H.value(pos.piece_on(move_from(m)), move_to(m)); } }