From e5cfa14f40a38d99d11a9c048c34858e3145fbcd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ste=CC=81phane=20Nicolet?= Date: Sat, 14 Sep 2019 08:33:00 +0200 Subject: [PATCH] Assorted trivial cleanups No functional change --- AUTHORS | 1 + src/position.cpp | 4 ++-- src/search.cpp | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/AUTHORS b/AUTHORS index 207c5a85..e55f94fb 100644 --- a/AUTHORS +++ b/AUTHORS @@ -60,6 +60,7 @@ Jacques B. (Timshel) Jan Ondruš (hxim) Jared Kish (Kurtbusch) Jarrod Torriero (DU-jdto) +Jean Gauthier (QuaisBla) Jean-Francois Romang (jromang) Jerry Donald Watson (jerrydonaldwatson) Jonathan Calovski (Mysseno) diff --git a/src/position.cpp b/src/position.cpp index db66f416..6336a5ed 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -1305,8 +1305,8 @@ bool Position::pos_is_ok() const { continue; if ( piece_on(castlingRookSquare[cr]) != make_piece(c, ROOK) - || castlingRightsMask[castlingRookSquare[cr]] != (cr) - || (castlingRightsMask[square(c)] & (cr)) != (cr)) + || castlingRightsMask[castlingRookSquare[cr]] != cr + || (castlingRightsMask[square(c)] & cr) != cr) assert(0 && "pos_is_ok: Castling"); } diff --git a/src/search.cpp b/src/search.cpp index f8535a5f..79942bcd 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1050,7 +1050,7 @@ moves_loop: // When in check, search starts from here if (!pos.see_ge(move, Value(-(31 - std::min(lmrDepth, 18)) * lmrDepth * lmrDepth))) continue; } - else if ( (!givesCheck || !extension) + else if ( !(givesCheck && extension) && !pos.see_ge(move, Value(-199) * (depth / ONE_PLY))) // (~20 Elo) continue; } @@ -1096,7 +1096,7 @@ moves_loop: // When in check, search starts from here if ((ss-1)->moveCount > 15) r -= ONE_PLY; - // Decrease reduction if move has been singularly extended + // Decrease reduction if ttMove has been singularly extended r -= singularLMR * ONE_PLY; if (!captureOrPromotion) -- 2.39.2