Skip to content

Commit

Permalink
Bench: 4058638
Browse files Browse the repository at this point in the history
  • Loading branch information
ElbertoOne committed Jan 17, 2019
1 parent 637b984 commit fd52e39
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/bitboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,12 @@ inline Bitboard adjacent_files_bb(File f) {
return shift<EAST>(FileBB[f]) | shift<WEST>(FileBB[f]);
}

inline Bitboard wide_adjacent_files_bb(File f) {
Bitboard east = shift<EAST>(FileBB[f]);
Bitboard west = shift<WEST>(FileBB[f]);
return east | west | shift<EAST>(east) | shift<WEST>(west);
}


/// between_bb() returns a bitboard representing all the squares between the two
/// given ones. For instance, between_bb(SQ_C4, SQ_F7) returns a bitboard with
Expand Down
6 changes: 4 additions & 2 deletions src/pawns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,11 @@ namespace {
{
score -= Isolated, e->weakUnopposed[Us] += !opposed;
// extra penalty if the isolated pawn is not on the edge and is facing several opponent pawns.
if (!(s & (FileABB | FileHBB)) && more_than_one(theirPawns & (forward_file_bb(Us, s) | adjacent_files_bb(f))))
if ( !(s & (FileABB | FileHBB))
&& !(ourPawns & wide_adjacent_files_bb(f))
&& more_than_one(theirPawns & forward_ranks_bb(Us, s) & (file_bb(f) | adjacent_files_bb(f))))
score -= Isolated;
}
}

else if (backward)
score -= Backward, e->weakUnopposed[Us] += !opposed;
Expand Down

0 comments on commit fd52e39

Please sign in to comment.