X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.cpp;h=ab79c22f2f5cf560cccf99b17d3b57df8dd1df70;hp=05cd0052ad4cbe03732007fee8e033b4ddbfc853;hb=7faeab08785f59b3a506681957813ff3bd38ff18;hpb=d55a5a4d81b613e5a82e428770347b06fbd2d9a8 diff --git a/src/movepick.cpp b/src/movepick.cpp index 05cd0052..ab79c22f 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -132,7 +132,7 @@ void MovePicker::go_next_phase() { return; case PH_GOOD_CAPTURES: - lastMove = generate_captures(pos, moves); + lastMove = generate(pos, moves); score_captures(); return; @@ -142,7 +142,7 @@ void MovePicker::go_next_phase() { return; case PH_NONCAPTURES: - lastMove = generate_noncaptures(pos, moves); + lastMove = generate(pos, moves); score_noncaptures(); sort_moves(moves, lastMove, &lastGoodNonCapture); return; @@ -156,17 +156,17 @@ void MovePicker::go_next_phase() { case PH_EVASIONS: assert(pos.is_check()); - lastMove = generate_evasions(pos, moves); + lastMove = generate(pos, moves); score_evasions(); return; case PH_QCAPTURES: - lastMove = generate_captures(pos, moves); + lastMove = generate(pos, moves); score_captures(); return; case PH_QCHECKS: - lastMove = generate_non_capture_checks(pos, moves); + lastMove = generate(pos, moves); return; case PH_STOP: @@ -247,10 +247,10 @@ void MovePicker::score_evasions() { { m = cur->move; if ((seeScore = pos.see_sign(m)) < 0) - cur->score = seeScore - HistoryMax; // Be sure are at the bottom + cur->score = seeScore - (1 << 29); // Be sure are at the bottom else if (pos.move_is_capture(m)) cur->score = pos.midgame_value_of_piece_on(move_to(m)) - - pos.type_of_piece_on(move_from(m)) + HistoryMax; + - pos.type_of_piece_on(move_from(m)) + (1 << 29); else cur->score = H.value(pos.piece_on(move_from(m)), move_to(m)); } @@ -313,7 +313,7 @@ Move MovePicker::get_next_move() { // Sort negative scored moves only when we get there if (curMove == lastGoodNonCapture) - insertion_sort(lastGoodNonCapture, lastMove); + insertion_sort(lastGoodNonCapture, lastMove); move = (curMove++)->move; if ( move != ttMoves[0].move