diff --git a/src/history.h b/src/history.h index a605ae417..f0161b74e 100644 --- a/src/history.h +++ b/src/history.h @@ -100,7 +100,7 @@ using Stats = MultiArray, Sizes...>; // see https://www.chessprogramming.org/Butterfly_Boards using ButterflyHistory = Stats; -// LowPlyHistory is addressed by play and move's from and to squares, used +// LowPlyHistory is addressed by ply and move's from and to squares, used // to improve move ordering near the root using LowPlyHistory = Stats; diff --git a/src/misc.cpp b/src/misc.cpp index d21497280..886544b6c 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -44,7 +44,7 @@ constexpr std::string_view version = "dev"; // Our fancy logging facility. The trick here is to replace cin.rdbuf() and // cout.rdbuf() with two Tie objects that tie cin and cout to a file stream. We -// can toggle the logging of std::cout and std:cin at runtime whilst preserving +// can toggle the logging of std::cout and std::cin at runtime whilst preserving // usual I/O functionality, all without changing a single line of code! // Idea from http://groups.google.com/group/comp.lang.c++/msg/1d941c0f26ea0d81 diff --git a/src/misc.h b/src/misc.h index db5f701e9..32f5b047e 100644 --- a/src/misc.h +++ b/src/misc.h @@ -424,7 +424,7 @@ void move_to_front(std::vector& vec, Predicate pred) { #elif defined(_MSC_VER) #define sf_always_inline __forceinline #else - // do nothign for other compilers + // do nothing for other compilers #define sf_always_inline #endif diff --git a/src/position.cpp b/src/position.cpp index b08cabf3f..092e40fd4 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -911,7 +911,7 @@ void Position::do_move(Move m, if (more_than_one(pawns)) { - // If there are two pawns potentially being abled to capture and at least one + // If there are two pawns potentially being able to capture and at least one // is not pinned, ep is legal as there are no horizontal exposed checks if (!more_than_one(blockers_for_king(them) & pawns)) { diff --git a/src/search.cpp b/src/search.cpp index c31a08c49..5f60bafdc 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -699,18 +699,12 @@ Value Search::Worker::search( ss->ttPv = excludedMove ? ss->ttPv : PvNode || (ttHit && ttData.is_pv); ttCapture = ttData.move && pos.capture_stage(ttData.move); - // At this point, if excluded, skip straight to step 6, static eval. However, - // to save indentation, we list the condition in all code between here and there. - // Step 6. Static evaluation of the position Value unadjustedStaticEval = VALUE_NONE; const auto correctionValue = correction_value(*this, pos, ss); + // Skip early pruning when in check if (ss->inCheck) - { - // Skip early pruning when in check ss->staticEval = eval = (ss - 2)->staticEval; - improving = false; - } else if (excludedMove) unadjustedStaticEval = eval = ss->staticEval; else if (ss->ttHit)