diff --git a/source/search.cpp b/source/search.cpp index ceda5a0..8de118d 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -94,9 +94,7 @@ static SearchResults Quiescence(Board board, int alpha, int beta) { } } - int staticScore = Evaluate(board); - - int bestScore = staticScore; + int bestScore = Evaluate(board); if (bestScore>= beta) { return bestScore; @@ -188,11 +186,7 @@ SearchResults PVS(Board board, int depth, int alpha, int beta) { } } - int score = -inf; - int nodeType = AllNode; - GenerateMoves(board, board.sideToMove); - SortMoves(board); if (board.currentMoveIndex == 0) { if (board.InCheck(board.sideToMove)) { // checkmate @@ -202,6 +196,10 @@ SearchResults PVS(Board board, int depth, int alpha, int beta) { } } + SortMoves(board); + + int score = -inf; + int nodeType = AllNode; SearchResults results(-inf); // For all moves diff --git a/source/uci.cpp b/source/uci.cpp index 1adbcfc..9ca743f 100644 --- a/source/uci.cpp +++ b/source/uci.cpp @@ -180,8 +180,6 @@ void UCILoop(Board &board) { // define user / GUI input buffer std::string input = ""; - PrintEngineInfo(); - // main loop while (true) { // reset user / GUI input