Skip to content

Commit

Permalink
Bench: 3283668
Browse files Browse the repository at this point in the history
  • Loading branch information
ElbertoOne committed Dec 17, 2018
1 parent 7f3a3a6 commit b98cf3f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/evaluate.cpp
Expand Up @@ -23,7 +23,6 @@
#include <cstring> // For std::memset
#include <iomanip>
#include <sstream>
#include <iostream>

#include "bitboard.h"
#include "evaluate.h"
Expand Down Expand Up @@ -528,7 +527,7 @@ namespace {
weak = pos.pieces(Them) & ~stronglyProtected & attackedBy[Us][ALL_PIECES];

// Safe or protected squares
safe = ~attackedBy[Them][ALL_PIECES] | (attackedBy[Us][ALL_PIECES] & ~(attackedBy2[Them] & ~attackedBy2[Us]));
safe = ~attackedBy[Them][ALL_PIECES] | (attackedBy[Us][ALL_PIECES] & ~attackedBy[Them][PAWN]);

// Bonus according to the kind of attacking pieces
if (defended | weak)
Expand Down Expand Up @@ -574,7 +573,7 @@ namespace {
b |= shift<Up>(b & TRank3BB) & ~pos.pieces();

// Keep only the squares which are relatively safe
b &= ~attackedBy[Them][PAWN] & safe;
b &= safe;

// Bonus for safe pawn threats on the next move
b = pawn_attacks_bb<Us>(b) & pos.pieces(Them);
Expand Down

0 comments on commit b98cf3f

Please sign in to comment.