X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.cpp;h=d4242a300de7620e5f58665cb20c7e5ff0aa102c;hp=43f30f7709565e22502e6e94438a0aa91ac663d1;hb=31d4f0b73430677e79873beef16830dc07857ddd;hpb=75d001adddfaa7a2eb57af99cf6c57a12913d2d1 diff --git a/src/movepick.cpp b/src/movepick.cpp index 43f30f77..d4242a30 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -71,7 +71,7 @@ MovePicker::MovePicker(const Position& p, bool pv, Move ttm, ttMove = ttm; mateKiller = (ss.mateKiller == ttm)? MOVE_NONE : ss.mateKiller; killer1 = ss.killers[0]; - killer2 = ss.killers[0]; + killer2 = ss.killers[1]; depth = d; movesPicked = 0; numOfMoves = 0; @@ -270,10 +270,11 @@ void MovePicker::score_noncaptures() { else hs = H.move_ordering_score(pos.piece_on(move_from(m)), m); - // Ensure moves in history are always sorted as first + // Ensure history is always preferred to pst if (hs > 0) hs += 1000; + // pst based scoring moves[i].score = hs + pos.mg_pst_delta(m); } } @@ -292,7 +293,6 @@ void MovePicker::score_evasions() { } else moves[i].score = H.move_ordering_score(pos.piece_on(move_from(m)), m); } - // FIXME try psqt also here } void MovePicker::score_qcaptures() {