Simplify pawn usage check
authorFabian Fichter <ianfab@users.noreply.github.com>
Mon, 21 Aug 2023 18:59:29 +0000 (20:59 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Mon, 21 Aug 2023 18:59:29 +0000 (20:59 +0200)
src/search.cpp

index fc7c4f8..38d72f5 100644 (file)
@@ -936,7 +936,7 @@ namespace {
         && (ss-1)->statScore < 23767
         &&  eval >= beta
         &&  eval >= ss->staticEval
-        &&  ss->staticEval >= beta - 20 * depth - 22 * improving + 168 * ss->ttPv + 159 + 200 * (!pos.double_step_region(pos.side_to_move()) && pos.piece_to_char()[PAWN] != ' ')
+        &&  ss->staticEval >= beta - 20 * depth - 22 * improving + 168 * ss->ttPv + 159 + 200 * (!pos.double_step_region(pos.side_to_move()) && (pos.piece_types() & PAWN))
         && !excludedMove
         &&  pos.non_pawn_material(us)
         &&  pos.count<ALL_PIECES>(~us) != pos.count<PAWN>(~us)